1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Richard Purdie
2017-09-11 23:17:43 +01:00
parent 74afde0058
commit 28949d3f80
2 changed files with 14 additions and 9 deletions
+13 -4
View File
@@ -388,8 +388,10 @@ class BitBakeServer(object):
self.bitbake_lock.close()
ready = ConnectionReader(self.readypipe)
r = ready.wait(30)
if not r:
r = ready.poll(30)
if r:
r = ready.get()
if not r or r != "ready":
ready.close()
bb.error("Unable to start bitbake server")
if os.path.exists(logfile):
@@ -404,8 +406,15 @@ class BitBakeServer(object):
print("Starting bitbake server pid %d" % os.getpid())
server = ProcessServer(self.bitbake_lock, self.sock, self.sockname)
self.configuration.setServerRegIdleCallback(server.register_idle_function)
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, self.readypipein)
writer = ConnectionWriter(self.readypipein)
try:
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
writer.send("ready")
except:
writer.send("fail")
raise
finally:
os.close(self.readypipein)
server.cooker = self.cooker
server.server_timeout = self.configuration.server_timeout
server.xmlrpcinterface = self.configuration.xmlrpcinterface