Fossil Forum

Probable bug in integrity reports after Fossil/git/Fossil cycle
Login

Probable bug in integrity reports after Fossil/git/Fossil cycle

Probable bug in integrity reports after Fossil/git/Fossil cycle

(1) By Dan Shearer (danshearer) on 2022-01-05 18:48:42 [link] [source]

Hello everyone,

Back at Fossil 2.13 or so, the Fossil/git canonical test case was fixed. The current tree appears to be failing this test again, in a different way.

The test is:

cd /tmp
git clone https://github.com/drhsqlite/fossil-mirror
cd fossil-mirror
git fast-export --all | fossil import /tmp/fossil-mirror.fossil
fossil test-integrity --parse /tmp/fossil-mirror.fossil

The result is many thousands of messages such as this:

manifest_parse failed for
82d8750f2713289eb0ff929062a5af1c263bc9a93d567a6fbede1880dd229826:
line 774: cards not in lexicographical order

I don't think this is common Fossil error.

Any ideas?

--
Dan Shearer
Committed to Fossil

(2) By Dan Shearer (danshearer) on 2022-01-06 15:46:50 in reply to 1 [source]

This seems to be the Fossil specification rule that is being triggered:

All cards of a structural artifact should be in lexicographical order. The Fossil implementation verifies this and rejects any structural artifact which has out-of-order cards. Futhermore, when Fossil is generating new structural artifacts, it runs the generated artifact through the parser to confirm that all cards really are in the correct order before committing the transaction. In this way, Fossil prevents bugs in the code from accidentally inserting misformatted artifacts. The test parse of newly created artifacts is part of the self-check strategy of Fossil.

Looks like the import is both getting it wrong and bypassing at least one stage of the checking process. I will look at the code later to find out where. This is surprising since it is new behaviour.

--
Dan Shearer
Praise Options Filename