Fossil Forum

tomaneo 4 weeks ago

Post: fossil ticket set writes J cards out of order

Fossil 2.28 [52445a27f1]

If one fossil ticket set has both comment and +icomment, the ticket change artifact has its J cards in the wrong order. The command still prints "succeeded", and the blob stays in the repository.

To reproduce

fossil init r.fossil
fossil ticket add title T status Open comment first -R r.fossil
fossil ticket set <UUID> comment second +icomment appended -R r.fossil

Output: ticket set succeeded for <UUID>. The artifact it wrote:

D 2026-10-30T08:21:18.595
J comment second
J +icomment appended
K 766f69bb6cc39238b12be8c3759e95139091b15d
U u
Z 933adbd59b1b66ce8037d059a1007696

After that:

  • The ticket's comment is still first, and the artifact has no ticketchng row.
  • fossil test-integrity --parse reports:

manifest_parse failed for e0ad8cbfb0...: line 3: incorrect J-card sort order 3 non-phantom blobs (out of 3 total) checked: 0 errors

fossil ticket set <UUID> status Closed +icomment x works, because icomment sorts before status.

Minor note: test-integrity --parse counts these parse failures in its output but not in its "N errors" total.

stephan 3 weeks, 2 days ago

If one fossil ticket set has both comment and +icomment...

With my apologies for the delay. This is an acknowledgement of the problem, but we've not yet looked into it. It's flagged in my inbox to help avoid it getting lost.

And TIL that the ticket command exists.

stephan 2 weeks ago

If one fossil ticket set has both comment and +icomment, the ticket change artifact has its J cards in the wrong order.

With my apologies for the delay. Please try or newer (noting that it's on trunk and we're currently active in several branches, so pull from trunk instead of whatever's newest). It turns out that another place in the code had dealt with exactly that problem and laid out the pattern to deal with it.

Thank you again for the report!

tomaneo 1 week, 2 days ago

I can confirm that the fix in 030455006f works. However, the trunk tip as of now breaks the ticket command, ticket add or ticket set crashes. I have not studied it further, but trunk seems to have broken with small-fixes merge 0e1be49ef0 .

stephan 1 week, 2 days ago

I have not studied it further, but trunk seems to have broken with small-fixes merge 0e1be49ef0 .

Thank you for narrowing that down. We'll look into that promptly.

stephan 1 week, 2 days ago

I have not studied it further, but trunk seems to have broken with small-fixes merge 0e1be49ef0 .

Turns out it's also broken on the two before that, but i didn't search further back that that.

That was a garden-variety case of a NULL pointer passed to strncmp(), fixed at . ticket add and set work for me with that change.

Thank you again for the report!

tomaneo 1 week, 2 days ago

Unfortunately that didn't fix it for me. Plain fossil ticket add title x status Open causes the crash.

$ fossil-test/fossil version
This is fossil version 2.29 [13f0d8b1a9] 2026-11-18 10:08:46 UTC
$ fossil-test/fossil init test.fossil
project-id: 8837405c4a8ee7a59e1db140816fc5f642f5537f
server-id:  1bbd016d54f9d83d8abd39ab6bd28f58864b2b8d
admin-user: <redacted>
$ fossil-test/fossil ticket add title X status Open -R test.fossil
Segmentation fault         fossil-test/fossil ticket add title X status Open -R test.fossil

stephan 1 week, 2 days ago

Unfortunately that didn't fix it for me

Oh, facepalm! This one has an interesting explanation and it's now clear why you discovered the problem at the checkin you did:

It only triggered in certain uses, which my test of your first fix did not cover. Dan Shearer is currently overhauling our test suite so that we'll soon be able to catch this type of regression much more quickly.

Thank you for the reports!

tomaneo 1 week, 2 days ago

Confirmed, the latest loop variable fix resolved the bug.

Keyboard Shortcuts

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