-
Notifications
You must be signed in to change notification settings - Fork 140
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
Native arm64 builds: loop device woes #522
Comments
Oh. I think we need this: freddierice/go-losetup@d9566aa And also, if Attach() fails, we should retry like losetup does: |
We were stuck in 2017 (v1.0.0-20170407175016-fc9adea44124). Related: go-debos#522
That should be solved with #523 right ?
We do something similar for closing the loop device, perhaps you could use that as inspiration ? I am happy to take fixes around this if it helps your usecase, even though |
Yes #523 will pull in the go-losetup fix. The reason I am using |
losetup.Attach() can fail due to concurrent attaches in other processes as seen in go-debos#522 . The problem is a race condition between finding a free loop device and attaching the image. Now that we have go-losetup v2, which does report the error, we can do what util-linux does ( https://github.com/util-linux/util-linux/blob/4c4b248c68149089c8be2f830214bb2be693307e/sys-utils/losetup.c#L662 ) and retry on failure. I only sleep for 200 ms as opposed to 1 second as in https://github.com/go-debos/debos/blob/78aad24dc068ec2aac0355c165f760b953379b8f/actions/image_partition_action.go#L668 because the race condition should immediately resolve without waiting at all. I still sleep for 200 ms as this is what util-linux does to prevent spinning ( util-linux/util-linux@3ff6fb8 ). Fixes: go-debos#522
losetup.Attach() can fail due to concurrent attaches in other processes as seen in go-debos#522 . The problem is a race condition between finding a free loop device and attaching the image. Now that we have go-losetup v2, which does report the error, we can do what util-linux does ( https://github.com/util-linux/util-linux/blob/4c4b248c68149089c8be2f830214bb2be693307e/sys-utils/losetup.c#L662 ) and retry on failure. I only sleep for 200 ms as opposed to 1 second as in https://github.com/go-debos/debos/blob/78aad24dc068ec2aac0355c165f760b953379b8f/actions/image_partition_action.go#L668 because the race condition should immediately resolve without waiting at all. I still sleep for 200 ms as this is what util-linux does to prevent spinning ( util-linux/util-linux@3ff6fb8 ). Fixes: go-debos#522
We run debos on arm64 with
--disable-fakemachine
on our RK3588-based SBC ( https://embedded.cherry.de/product/jaguar-sbc-rk3588/ ). If relevant, recipes and build script are here: https://git.embedded.cherry.de/debos-recipes.git/tree/We run 4 builds concurrently and it works quite well, thank you!
However, every 20 builds or so, we get a loop device related failure. Examples:
Have you seen something like this already?
The text was updated successfully, but these errors were encountered: