Bug 15928 - Hash equivalence server reported a DatabaseError
Summary: Hash equivalence server reported a DatabaseError
Status: RESOLVED WORKSFORME
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.0.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.3
Assignee: Joshua Watt
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-07-08 02:31 UTC by Jate Sujjavanich
Modified: 2026-04-09 15:17 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jate Sujjavanich 2025-07-08 02:31:31 UTC
On a long running bitbake hash equivalence server (2-3 months) running kirkstone, the following problem occurred.

Trying to use BB_HASHSERVE_UPSTREAM and BB_HASHSERVE. I have a local build and a premirror.

I have a read-write bitbake-hashserve on port 38686. And a read-only instance on 48686. The read-only accesses the sqlite3 database of the read-write instance.

The builder populates the premirror sstate using the read-write instance.


In my developer machine, I have it use the SSTATE_MIRROR. I have set these variables:

BB_HASHSERVE_UPSTREAM = "server:48686"
BB_HASHSERVE = "auto"

The client reports:

WARNING: Error contacting Hash Equivalence Server unix:///workdir/kirkstone/tuxzilla/poky/build-stsm/hashserve.sock: Connection closed

The server reports:

hserv[440257]: Traceback (most recent call last):
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/bb/asyncrpc/serv.p>
hserv[440257]:     await client.process_requests()
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py>
hserv[440257]:     await super().process_requests()
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/bb/asyncrpc/serv.p>
hserv[440257]:     await self.dispatch_message(d)
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py>
hserv[440257]:     await self.handlers[k](msg[k])
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py>
hserv[440257]:     row = self.query_equivalent(cursor, method, taskhash)
hserv[440257]:   File "/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py>
hserv[440257]:     cursor.execute(
hserv[440257]: sqlite3.DatabaseError: database disk image is malformed
hserv[440257]: Client disconnected


Running sqlite3 commands to test the integrity of the database pass with OK.


Restarting the read-only hash equivalence server fixed the problem.
Comment 1 Joshua Watt 2026-04-09 15:17:41 UTC
I don't think we've seen this or been able to reproduce it; if it happens again please reopen