Bug 14689

Summary: Need to show activity when talking to hash equivalence servers
Product: [Build System, Metadata & Runtime] BitBake Reporter: Michael Opdenacker <michael.opdenacker>
Component: bitbakeAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, quaresma.jose, randy.macleod
Version: 4.0   
Target Milestone: 4.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Michael Opdenacker 2022-01-14 15:59:14 UTC
I have this issue after cloning the latest Poky (master), and starting a fresh "bitbake core-image-minimal" build with the below conf/local.conf settings:

BB_HASHSERVE = "auto"
BB_SIGNATURE_HANDLER = "OEEquivHash"
SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH"
BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"

Quickly after startup, Bitbake remains stuck at 44% during the "Initializing task" step, for several minutes (3 to 5?).

Then, the build proceeds nicely.

I ran "strace" on the Bitbake parent process:
...
futex(0x277c200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0,
{tv_sec=1642092729, tv_nsec=110486000}, FUTEX_BITSET_MATCH_ANY) = -1
ETIMEDOUT (Connection timed out)
futex(0x277c200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0,
{tv_sec=1642092729, tv_nsec=360665000}, FUTEX_BITSET_MATCH_ANY) = -1
ETIMEDOUT (Connection timed out)
futex(0x277c200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0,
{tv_sec=1642092729, tv_nsec=610862000}, FUTEX_BITSET_MATCH_ANY) = -1
ETIMEDOUT (Connection timed out)
futex(0x277c200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0,
{tv_sec=1642092729, tv_nsec=861086000}, FUTEX_BITSET_MATCH_ANY) = -1
ETIMEDOUT (Connection timed out)
futex(0x277c200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0,
{tv_sec=1642092730, tv_nsec=111295000}, FUTEX_BITSET_MATCH_ANY) = -1
ETIMEDOUT (Connection timed out)
...

I'm using Ubuntu 20.04 by the way.
Any idea why this happens?
I'll be happy to try code patches if this can help...
Comment 1 Michael Opdenacker 2022-01-20 15:34:53 UTC
I'm using Python 3.8
Comment 2 Michael Opdenacker 2022-01-26 10:09:33 UTC
After a new update, I commented out:
BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"

I didn't get the issue, but I didn't get it either after adding back BB_HASHSERVE_UPSTREAM

This issue is difficult to reproduce. I'll keep an eye on it.
Comment 3 Richard Purdie 2022-02-10 13:21:56 UTC
The issue will depend whether there are local cache values for the hash equivalence. Once queried the cache will be present and it will be faster.
Comment 4 Michael Opdenacker 2022-03-08 09:43:38 UTC
Still facing this issue after a Poky update.
The "stuck" time was about 4 minutes.
At least, it would be good to show signs of life.
Comment 5 Richard Purdie 2022-04-28 14:22:00 UTC
Original title 'Bitbake stuck for several minutes at "Initialising tasks:  44%"' but issue is showing progress when talking to hash equivalence servers
Comment 6 Michael Opdenacker 2022-05-04 16:11:55 UTC
Still facing this issue with the latest Poky.
There is no apparent CPU activity for 2 to 3 minutes.
Comment 7 Michael Opdenacker 2023-02-15 09:28:44 UTC
Hello
I don“t face this issue any more.
Can we close it?
Cheers
Michael.
Comment 8 Michael Opdenacker 2023-03-21 07:18:46 UTC
This bug is now fixed for me.