OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Hugo Almeida - 24.11.2018

FS#1967 - bug `make download` will hang forever if networking flush/unstable

Supply the following if possible:
 - "all", Device problem occurs on
 - "master branch", Software versions of OpenWrt/LEDE release, packages, etc.
 - "said below", Steps to reproduce

when i call `make download`, it hangs/dead,
after debug (tools: `htop` and `strace`, and read the sources),
i found it because of blocking socket.

details below:

1. the python script `scripts/`

fileobj = urllib2.urlopen(req, context=sslcontext)
# this will make a blocked socket connection
# if no timeout param, it will use global setting, which is None, it means blocked forever.
# this is bad smell, especially unstable networking.

# ref:

running situation:

/mnt/op/build/scripts/ \
--dl-dir="/mnt/op/build/dl" \
--url="" \
--version="d366b80d41309531c0c98b26625f23e318f33e31" \
--subdir="ath10k-firmware-2018-10-10-d366b80d" \
--source="ath10k-firmware-2018-10-10-d366b80d.tar.xz" \

which bloked/dead because of networking issue.

if patch that line, like this
fileobj = urllib2.urlopen(req, timeout=30, context=sslcontext)

it wont block forever even networking lost.


2. as a proof, the perl script `scritps/` has timeout and retry param.

? (qw(curl -f --connect-timeout 20 --retry 5 --location --insecure), shellwords($ENV{CURL_OPTIONS} || ''), $url)
: (qw(wget --tries=5 --timeout=20 --no-check-certificate --output-document=-), shellwords($ENV{WGET_OPTIONS} || ''), $url)


so, add timeout and retry option for `make download` please,
and apply to all process of downloading stuff operation (
include the 2 scripts above and others, e.g `git clone` etc.


Available keyboard shortcuts


Task Details

Task Editing