Fossil Forum

schelte 3 weeks, 6 days ago

Post: All tickets are gone from tcl repository

I tried changing the Report List Page on the tcl repository. Because Cloudflare didn't let me update the page online, I used a local checkout and did:

fossil configuration pull --overwrite all
fossil ui
# Made the change and tested it
fossil configuration push ticket

Now all the tickets have disappeared from the Tcl repository.

select count() from ticket; count() 0

They do still exist in my local copy.

How is that possible? And more importantly, how can I get them back?

schelte 3 weeks, 6 days ago

I tried changing the Report List Page on the tcl repository. Because Cloudflare didn't let me update the page online, I used a local checkout and did:

fossil configuration pull --overwrite all
fossil ui
# Made the change and tested it
fossil configuration push ticket

Now all the tickets have disappeared from the Tcl repository.

select count() from ticket; count() 0

They do still exist in my local copy, but that is probably not complete. I did not do a fossil pull before making the ticket page update.

How is that possible? And more importantly, how can I get them back?

schelte 3 weeks, 6 days ago

Edit: All tickets are gone from tcl repository

schelte 3 weeks, 6 days ago

I'm not sure if anyone took some action on this, but (mostly) all tickets seem to be back now. The only thing I tried was doing a rebuild on a copy of the repository file.

andybradford 3 weeks, 6 days ago

How is that possible? And more importantly, how can I get them back?

That's a good question. I tried to reproduce it using a local repository and your 3 steps and was unable to cause the "remote" table to lose anything.

andybradford 3 weeks, 6 days ago

I'm not sure if anyone took some action on this, but (mostly) all tickets seem to be back now.

Fossil's distributed nature means that anyone with a clone who also has permission to push would effectively "restore" the missing tickets.

To confirm if this has happened, you could look at the /rcvfromlist page on the Tcl repository.

Maybe there is some other explanation?

schelte 3 weeks, 6 days ago

Someone has been pushing updates frequently today. But I cannot tell from the receipt details if any of those pushes restored the tickets.

jan.nijtmans 3 weeks, 4 days ago

On the "Shun" page, there's a "Build" button (only visible for admins). I trigged it, but it, but it only resulted in a web-page showing "The repository is locked". It might be that in the background a "rebuild" process was spawned anyway, which restored the tickets. That would be my first explanation. It might also be that Richard or Andreas (or someone else with admin rights on the machine itself) saw the message and did the "fossil rebuild".

A Fossil repository is nothing more than a collection of artifacts. A "fossil rebuild" clears the housekeeping database tables, and fills them again by going through all artifacts again. If a database table is corrupt, that's the way to fix it.

stephan 3 weeks, 4 days ago

How is that possible? And more importantly, how can I get them back?

Dan Mestas posted (off-list) an LLM analysis of the reason for this, a fix, and a workaround if it happens again. First the quick workaround:

fossil test-ticket-rebuild all -R /path/to/tcl.fossil

Next the analysis:

Receiving ticket configuration makes the server drop and rebuild its ticket tables inside the HTTP request. The drop commits before the refill starts, so if the refill fails or is cut off, the server is left with an empty table. On a repository with as many tickets as Tcl's, the refill can outlast the request's time limit. With 40,000 tickets and a 2-second --max-latency, that reproduces the report exactly: an empty table on the server and a normal "Push done" on the client. The ticket artifacts themselves are untouched, so nothing is lost, and a rebuild run on the server restores them.

We have a (small) patch and it will be committed as soon as i can confidently wrap my head around it.

schelte 3 weeks, 4 days ago

I'm glad you managed to find a scenario that could explain the situation. It made me a bit nervous to do work with a system when I don't understand how I broke things or how it seemingly fixed itself. I'm also not entirely sure if everything is completely fine now or if some administration could still be incorrect. Is it still necessary to run the test-ticket-rebuild? Should the repository be taken offline while running that command?

stephan 3 weeks, 4 days ago

It made me a bit nervous to do work with a system when I don't understand how I broke things or how it seemingly fixed itself.

Understandably. See for the problem description, pared down from a much larger LLM-generated analysis.

I'm also not entirely sure if everything is completely fine now or if some administration could still be incorrect.

If a rebuild has been run, it's all back in order. What was dropped was the post-processed cache built from the immutable (and still extant) blob-table records, and that's recovered whenever a rebuild is done.

Thank you for the report - this bug has been lingering for years, just never happened to have an observer.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button