summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-10 14:45:26 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-11 11:04:30 +0000
commit701e299b91836521ec7b74d6d1f26c56e8a50502 (patch)
treefffae995d9ca4afca9688230708697b0706ac12d /bitbake/lib
parent31007eb03e22cc20a1841af5781ba16e3dfbe340 (diff)
downloadpoky-701e299b91836521ec7b74d6d1f26c56e8a50502.tar.gz
bitbake: fetch/wget: Add timeout for checkstatus calls (30s)
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: c0348de8121c3a842bf44906f7e2f79e93f7275b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index f7d1de26b7..5676d3fd27 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -319,7 +319,7 @@ class Wget(FetchMethod):
319 except (TypeError, ImportError, IOError, netrc.NetrcParseError): 319 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
320 pass 320 pass
321 321
322 with opener.open(r) as response: 322 with opener.open(r, timeout=30) as response:
323 pass 323 pass
324 except urllib.error.URLError as e: 324 except urllib.error.URLError as e:
325 if try_again: 325 if try_again: