Bug 13537

Summary: Hash server hangs if server can't be reached
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ross Burton <ross.burton>
Component: bitbakeAssignee: Joshua Watt <JPEWhacker>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: High CC: JPEWhacker, poky.bs.watcher, poky.watcher, richard.purdie
Version: 3.0   
Target Milestone: 2.8 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 Ross Burton 2019-09-18 09:49:06 UTC
The timeout is very long when trying to reach a hash server.  I accidentally did a build with BB_HASHSERVE = "typhoon.yocto.io:8686".  Several minutes later it still wasn't reporting any messages and finally crashed with a stack trace

Traceback (most recent call last):
  File "/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py", line 1523, in RunQueue.execute_runqueue():
             try:
    >            return self._execute_runqueue()
             except bb.runqueue.TaskFailure:
  File "/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py", line 1441, in RunQueue._execute_runqueue():
                                                                 [43, 967, 4, 3, 1, 5, 3, 7, 13, 1, 2, 1, 1, 246, 35, 1, 38, 1, 35, 2, 338, 204, 142, 3, 3, 37, 244])
    >            if self.rqdata.prepare() == 0:
                     self.state = runQueueComplete
  File "/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py", line 1173, in RunQueueData.prepare():
                         todeal.remove(tid)
    >                    self.prepare_task_hash(tid)

  File "/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py", line 1186, in RunQueueData.prepare_task_hash(tid='/home/ross/Yocto/poky/meta/recipes-devtools/gcc/gcc-source_9.2.bb:do_fetch'):
             self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.dataCaches[mc_from_tid(tid)])
    >        self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid)

  File "/home/ross/Yocto/poky/bitbake/lib/bb/siggen.py", line 443, in SignatureGeneratorOEEquivHash.get_unihash(tid='/home/ross/Yocto/poky/meta/recipes-devtools/gcc/gcc-source_9.2.bb:do_fetch'):
                     bb.debug(2, 'No reported unihash for %s:%s from %s' % (tid, taskhash, self.server))
    >        except hashserv.HashConnectionError as e:
                 bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e)))
AttributeError: module 'hashserv' has no attribute 'HashConnectionError'