Bug 16365 - HASHSERVER_UPSTREAM discards any gains from the batch stream API
Summary: HASHSERVER_UPSTREAM discards any gains from the batch stream API
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Joshua Watt
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-07-20 09:16 UTC by Michal Sieron
Modified: 2026-09-04 10:16 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
AI generated fix (10.56 KB, patch)
2026-07-20 09:16 UTC, Michal Sieron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Sieron 2026-07-20 09:16:42 UTC
Created attachment 5236 [details]
AI generated fix

This is something I noticed quite some time ago as our builds' startup was taking a lot of time during the `Initialising tasks:  44%` step, which is when Bitbake queries the hashserver.

Basically, when `BB_HASHSERVE_UPSTREAM` is configured, a local hash equivalence
server awaits a blocking `upstream_client.get_unihash()` for every miss, which discards any gains from the batch stream API.

Because I am not confident with my understanding of this part of Bitbake's code or async in general, I had to use LLM for a fix. It seems to work, but as it is 100% generated, I didn't want to send it straight to the mailing list. You can check the attached patch and decide what to do with it.
Comment 1 Joshua Watt 2026-07-23 14:07:20 UTC
The idea is sound, but I'm not a big fan of the way this patch works. I do have an idea for how to do this, so I can try to work it up in the comming weeks
Comment 3 Michal Sieron 2026-07-24 22:41:28 UTC
Wow, that was quick. Thanks a lot. Will test on Monday when in office
Comment 4 Michal Sieron 2026-07-27 11:55:23 UTC
Initially it seemed to work just fine and indeed the speedup was there, but then on a rerun I had some issues where it seemed that bitbake couldn't communicate with the local hashserv (leftover .sock?).
After cleaning up the builddir, now I get the same issue as on the Autobuilder with `hashserv.client.AsyncQueue.Shutdown`.