From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/5] download: add a timeout and use a more fine-grained locking heuristic
Date: Wed, 22 Aug 2018 23:10:55 +0200 [thread overview]
Message-ID: <cover.1534972250.git.yann.morin.1998@free.fr> (raw)
Hello All!
Currently, the dl-wrapper locks the package download directory,
effectively serialising access to that directory.
This is done to protect the git cache directory from being accessed by
two concurrent Buildroot builds, because the access pattern to the git
cache is not atomic.
However, all the other download backends are atomic, as the download
wrapper ensures they only ever work on temporary files and directories,
with only the final rename being atomic by itself.
Thus, the current locking policy effectively prevents other downloads
for that package from another Buildroot run, to run in parallel when
they would perfectly be able to do so without issue.
Furthermore, if the remote site is really damn slow, or blocks for
whatever reason, or we can't acquire the lock for whatever other reason,
the whole download can be stuck for, like, forever.
This series moves the locking into the git backend and the download
wrapper, to protect just what needs to be protected. Finally, a timeout
is added, so that the next download method, if any, is attempted as a
fallback.
Regards,
Yann E. MORIN.
The following changes since commit b3c1f0869645b136b9399d7a93acca65957e0bfe
DEVELOPERS: add mender to Mirza Krak (2018-08-22 13:14:26 +0200)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 17a71c0c569e1b66a46ef40f14f07db8adf847b9
utils/genrandconfig: add a 30-minute timeout (2018-08-22 22:10:33 +0200)
----------------------------------------------------------------
Yann E. MORIN (5):
download/git: fix code-style
download/git: re-run the backend with a lock to the git tree
download: move locking into download wrapper
core/download: add per-download timeout
utils/genrandconfig: add a 30-minute timeout
Config.in | 14 ++++++++++++++
package/pkg-download.mk | 4 ++--
support/download/dl-wrapper | 31 +++++++++++++++++++++----------
support/download/git | 32 ++++++++++++++++++++++++++++++--
utils/genrandconfig | 3 +++
5 files changed, 70 insertions(+), 14 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next reply other threads:[~2018-08-22 21:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-22 21:10 Yann E. MORIN [this message]
2018-08-22 21:10 ` [Buildroot] [PATCH 1/5] download/git: fix code-style Yann E. MORIN
2018-09-10 20:44 ` Thomas Petazzoni
2018-08-22 21:10 ` [Buildroot] [PATCH 2/5] download/git: re-run the backend with a lock to the git tree Yann E. MORIN
2018-09-10 20:52 ` Thomas Petazzoni
2018-10-14 12:54 ` Yann E. MORIN
2018-10-20 22:11 ` Arnout Vandecappelle
2018-10-22 21:12 ` Yann E. MORIN
2018-10-22 22:11 ` Arnout Vandecappelle
2018-08-22 21:10 ` [Buildroot] [PATCH 3/5] download: move locking into download wrapper Yann E. MORIN
2018-08-22 21:10 ` [Buildroot] [PATCH 4/5] core/download: add per-download timeout Yann E. MORIN
2018-09-10 20:55 ` Thomas Petazzoni
2018-10-14 13:07 ` Yann E. MORIN
2018-10-20 21:49 ` Arnout Vandecappelle
2018-08-22 21:10 ` [Buildroot] [PATCH 5/5] utils/genrandconfig: add a 30-minute timeout Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1534972250.git.yann.morin.1998@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox