-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Build error: Unable to find free loop device #6417
Comments
Jira ticket: AR-2108 |
deleting the |
Still getting this issue after failed builds :- https://paste.armbian.com/yarohanuzi @igorpecovnik - Its like loop devices are not being freed if a build fails ! |
I will install another version of Ubuntu on a new drive and test whether the problem is specific to this install or not. This seems to solve the issue temporarily. How to clean up old Snap revisions and remove loop devices :- https://ashrafur.medium.com/how-to-clean-up-old-snap-revisions-and-remove-loop-devices-93e38f1ad1f8 |
Same here, clear cache don't help $ lsb_release -a $ uname -a Clean install linux solve.... |
This loop devices problem is related to host and its kernel. 6.5.x kernel with Jammy should work (better). We have many build runners, some on stock Jammy, some on Armbian Jammy, thus with our kernel. Perhaps try this https://github.com/armbian/sdk ... /dev/loop devices makes us troubles too, here and there, automation breaks in random manner due to that and which is why we need to repeate few builds here and there. Also check if you have enough of those loop devices. I have added |
It only works once after fresh install and reboot doesn't help?? |
reboot with clean armbian cache doesn't help i Was trying to build: JP_TVBOX 3566 on V6.6 with jammy 22.04 desktop cinnamon today I will use the armbian v24.0.2 and so far, so good (first run OK) 15:11 GMT git clone --depth 1 --branch v24.0.2 https://github.com/armbian/build armbian |
First try some officially supported target like generic x86 / arm64 image. tvboxes are untested ... |
Hello everyone, and thanks for this awesome project. I tested with a Pop!_OS host (Ubuntu 22.04) and found that it cannot find a free loop when using the main branch. It works fine if you checkout to v24.0.2. Also, I found that building using docker works on the main branch (on my machine) when I modified line 229 in the partitioning.sh file. I changed the old amount (10) to 30:
A |
you have a point! but the V24.02 solve everything I will start to advice the unnoficial people and the chinese shitboxes to use this: git clone --depth 1 --branch v24.0.2 https://github.com/armbian/build armbian |
Also having this issue on ubuntu 22.04 jammy, kernel 6.5.0-26-generic . I gave no commandline argument to ./compile.sh. My target was the Le Potato board and I had just loaded a .config that I previously saved. I saw this loopback error after 2 hours, seemed the kernel compiled OK otherwise. I will give branch v24.0.2 a try: Update: Update (solution): I unmounted firefox and the snap store. For good measure, I also added the line I didn't confirm if that had any effect, but it worked. Was able to complete the build. I am using Ubuntu Desktop, perhaps the Ubuntu server image wouldn't have had this issue. |
I found a solution to my issue it appears snaps was causing an issue with eating loop devices on my machine :- https://ashrafur.medium.com/how-to-clean-up-old-snap-revisions-and-remove-loop-devices-93e38f1ad1f8 |
This worked for me. Snap did not have any dangling loop devices on my laptop but allowing it to continue to look for an available loopback to use allowed my build to work thanks so much. I think a hardcoded limit of 10 might be a bad assumption but im not qualified to say. |
Me to! |
@igorpecovnik please can you look into @edumeneses solution #6417 (comment) and see if solves this issue so we can close it ? |
So, I get this problem too, so we shouldn't close this ticket until we fix it on master. Just counting the number of loop devices seem to be a bad way to check if armbian has created too many of those. Like previous users, I have 20+ from snap. I'll try and see if the partitioning.sh patch helps on my Ubuntu 23.10 system. |
|
Lol. I meant the main branch, whatever it's called :-) I am running on main, and the patch did help me. :-) |
I had similar issues where deleting the cache folder did not always help. ./compile.sh build BOARD=pine64 BOOTSIZE=300 BRANCH=edge BTRFS_COMPRESSION=zlib BUILD_DESKTOP=no BUILD_MINIMAL=no FIXED_IMAGE_SIZE=7000 INSTALL_HEADERS=yes KERNEL_CONFIGURE=no RELEASE=noble ROOTFS_TYPE=btrfs SEVENZIP=no |
here is a build test on my setup: ./compile.sh build BOARD=bananapim5 BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm ./compile.sh build BOARD=bananapim5 BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm FIXED_IMAGE_SIZE=7000 ./compile.sh build BOARD=bananapim5 BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm BOOTSIZE=300 FIXED_IMAGE_SIZE=7000 ROOTFS_TYPE=ext4 system: Ubuntu Mantic in Virtualbox, 12880MB Ram, 16Cores, 6.6.29-060629-generic |
I use Ubuntu 22.04 and this worked for me, thank you very much. |
I can't build it in ubuntu 22.04, getting this same issue. |
On "ubuntu 22.04" this is not possible to reproduce. Without logs, there is nothing we can do as we are at "it works on our computer" levels ;) Make sure you are using clean stock Ubuntu install with all updates. This is what our CI runs. If you have some software installed, that can eat out loops ... curse of snapd. Fedora on the other hand is not officially supported, but its probably lack of loop devices at all or lack of capacity - not sufficient number of them. |
I run in the same issue again without using FIXED_IMAGE_SIZE=7000 and there is a hint as to why this is happening. Command to list all loop devices => Command to list an empty one => Guessing one loop device is quite problem when armbian build script needs at least 2, one for boot and second for root filesystem. |
[🌱] Enabling command-not-found after build-time [ tinkerboard-2:noble-current ] |
log says freeing Freeing loop device [ /dev/loop13 ] after finishing all this I run these commands: $ losetup -a So for me device 13 was taken already because when build script finished this loop device is taken with snapd. |
Evil of snap :( Many of us are using snapd free Armbian Ubuntu where this problem doesn't happen. For machines, where we build in parallel, I had to add max_loop to kernel command line: GRUB_CMDLINE_LINUX_DEFAULT=" console=tty1 max_loop=96"
Here even snap can't hurt ;) |
Great, applied. |
Pre-allocation of 96 loop devices greatly increases chances of success, but this race condition could be prevented altogether by atomic find&take ( |
Fixed here :- #6729 (review) |
What happened?
I built a CSC image which fails: BananaPi M3:-
https://paste.armbian.com/pejewuyoha
then all other builds fail after this even after a build system reset :-
https://paste.armbian.com/evururohol
How to reproduce?
Branch
main (main development branch)
On which host OS are you running the build script and observing this problem?
Ubuntu 22.04 Jammy
Are you building on Windows WSL2?
Relevant log URL
https://paste.armbian.com/evururohol
Code of Conduct
The text was updated successfully, but these errors were encountered: