Skip to content
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

TEST-64-UDEV-STORAGE-btrfs_basic failed in GitHub Actions #32913

Closed
yuwata opened this issue May 18, 2024 · 1 comment · Fixed by #32914 or #32963
Closed

TEST-64-UDEV-STORAGE-btrfs_basic failed in GitHub Actions #32913

yuwata opened this issue May 18, 2024 · 1 comment · Fixed by #32914 or #32963
Labels
bug 🐛 Programming errors, that need preferential fixing tests

Comments

@yuwata
Copy link
Member

yuwata commented May 18, 2024

https://github.com/systemd/systemd/actions/runs/9138387922/job/25129468084?pr=32907

gh run download 9138387922 --name ci-mkosi-9138387922-1-fedora-rawhide-failed-test-journals -D ci/ci-mkosi-9138387922-1-fedora-rawhide-failed-test-journals && journalctl --file ci/ci-mkosi-9138387922-1-fedora-rawhide-failed-test-journals/test/journal/TEST-64-UDEV-STORAGE-btrfs_basic.journal --no-hostname -o short-monotonic -u TEST-64-UDEV-STORAGE.service -p info
[   30.207497] TEST-64-UDEV-STORAGE.sh[633]: + echo 'Multiple devices: using LUKS encrypted disks, data: raid1, metadata: raid1, mixed mode'
[   30.213556] TEST-64-UDEV-STORAGE.sh[633]: Multiple devices: using LUKS encrypted disks, data: raid1, metadata: raid1, mixed mode
[   30.216679] TEST-64-UDEV-STORAGE.sh[633]: + uuid=deadbeef-dead-dead-beef-000000000003
[   30.226693] TEST-64-UDEV-STORAGE.sh[633]: + label=btrfs_mencdisk
[   30.228523] TEST-64-UDEV-STORAGE.sh[633]: + mpoint=/btrfs_enc22542
[   30.230601] TEST-64-UDEV-STORAGE.sh[633]: + mkdir /btrfs_enc22542
[   30.235902] TEST-64-UDEV-STORAGE.sh[633]: + dd if=/dev/urandom of=/etc/btrfs_keyfile bs=64 count=1 iflag=fullblock
[   30.242550] TEST-64-UDEV-STORAGE.sh[2358]: 1+0 records in
[   30.244214] TEST-64-UDEV-STORAGE.sh[2358]: 1+0 records out
[   30.248733] TEST-64-UDEV-STORAGE.sh[2358]: 64 bytes copied, 4.4073e-05 s, 1.5 MB/s
[   30.261382] TEST-64-UDEV-STORAGE.sh[633]: + chmod 0600 /etc/btrfs_keyfile
[   30.263379] TEST-64-UDEV-STORAGE.sh[633]: + :
[   30.264979] TEST-64-UDEV-STORAGE.sh[633]: + (( i = 0 ))
[   30.266640] TEST-64-UDEV-STORAGE.sh[633]: + (( i < 4 ))
[   30.268589] TEST-64-UDEV-STORAGE.sh[633]: + cryptsetup luksFormat -q --use-urandom --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --uuid deadbeef-dead-dead-beef-111111111110 --label encdisk0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefbtrfs0 /etc/btrfs_keyfile
[   30.457250] TEST-64-UDEV-STORAGE.sh[633]: + udevadm wait --settle --timeout=30 /dev/disk/by-uuid/deadbeef-dead-dead-beef-111111111110 /dev/disk/by-label/encdisk0
[   61.667830] reboot: Power down
@yuwata yuwata added bug 🐛 Programming errors, that need preferential fixing tests labels May 18, 2024
@yuwata
Copy link
Member Author

yuwata commented May 21, 2024

Still failed:
https://github.com/systemd/systemd/actions/runs/9176223179/job/25231015216

