summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-09 14:46:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-10 19:25:38 +0000
commit2c46245f449d2716566ef668da0bf48f2109643a (patch)
tree94ff0604676b46c5f7275aef76b42cd222a1f5f8 /bitbake/lib
parent02f36dc832ae786dd0f790d86820611a71f0b960 (diff)
downloadpoky-2c46245f449d2716566ef668da0bf48f2109643a.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 15s 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: edc3b0c3953cab675e29fe295b58cfa84ba811c3) 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 349891e852..fd9b304961 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -356,7 +356,7 @@ class Wget(FetchMethod):
356 except (TypeError, ImportError, IOError, netrc.NetrcParseError): 356 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
357 pass 357 pass
358 358
359 with opener.open(r) as response: 359 with opener.open(r, timeout=30) as response:
360 pass 360 pass
361 except urllib.error.URLError as e: 361 except urllib.error.URLError as e:
362 if try_again: 362 if try_again: