diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index d495ac6245..6d77ce4786 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -500,12 +500,18 @@ class ServerCommunicator(): | |||
500 | self.recv = recv | 500 | self.recv = recv |
501 | 501 | ||
502 | def runCommand(self, command): | 502 | def runCommand(self, command): |
503 | self.connection.send(command) | 503 | try: |
504 | self.connection.send(command) | ||
505 | except BrokenPipeError as e: | ||
506 | raise BrokenPipeError("bitbake-server might have died or been forcibly stopped, ie. OOM killed") from e | ||
504 | if not self.recv.poll(30): | 507 | if not self.recv.poll(30): |
505 | logger.info("No reply from server in 30s (for command %s at %s)" % (command[0], currenttime())) | 508 | logger.info("No reply from server in 30s (for command %s at %s)" % (command[0], currenttime())) |
506 | if not self.recv.poll(30): | 509 | if not self.recv.poll(30): |
507 | raise ProcessTimeout("Timeout while waiting for a reply from the bitbake server (60s at %s)" % currenttime()) | 510 | raise ProcessTimeout("Timeout while waiting for a reply from the bitbake server (60s at %s)" % currenttime()) |
508 | ret, exc = self.recv.get() | 511 | try: |
512 | ret, exc = self.recv.get() | ||
513 | except EOFError as e: | ||
514 | raise EOFError("bitbake-server might have died or been forcibly stopped, ie. OOM killed") from e | ||
509 | # Should probably turn all exceptions in exc back into exceptions? | 515 | # Should probably turn all exceptions in exc back into exceptions? |
510 | # For now, at least handle BBHandledException | 516 | # For now, at least handle BBHandledException |
511 | if exc and ("BBHandledException" in exc or "SystemExit" in exc): | 517 | if exc and ("BBHandledException" in exc or "SystemExit" in exc): |