| Summary: | Autobuilder produced a corrupted sstate object (popt-native:create_recipe_spdx) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Infrastructure] AutoBuilder | Reporter: | Yoann Congal <yoann.congal> | ||||||
| Component: | autobuilder | Assignee: | Richard Purdie <richard.purdie> | ||||||
| Status: | NEW --- | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | Undecided | CC: | infras.ab.watcher, Infras.watcher, paul | ||||||
| Version: | 6.0.9 | ||||||||
| Target Milestone: | 0.0.0 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||
| Attachments: |
|
||||||||
|
Description
Yoann Congal
2026-10-08 19:25:41 UTC
Created attachment 5253 [details]
The correct JSON file
I now believe this is a race-condition in ext4. On a ext4 filesystem, under load (e.g. lots of sync()), there is a window of time where a recently written+closed file reports "stat.st_blocks = 0". See this reproducer: https://gist.github.com/ycongal-smile/ee5c363a10f12fc014262930369fbb6f ❯ python3 st_blocks_race.py 347/1000 files holding 20704 bytes reported st_blocks == 0 Then, "tar --sparse" (that we use in sstate) optimize fully sparse files that have "st_size != 0" but no blocks (stat.st_blocks == 0)[1]. If tar does this check in the race window, then it will store into the archive a file that is just a sparse hole of the size of the file. Which is exactly what we observe. Neither tar nor the kernel seem to have a fix/workaround. Note: The same bug on btrfs: https://lists.gnu.org/archive/html/bug-tar/2016-07/msg00000.html * There are POSIX-level debate whether a filesystem can report st_blocks=0 on written files. [1]: https://cgit.git.savannah.gnu.org/cgit/tar.git/tree/src/sparse.c#n269 From a failing build: oe-selftest-debian debian12-vk-6 wrynose completed at 2026-10-08 16:56:12+00:00 https://autobuilder.yoctoproject.org/valkyrie/?#/builders/35/builds/5027 If I prevent the corrupted sstate object to be reused with https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/wrynose-nut&id=ecd7d7370301218f89ce460e393cb48978f15673 meta/recipes-support/popt/popt_1.19.bb: +# XXX to workaround a corrupted sstate object (BZ#16446) +PR = "r1" +HASHEQUIV_HASH_VERSION .= ".1" Build succeed: oe-selftest-debian debian13-vk-2 wrynose completed at 2026-10-09 10:13:12+00:00 https://autobuilder.yoctoproject.org/valkyrie/?#/builders/35/builds/5030 I removed the corrupted sstate object from the shared sstate AB directory |