summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-11 23:17:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-12 23:55:29 +0100
commit28949d3f80de33c1c034d877691308c301e50bbd (patch)
treed22819403228e154241a1ea8ae48d842a21c476a /bitbake/lib/bb/server
parent74afde0058e5ca6f27e645013e8a71ce297b23be (diff)
downloadpoky-28949d3f80de33c1c034d877691308c301e50bbd.tar.gz
bitbake: process/cooker: Improve readypipe handling
Issues in start are not being correctly detected by the current readypipe code. Change it to use specific "ready" or "fail" messages to correctly determine the correct failure mode and avoid bitbake seeming to hang (it does currently timeout eventually). [YOCTO #12062] (Bitbake rev: 60d4791e3dd05729d2a2adf6f3b203c80d466a73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 5c7dfaefa1..6a12f01057 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -388,8 +388,10 @@ class BitBakeServer(object):
388 self.bitbake_lock.close() 388 self.bitbake_lock.close()
389 389
390 ready = ConnectionReader(self.readypipe) 390 ready = ConnectionReader(self.readypipe)
391 r = ready.wait(30) 391 r = ready.poll(30)
392 if not r: 392 if r:
393 r = ready.get()
394 if not r or r != "ready":
393 ready.close() 395 ready.close()
394 bb.error("Unable to start bitbake server") 396 bb.error("Unable to start bitbake server")
395 if os.path.exists(logfile): 397 if os.path.exists(logfile):
@@ -404,8 +406,15 @@ class BitBakeServer(object):
404 print("Starting bitbake server pid %d" % os.getpid()) 406 print("Starting bitbake server pid %d" % os.getpid())
405 server = ProcessServer(self.bitbake_lock, self.sock, self.sockname) 407 server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
406 self.configuration.setServerRegIdleCallback(server.register_idle_function) 408 self.configuration.setServerRegIdleCallback(server.register_idle_function)
407 409 writer = ConnectionWriter(self.readypipein)
408 self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, self.readypipein) 410 try:
411 self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
412 writer.send("ready")
413 except:
414 writer.send("fail")
415 raise
416 finally:
417 os.close(self.readypipein)
409 server.cooker = self.cooker 418 server.cooker = self.cooker
410 server.server_timeout = self.configuration.server_timeout 419 server.server_timeout = self.configuration.server_timeout
411 server.xmlrpcinterface = self.configuration.xmlrpcinterface 420 server.xmlrpcinterface = self.configuration.xmlrpcinterface