summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-08-08 02:12:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 09:24:56 +0100
commit11bde5de8343f5b37c65c10a71824cdd57b85f86 (patch)
tree1eed8943f5847aa3036deca5ed5ece1b46abbca7 /bitbake
parent896243f4feb528588cc87d6159f81efdabd8a3b5 (diff)
downloadpoky-11bde5de8343f5b37c65c10a71824cdd57b85f86.tar.gz
bitbake: process: Fix disconnect when BB_SERVER_TIMEOUT
Fixed: $ export BB_SERVER_TIMEOUT=10000 $ bitbake --server-only $ bitbake --status-only [snip] File "/buildarea/lyang1/poky/bitbake/lib/bb/server/process.py", line 472, in recvfds msg, ancdata, flags, addr = sock.recvmsg(1, socket.CMSG_LEN(bytes_size)) OSError: [Errno 9] Bad file descriptor And: $ export BB_SERVER_TIMEOUT=10000 $ bitbake --server-only -B localhost:-1 $ bitbake --status-only # Everything is fine in first run $ bitbake --status-only [snip] File "/buildarea/lyang1/poky/bitbake/lib/bb/server/process.py", line 472, in recvfds msg, ancdata, flags, addr = sock.recvmsg(1, socket.CMSG_LEN(bytes_size)) OSError: [Errno 9] Bad file descriptor This was because self.controllersock was not set to False, so it still ran sock.recvmsg() when sock was closed. And also need set command_channel to Flase, otherwise the self.command_channel.get() will always run when EOF, and cause infinite loop. (Bitbake rev: 7b739a38601b053d9bea4df2c0b44a952ab670c4) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/server/process.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index bfd6404b73..5b8a549f94 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -173,6 +173,7 @@ class ProcessServer(multiprocessing.Process):
173 self.event_writer.writer.close() 173 self.event_writer.writer.close()
174 del self.event_writer 174 del self.event_writer
175 self.controllersock.close() 175 self.controllersock.close()
176 self.controllersock = False
176 self.haveui = False 177 self.haveui = False
177 self.lastui = time.time() 178 self.lastui = time.time()
178 self.cooker.clientComplete() 179 self.cooker.clientComplete()
@@ -188,6 +189,7 @@ class ProcessServer(multiprocessing.Process):
188 command = self.command_channel.get() 189 command = self.command_channel.get()
189 except EOFError: 190 except EOFError:
190 # Client connection shutting down 191 # Client connection shutting down
192 self.command_channel = False
191 continue 193 continue
192 if command[0] == "terminateServer": 194 if command[0] == "terminateServer":
193 self.quit = True 195 self.quit = True