-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partitioning: fix race condition on loop device allocation #6729
Conversation
I know initial hack was not the best, but will this change survive building of lets say 50 images in parallel on one build host? |
From
So I think this is more or less equivalent to the current solution (I was wrong that it is truly atomic). |
It looks like #6568 will be also fixed by this PR |
@igorpecovnik This patch works and should really have been in the last release : | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this has been preventing me from building on any ubuntu platform, I've tested and have been using this fix for a while. It works well.
I realize this fix may not be perfect, but the number of people reporting that they can't build due to the broken existing code on Ubuntu hosts with snaps taking up all the pre-allocated loop devices is a big problem. This fixes the basic build case. Will it have issues in the pararllel build environment? maybe, but the trade off is for many users of the build framework being able to build vs the one case of the armbian infrastructure building in parallel failing. I personally vote for the users builds working. Thus why I approved and merged this in. |
Na its a great fix, worked first time and removes a rather dodgy loop structure. |
All my 11 loops are occupied by snapd, so I made some change to lib/functions/image/partitioning.sh.
|
On host machine try adding max_loop=xx to the kernel CMDLINE. This is mine: GRUB_CMDLINE_LINUX_DEFAULT=" console=tty1 splash=verbose max_loop=96 i915.force_probe=* resume=UUID=bef2d749-9136-481e |
There's a fix higher up if you read this to thread
…On Fri, 26 Jul 2024, 08:52 Igor, ***@***.***> wrote:
On host machine try adding max_loop=xx to the kernel CMDLINE. This is mine:
GRUB_CMDLINE_LINUX_DEFAULT=" console=tty1 splash=verbose *max_loop=96*
i915.force_probe=* resume=UUID=bef2d749-9136-481e
-9934-d9038c6bd0b3 resume_offset=12032000"
—
Reply to this email directly, view it on GitHub
<#6729 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAU4E27L76SPLVFOZYYOS3ZOH537AVCNFSM6AAAAABJFCIO56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGE3TMNJQGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
Find and take loop device in one shot to prevent race condition
How Has This Been Tested?
Checklist: