diff options
authorRichard Purdie <>2021-11-11 00:45:26 (GMT)
committerRichard Purdie <>2021-11-11 11:04:25 (GMT)
commitbc71ec0f1d97c983cb0a089b15e283c56de30844 (patch)
parent264a1c06d4b3235ffdbd08508ac5569686448ffc (diff)
bitbake: fetch/wget: Add timeout for checkstatus calls (30s)gatesgarth
We had an issue where a webserver serving sstate had filesystem issues so would accept connections but effectively not do anything with them. This causes bitbake to hang whilst processing things like sstate objects inside the checkstatus() calls. It can be replicated by setting up a server like: socat -u TCP4-LISTEN:NNN,fork OPEN:/dev/null and pointing SSTATE_MIRRORS in OE at that address. Adding a timeout to the checkstatus calls of 30s means that whilst the system will pause, it will then continue and not hang entirely. Since there isn't a large transfer here, 30s should be a reasonable response time after which we should fall back to building things ourselves. [YOCTO #13716] (Bitbake rev: 92bb53adf47b95182e763a41cd6f4f920250e7b7) Signed-off-by: Richard Purdie <>
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/ b/bitbake/lib/bb/fetch2/
index e6d9f52..83acd85 100644
--- a/bitbake/lib/bb/fetch2/
+++ b/bitbake/lib/bb/fetch2/
@@ -316,7 +316,7 @@ class Wget(FetchMethod):
316 except (TypeError, ImportError, IOError, netrc.NetrcParseError): 316 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
317 pass 317 pass
318 318
319 with as response: 319 with, timeout=30) as response:
320 pass 320 pass
321 except urllib.error.URLError as e: 321 except urllib.error.URLError as e:
322 if try_again: 322 if try_again: