Bug 15952

Summary: AB-INT: rust.RustSelfTestSystemEmulated.test_rust failure: file_lock_drop
Product: [QA/Testing] Functional (self) Testing Reporter: Mathieu Dubois-Briand <mathieu.dubois-briand>
Component: oe-selftestAssignee: Deepesh Varatharajan <deepesh.varatharajan>
Status: ACCEPTED --- QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod, sundeep.kokkonda, SunilKumar.Dora
Version: unspecified   
Target Milestone: 6.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Mathieu Dubois-Briand 2025-08-13 12:08:54 UTC
2025-08-10 13:26:53,145 - oe-selftest - INFO - rust.RustSelfTestSystemEmulated.test_rust (subunit.RemotedTestCase)
2025-08-10 13:26:53,168 - oe-selftest - INFO -  ... FAIL
...
AssertionError: Command 'export TARGET_VENDOR="-poky"; export PATH=/srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/work/cortexa57-poky-linux/rust/1.88.0/recipe-sysroot-native/usr/bin/python3-native:/srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/work/cortexa57-poky-linux/rust/1.88.0/recipe-sysroot-native/usr/bin:/srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/work/cortexa57-poky-linux/rust/1.88.0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/hosttools:$PATH; export RUST_TARGET_PATH=/srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/work/cortexa57-poky-linux/rust/1.88.0/rust-targets; export TEST_DEVICE_ADDR="192.168.7.2:12345"; cd /srv/pokybuild/yocto-worker/qemuarm64-tc/build/build-st-1891362/tmp/work/cortexa57-poky-linux/rust/1.88.0/sources/rustc-1.88.0-src; python3 src/bootstrap/bootstrap.py test  --exclude src/bootstrap  --exclude src/doc/rustc  --exclude src/doc/rustdoc  --exclude src/doc/unstable-book  --exclude src/etc/test-float-parse  --exclude src/librustdoc  --exclude src/rustdoc-json-types  --exclude src/tools/coverage-dump  --exclude src/tools/jsondoclint  --exclude src/tools/lint-docs  --exclude src/tools/replace-version-placeholder  --exclude src/tools/rust-analyzer  --exclude src/tools/rustdoc-themes  --exclude src/tools/rust-installer  --exclude src/tools/suggest-tests  --exclude src/tools/tidy  --exclude tests/assembly/asm/aarch64-outline-atomics.rs  --exclude tests/codegen/issues/issue-122805.rs  --exclude tests/codegen/thread-local.rs  --exclude tests/mir-opt/  --exclude tests/run-make  --exclude tests/run-make-fulldeps  --exclude tests/rustdoc  --exclude tests/rustdoc-json  --exclude tests/rustdoc-js-std  --exclude tests/ui/abi/stack-probes-lto.rs  --exclude tests/ui/abi/stack-probes.rs  --exclude tests/ui/codegen/mismatched-data-layouts.rs  --exclude tests/codegen/rust-abi-arch-specific-adjustment.rs  --exclude tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs  --exclude tests/ui/feature-gates/version_check.rs  --exclude tests/ui-fulldeps/  --exclude tests/ui/process/nofile-limit.rs  --exclude tidyselftest --no-fail-fast --bless --target aarch64-poky-linux-gnu' returned non-zero exit status 1:
...
test fs::tests::file_lock_drop ... FAILED

Similar to https://bugzilla.yoctoproject.org/show_bug.cgi?id=15180
Comment 1 Mathieu Dubois-Briand 2025-08-13 12:15:59 UTC
qemuarm64-tc fedora40-vk-2 master-next completed at 2025-08-10 14:08:11+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/5/builds/2103/steps/12/logs/stdio
Comment 2 Randy MacLeod 2025-08-14 14:40:11 UTC
Medium unless this happens frequently in the AB.
Comment 3 Randy MacLeod 2026-02-12 16:25:04 UTC
Not seen for ~ 6 months and rust has changed quite a bit.
Comment 4 Mathieu Dubois-Briand 2026-04-17 08:33:33 UTC
New occurrence coming in next message.
Comment 5 Mathieu Dubois-Briand 2026-04-17 08:38:13 UTC
qemux86-64-tc opensuse160-vk-2 master&master-next completed at 2026-04-17 00:08:26+00:00
https://valkyrie.yocto.io/pub/non-release/20260416-119/testresults/qemux86-64-tc/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/66/builds/3676/steps/13/logs/stdio
Comment 6 Randy MacLeod 2026-04-17 13:57:43 UTC
Sundeep, Please assign and investigate this intermittent issue.
Comment 7 Mathieu Dubois-Briand 2026-08-06 11:37:30 UTC
qemuarm64-tc alma9-vk-2 master-next&master completed at 2026-08-04 22:54:15+00:00
https://valkyrie.yocto.io/pub/non-release/20260804-121/testresults/qemuarm64-tc/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/5/builds/4266/steps/16/logs/stdio
Comment 8 Mathieu Dubois-Briand 2026-10-02 12:32:12 UTC
qemuarm-tc debian12-vk-8 master completed at 2026-10-02 05:05:37+00:00
https://valkyrie.yocto.io/pub/non-release/20261002-8/testresults/qemuarm-tc/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/42/builds/4730/steps/15/logs/stdio

We have some log, not sure it's relevant:
Logged in as root in serial console
Data received serial thread [
Data received serial thread 1043.840622] _
Data received serial thread _vm_enough_memory: pid:
Data received serial thread 3091, co
Data received serial thread mm: str
Data received serial thread ing::tes
Data received serial thread t_tr, b
Data received serial thread ytes:
Data received serial thread  214748
Data received serial thread 7744 no
Data received serial thread t enoug
Data received serial thread h memor
Data received serial thread y for t
Data received serial thread he al
Data received serial thread locatio
Data received serial thread n
...

Which decodes as:
[ 1043.840622] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.841389] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147618816 not enough memory for the allocation
[ 1043.841918] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.842493] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.856916] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.859160] __vm_enough_memory: pid: 3092, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.860023] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147618816 not enough memory for the allocation
[ 1043.861749] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.862824] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147487744 not enough memory for the allocation
[ 1043.864097] __vm_enough_memory: pid: 3091, comm: string::test_tr, bytes: 2147618816 not enough memory for the allocation
[ 1257.802008] __vm_enough_memory: 99callbackssuppressed
[ 1257.802156] __vm_enough_memory: pid: 7502, comm: collections::ha, bytes: 1610616832 not enough memory for the allocation
[ 1257.822136] __vm_enough_memory: pid: 7502, comm: collections::ha, bytes: 1610616832 not enough memory for the allocation
[ 1257.829444] __vm_enough_memory: pid: 7502, comm: collections::ha, bytes: 1610743808 not enough memory for the allocation
[ 1257.830268] __vm_enough_memory: pid: 7502, comm: collections::ha, bytes: 1610747904 not enough memory for the allocation
[ 1862.240355] __vm_enough_memory: pid: 12392, comm: thread_pool::te, bytes: 2147487744 not enough memory for the allocation
Comment 9 Deepesh Varatharajan 2026-10-14 04:13:10 UTC
The test opens the same file through two independent file handles, f1 and f2. After acquiring a shared lock on f1, the test verifies that f2 cannot acquire a lock. Once f1 is dropped, f2 is expected to acquire the lock, but this intermittently fails with WouldBlock.

We have not been able to reproduce the issue in our local environment. We suspect a possible timing-related issue. We will investigate further.