SyncThread exit issues
Quoted 15 lines · Richard Purdie via lists.openembedded.org
Hi All,
Its taken quite a bit of debugging and going around in circles but I'm now 99% sure the remaining "hung" bitbake issues are related to the SyncThread. It is exiting correctly but taking far too long to do so. The bitbake-cookerdaemon log for a recent failure is shown below but the key section is this:
622524 16:21:48.768140 Exiting
622524 16:23:22.923871 Original lockfile
contents: ['622524\n']i.e. at exit bitbake went AWOL for 94s. This is longer than the 60s
connection timeout so this is why other tests failed. Earlier lines in the log clearly show the SyncThread had not finished.
Quoted 8 lines
I'm not really sure what to do about this, presumably its due to high IO load on on the autobuilders.
I wanted to mention it to show that we are at least able to clearly identify the cause of the rare test failures and the logs are doing a better job of capturing what is going on.
(https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1352 was the build that failed this corresponds to)
For the purposes of the archives, I think the problem is happening particularly on the Fedora workers which are using ext4 partitions with normal journals. On some other machines we use ext4 partitions with writeback journals.
The journal runs in its own process which has be/3 priority, so even if we have file deletion running at idle or compiles at be/7, they will end up writing to the journal which can stall out be/4 process I/O.
The solution here may be to mount these ext4 partitions as writeback journals. This will mean fewer writes through the journal, letting the I/O scheduler do the right thing.
Hopefully :)
This also explains an observation I've had where a build with an "ionice -c 3 rm" runs much more slowly than a build without 'background' deletion.
Cheers,
Richard