[   31.085420] TEST-64-UDEV-STORAGE.sh[494]: + echo 'Multiple devices: using LUKS encrypted disks, data: raid1, metadata: raid1, mixed mode'
[   31.089161] TEST-64-UDEV-STORAGE.sh[494]: Multiple devices: using LUKS encrypted disks, data: raid1, metadata: raid1, mixed mode
[   31.092924] TEST-64-UDEV-STORAGE.sh[494]: + uuid=deadbeef-dead-dead-beef-000000000003
[   31.095605] TEST-64-UDEV-STORAGE.sh[494]: + label=btrfs_mencdisk
[   31.098129] TEST-64-UDEV-STORAGE.sh[494]: + mpoint=/btrfs_enc9664
[   31.100533] TEST-64-UDEV-STORAGE.sh[494]: + mkdir /btrfs_enc9664
[   31.103032] TEST-64-UDEV-STORAGE.sh[494]: + dd if=/dev/urandom of=/etc/btrfs_keyfile bs=64 count=1 iflag=fullblock
[   31.334085] TEST-64-UDEV-STORAGE.sh[2127]: 1+0 records in
[   31.338494] TEST-64-UDEV-STORAGE.sh[2127]: 1+0 records out
[   31.343926] TEST-64-UDEV-STORAGE.sh[2127]: 64 bytes copied, 4.6647e-05 s, 1.4 MB/s
[   31.350159] TEST-64-UDEV-STORAGE.sh[494]: + chmod 0600 /etc/btrfs_keyfile
[   31.356996] TEST-64-UDEV-STORAGE.sh[494]: + :
[   31.359811] TEST-64-UDEV-STORAGE.sh[494]: + (( i = 0 ))
[   31.362717] TEST-64-UDEV-STORAGE.sh[494]: + (( i < 4 ))
[   31.364891] TEST-64-UDEV-STORAGE.sh[494]: + cryptsetup luksFormat -q --use-urandom --pbkdf pbkdf2 --pbkdf-force-iterations 1000 --uuid deadbeef-dead-dead-beef-111111111110 --label encdisk0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefbtrfs0 /etc/btrfs_keyfile
[   31.372969] TEST-64-UDEV-STORAGE.sh[494]: + udevadm wait --settle --timeout=30 /dev/disk/by-uuid/deadbeef-dead-dead-beef-111111111110 /dev/disk/by-label/encdisk0
[   62.508118] reboot: Power down
Finishing after writing 47072 entries
Test failed, relevant logs can be viewed with: 

gh run download 9176223179 --name ci-mkosi-9176223179-1-arch-rolling-failed-test-journals -D ci/ci-mkosi-9176223179-1-arch-rolling-failed-test-journals && journalctl --file ci/ci-mkosi-9176223179-1-arch-rolling-failed-test-journals/test/journal/TEST-64-UDEV-STORAGE-btrfs_basic.journal --no-hostname -o short-monotonic -u TEST-64-UDEV-STORAGE.service -p info

@yuwata yuwata reopened this May 21, 2024
yuwata added a commit to yuwata/systemd that referenced this issue May 21, 2024
yuwata added a commit to yuwata/systemd that referenced this issue May 21, 2024
On running cryptsetup, udevd detects two inotify events for the
underlying device. Running the test on enough fast host, the expected
symlinks based on UUID and disk label are created by the second event.

During processing a uevent for a device, udevd disables the inotify
watch for the device. If the test runs on slow system, the second
inotify event may comes during a udev worker processing the synthesized
uevent triggered by the first inotify event. Hence, no synthesized
uevent for the second inotify event will be generated, and the expected
symlinks will be never created.

To prevent the issue, we need to lock the device during cryptsetup
command is running.

Fixes systemd#32913.
mwilck pushed a commit to mwilck/systemd that referenced this issue May 28, 2024
On running cryptsetup, udevd detects two inotify events for the
underlying device. Running the test on enough fast host, the expected
symlinks based on UUID and disk label are created by the second event.

During processing a uevent for a device, udevd disables the inotify
watch for the device. If the test runs on slow system, the second
inotify event may comes during a udev worker processing the synthesized
uevent triggered by the first inotify event. Hence, no synthesized
uevent for the second inotify event will be generated, and the expected
symlinks will be never created.

To prevent the issue, we need to lock the device during cryptsetup
command is running.

Fixes systemd#32913.

(cherry picked from commit be43c9b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing tests
1 participant