<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15928</bug_id>
          
          <creation_ts>2025-07-08 02:31:31 +0000</creation_ts>
          <short_desc>Hash equivalence server reported a DatabaseError</short_desc>
          <delta_ts>2026-04-09 15:17:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>2.0.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jate Sujjavanich">jatedev</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102429</commentid>
    <comment_count>0</comment_count>
    <who name="Jate Sujjavanich">jatedev</who>
    <bug_when>2025-07-08 02:31:31 +0000</bug_when>
    <thetext>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 = &quot;server:48686&quot;
BB_HASHSERVE = &quot;auto&quot;

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 &quot;/home/yocto/hashserv/poky/bitbake/lib/bb/asyncrpc/serv.p&gt;
hserv[440257]:     await client.process_requests()
hserv[440257]:   File &quot;/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py&gt;
hserv[440257]:     await super().process_requests()
hserv[440257]:   File &quot;/home/yocto/hashserv/poky/bitbake/lib/bb/asyncrpc/serv.p&gt;
hserv[440257]:     await self.dispatch_message(d)
hserv[440257]:   File &quot;/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py&gt;
hserv[440257]:     await self.handlers[k](msg[k])
hserv[440257]:   File &quot;/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py&gt;
hserv[440257]:     row = self.query_equivalent(cursor, method, taskhash)
hserv[440257]:   File &quot;/home/yocto/hashserv/poky/bitbake/lib/hashserv/server.py&gt;
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105026</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2026-04-09 15:17:41 +0000</bug_when>
    <thetext>I don&apos;t think we&apos;ve seen this or been able to reproduce it; if it happens again please reopen</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>