-
Notifications
You must be signed in to change notification settings - Fork 1k
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
mkswap01 is racing with udev and sometimes fails #458
Labels
Comments
Should the inode number be checked between calls to make sure that the loopback device has changed? |
Adding "udevadm trigger" before mkswap_verify should fix this issue. |
Sounds reasonable, would you mind to work out a patch to LTP ML? |
This has been solved via http://lists.linux.it/pipermail/ltp/2019-November/014366.html |
halstead
pushed a commit
to openembedded/openembedded-core
that referenced
this issue
Nov 13, 2019
Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
armcc
pushed a commit
to lgirdk/poky
that referenced
this issue
Nov 13, 2019
Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. (From OE-Core rev: 6a4b3bbdb3594ff7b6f81683765b6df76ed405e7) Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
halstead
pushed a commit
to openembedded/openembedded-core
that referenced
this issue
Nov 14, 2019
Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gbionescu
pushed a commit
to gbionescu/poky
that referenced
this issue
Nov 14, 2019
Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. (From OE-Core rev: 9d0bfa64d491c9bbef38c1530dc56386add12485) Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
jpuhlman
pushed a commit
to MontaVista-OpenSourceTechnology/poky
that referenced
this issue
Nov 14, 2019
Source: poky MR: 00000 Type: Integration Disposition: Merged from poky ChangeID: bf12fa8 Description: Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. (From OE-Core rev: 9d0bfa64d491c9bbef38c1530dc56386add12485) Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
daregit
pushed a commit
to daregit/yocto-combined
that referenced
this issue
May 22, 2024
…p01.sh Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. (From OE-Core rev: 9d0bfa64d491c9bbef38c1530dc56386add12485) Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
daregit
pushed a commit
to daregit/yocto-combined
that referenced
this issue
May 22, 2024
…p01.sh Swap verification sometimes fails due to race condition with udev. This is a known issue: linux-test-project/ltp#458. "udevadm trigger" forces udev to sync up device events with kernel. (From OE-Core rev: 9d0bfa64d491c9bbef38c1530dc56386add12485) Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mkswap01 is sporadically failing on aarch64 systems (kernel 4.18):
udev monitors /dev/loop0 with inotify and reacts to mkswap closing fd of loop device. This triggers some rules and while these run, watch is removed, then re-added back afterwards. So it appears that last "mkswap -U" in test comes in while inotify watch is disabled, and that causes udev to miss change of uuid.
If I add extra sleep to udev rules (on aarch64):
Then following 2 mkswap commands end up in same situation with stale link (on aarch64):
The timing is not universal across arches. For example on x86_64 I can reproduce it with "sleep 2" in udev rules and "sleep 1" between mkswap commands.
It is also easier to reproduce with LTP test when TMPDIR is backed by ramdisk - to make mkswap complete quickly.
My impression is that watch is dropped by design when udev rules run, so we likely need to add some sleeps to the test, so that udev is able to catch up.
[CC @wangli5665]
The text was updated successfully, but these errors were encountered: