DEP8 failure on arm64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
rust-loopdev (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
rust-loopdev in mantic has been failing[1] on arm64. Here is one example[2]:
864s ---- detach_
864s thread 'detach_
864s left: `0`,
864s right: `1`: there should be no loopback devices mounted', tests/integrati
That test looks pretty simple. It counts how many loop devices are at the start, attaches a backing file, checks, detaches, and counts the number of attached loop devices at the end. Both counts should be equal.
But, according to the test failure, they are not.
I patched the function the test uses with some println() debug statements, and it looks like this:
fn detach_
let num_devices_
println!("XXX num_devices_
println!("XXX list_device(
let _lock = setup();
println!("XXX start list_device(None): {:?}, len={}, var={}", list_device(None), list_device(
{
let file = create_
offset,
);
let ld0 = LoopDevice:
};
std:
println!("XXX end list_device(None): {:?}, num_devices_
assert_eq!(
"there should be no loopback devices mounted"
);
detach_all();
}
And, when it fails, this is the output:
---- detach_
XXX num_devices_
XXX list_device(
XXX start list_device(None): [LoopDeviceOutput { name: "/dev/loop1", size_limit: Some(0), offset: Some(0), back_file: Some("/
XXX end list_device(None): [LoopDeviceOutput { name: "/dev/loop1", size_limit: Some(0), offset: Some(0), back_file: Some("/
thread 'detach_
left: `3`,
right: `4`: there should be no loopback devices mounted', tests/integrati
Something is changing the list_device(None) output under our feet, as the test runs. The test starts with 4, and right after "let _lock = setup();", it's 3. This doesn't happen always.
1. https:/
2. https:/
Ok, maybe the fix is as simple as moving the lock to the start of the function, before list_device() is called?