All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] buildman: Deal nicely with invalid build-status file
@ 2018-12-10 16:05 Simon Glass
  2019-01-03 18:08 ` sjg at google.com
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2018-12-10 16:05 UTC (permalink / raw)
  To: u-boot

The 'done' files created by buildman may end up being empty if buildman
runs out of disk space while writing them. This error is then persistent,
since even if disk space is reclaimed and the build retries, the empty
file causes an exception in the builder thread.

Deal with this silently by doing a rebuild.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/builderthread.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index c84ba6acf11..b91634f3abb 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -156,7 +156,12 @@ class BuilderThread(threading.Thread):
         if result.already_done:
             # Get the return code from that build and use it
             with open(done_file, 'r') as fd:
-                result.return_code = int(fd.readline())
+                try:
+                    result.return_code = int(fd.readline())
+                except ValueError:
+                    # The file may be empty due to running out of disk space.
+                    # Try a rebuild
+                    result.return_code = RETURN_CODE_RETRY
 
             # Check the signal that the build needs to be retried
             if result.return_code == RETURN_CODE_RETRY:
-- 
2.20.0.rc2.403.gdbc3b29805-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] buildman: Deal nicely with invalid build-status file
  2018-12-10 16:05 [U-Boot] [PATCH] buildman: Deal nicely with invalid build-status file Simon Glass
@ 2019-01-03 18:08 ` sjg at google.com
  0 siblings, 0 replies; 2+ messages in thread
From: sjg at google.com @ 2019-01-03 18:08 UTC (permalink / raw)
  To: u-boot

The 'done' files created by buildman may end up being empty if buildman
runs out of disk space while writing them. This error is then persistent,
since even if disk space is reclaimed and the build retries, the empty
file causes an exception in the builder thread.

Deal with this silently by doing a rebuild.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/builderthread.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Applied to u-boot-dm/master, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-03 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 16:05 [U-Boot] [PATCH] buildman: Deal nicely with invalid build-status file Simon Glass
2019-01-03 18:08 ` sjg at google.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.