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-38-FREEZER is flaky in Github Actions #32746

Closed
DaanDeMeyer opened this issue May 10, 2024 · 2 comments · Fixed by #32782
Closed

TEST-38-FREEZER is flaky in Github Actions #32746

DaanDeMeyer opened this issue May 10, 2024 · 2 comments · Fixed by #32782
Labels
bug 🐛 Programming errors, that need preferential fixing

Comments

@DaanDeMeyer
Copy link
Contributor

systemd version the issue has been seen with

main

Used distribution

No response

Linux kernel version used

No response

CPU architectures issue was seen on

None

Component

No response

Expected behaviour you didn't see

No response

Unexpected behaviour you saw

https://github.com/systemd/systemd/actions/runs/9029781648/job/24812788923?pr=32744

gh run download 9029781648 --name ci-mkosi-9029781648-1-opensuse-tumbleweed-failed-test-journals -D ci/ci-mkosi-9029781648-1-opensuse-tumbleweed-failed-test-journals && journalctl --file ci/ci-mkosi-9029781648-1-opensuse-tumbleweed-failed-test-journals/test/journal/TEST-38-FREEZER.journal --no-hostname -o short-monotonic -u testsuite-38.service -p info

Steps to reproduce the problem

No response

Additional program output to the terminal or log subsystem illustrating the issue

24/57 systemd:integration-tests / TEST-38-FREEZER               FAIL             17.93s   exit status 1
>>> MALLOC_PERTURB_=110 SYSTEMD_INTEGRATION_TESTS=1 /home/runner/work/systemd/systemd/test/integration-test-wrapper.py --meson-source-dir /home/runner/work/systemd/systemd --meson-build-dir /mnt/mkosi/build --test-name TEST-38-FREEZER --test-number 38 --storage volatile --firmware linux --
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
Listing only the last 100 lines from a long log.
[   10.977797] testsuite-38.sh[672]: + name=baz
[   10.978834] testsuite-38.sh[672]: + object_path=/org/freedesktop/systemd1/unit/baz_2eservice
[   10.980775] testsuite-38.sh[672]: + for _ in {0..10}
[   10.982141] testsuite-38.sh[791]: ++ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/baz_2eservice org.freedesktop.systemd1.Unit FreezerState
[   10.985845] testsuite-38.sh[792]: ++ cut -d ' ' -f2
[   10.987389] testsuite-38.sh[793]: ++ tr -d '"'
[   10.988617] testsuite-38.sh[672]: + state=frozen-by-parent
[   10.989851] testsuite-38.sh[672]: + [[ frozen-by-parent =~ ^(freezing|thawing)$ ]]
[   10.991575] testsuite-38.sh[672]: + break
[   10.992567] testsuite-38.sh[672]: + '[' frozen-by-parent = frozen-by-parent ']'
[   10.994196] testsuite-38.sh[672]: + check_cgroup_state bar.slice/ 1
[   10.995653] testsuite-38.sh[672]: + local slice unit
[   10.996813] testsuite-38.sh[672]: + unit=
[   10.998058] testsuite-38.sh[672]: + slice=bar.slice/
[   10.999327] testsuite-38.sh[672]: + slice=bar.slice
[   11.000350] testsuite-38.sh[672]: + grep -q 'frozen 1' /sys/fs/cgroup/bar.slice/./cgroup.events
[   11.002786] testsuite-38.sh[672]: + check_cgroup_state bar.slice/baz.service 1
[   11.004827] testsuite-38.sh[672]: + local slice unit
[   11.006231] testsuite-38.sh[672]: + unit=baz.service
[   11.007708] testsuite-38.sh[672]: + slice=bar.slice/
[   11.009250] testsuite-38.sh[672]: + slice=bar.slice
[   11.010771] testsuite-38.sh[672]: + grep -q 'frozen 1' /sys/fs/cgroup/bar.slice/baz.service/cgroup.events
[   11.013643] testsuite-38.sh[672]: + systemctl thaw bar.slice
[   11.015374] testsuite-38.sh[672]: + check_freezer_state bar.slice running
[   11.017138] testsuite-38.sh[672]: + local name object_path suffix
[   11.018982] testsuite-38.sh[672]: + suffix=slice
[   11.020883] testsuite-38.sh[672]: + name=bar
[   11.022270] testsuite-38.sh[672]: + object_path=/org/freedesktop/systemd1/unit/bar_2eslice
[   11.024521] testsuite-38.sh[672]: + for _ in {0..10}
[   11.026545] testsuite-38.sh[798]: ++ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/bar_2eslice org.freedesktop.systemd1.Unit FreezerState
[   11.031620] testsuite-38.sh[799]: ++ cut -d ' ' -f2
[   11.033748] testsuite-38.sh[800]: ++ tr -d '"'
[   11.036089] testsuite-38.sh[672]: + state=running
[   11.037793] testsuite-38.sh[672]: + [[ running =~ ^(freezing|thawing)$ ]]
[   11.039893] testsuite-38.sh[672]: + break
[   11.041185] testsuite-38.sh[672]: + '[' running = running ']'
[   11.042983] testsuite-38.sh[672]: + check_freezer_state baz.service running
[   11.045089] testsuite-38.sh[672]: + local name object_path suffix
[   11.047543] testsuite-38.sh[672]: + suffix=service
[   11.049720] testsuite-38.sh[672]: + name=baz
[   11.051095] testsuite-38.sh[672]: + object_path=/org/freedesktop/systemd1/unit/baz_2eservice
[   11.054223] testsuite-38.sh[672]: + for _ in {0..10}
[   11.056358] testsuite-38.sh[802]: ++ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/baz_2eservice org.freedesktop.systemd1.Unit FreezerState
[   11.061543] testsuite-38.sh[804]: ++ tr -d '"'
[   11.062892] testsuite-38.sh[803]: ++ cut -d ' ' -f2
[   11.064430] testsuite-38.sh[672]: + state=running
[   11.065716] testsuite-38.sh[672]: + [[ running =~ ^(freezing|thawing)$ ]]
[   11.067614] testsuite-38.sh[672]: + break
[   11.068826] testsuite-38.sh[672]: + '[' running = running ']'
[   11.070202] testsuite-38.sh[672]: + check_cgroup_state bar.slice/ 0
[   11.071929] testsuite-38.sh[672]: + local slice unit
[   11.073379] testsuite-38.sh[672]: + unit=
[   11.074540] testsuite-38.sh[672]: + slice=bar.slice/
[   11.076027] testsuite-38.sh[672]: + slice=bar.slice
[   11.077450] testsuite-38.sh[672]: + grep -q 'frozen 0' /sys/fs/cgroup/bar.slice/./cgroup.events
[   11.079699] testsuite-38.sh[672]: + check_cgroup_state bar.slice/baz.service 0
[   11.081683] testsuite-38.sh[672]: + local slice unit
[   11.083111] testsuite-38.sh[672]: + unit=baz.service
[   11.084572] testsuite-38.sh[672]: + slice=bar.slice/
[   11.085985] testsuite-38.sh[672]: + slice=bar.slice
[   11.087471] testsuite-38.sh[672]: + grep -q 'frozen 0' /sys/fs/cgroup/bar.slice/baz.service/cgroup.events
[   11.089874] testsuite-38.sh[672]: + echo '[ OK ]'
[   11.091286] testsuite-38.sh[672]: [ OK ]
[   11.092454] testsuite-38.sh[672]: + echo -n '  - child promoted and not thawed by parent: '
[   11.094618] testsuite-38.sh[672]:   - child promoted and not thawed by parent: + systemctl freeze bar.slice
[   11.097100] testsuite-38.sh[672]: + check_freezer_state bar.slice frozen
[   11.098910] testsuite-38.sh[672]: + local name object_path suffix
[   11.100701] testsuite-38.sh[672]: + suffix=slice
[   11.102056] testsuite-38.sh[672]: + name=bar
[   11.103419] testsuite-38.sh[672]: + object_path=/org/freedesktop/systemd1/unit/bar_2eslice
[   11.105482] testsuite-38.sh[672]: + for _ in {0..10}
[   11.107362] testsuite-38.sh[811]: ++ tr -d '"'
[   11.108774] testsuite-38.sh[809]: ++ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/bar_2eslice org.freedesktop.systemd1.Unit FreezerState
[   11.112692] testsuite-38.sh[810]: ++ cut -d ' ' -f2
[   11.114200] testsuite-38.sh[672]: + state=frozen
[   11.115421] testsuite-38.sh[672]: + [[ frozen =~ ^(freezing|thawing)$ ]]
[   11.116942] testsuite-38.sh[672]: + break
[   11.117979] testsuite-38.sh[672]: + '[' frozen = frozen ']'
[   11.119151] testsuite-38.sh[672]: + check_freezer_state baz.service frozen-by-parent
[   11.120816] testsuite-38.sh[672]: + local name object_path suffix
[   11.122258] testsuite-38.sh[672]: + suffix=service
[   11.123531] testsuite-38.sh[672]: + name=baz
[   11.124771] testsuite-38.sh[672]: + object_path=/org/freedesktop/systemd1/unit/baz_2eservice
[   11.126898] testsuite-38.sh[672]: + for _ in {0..10}
[   11.128527] testsuite-38.sh[813]: ++ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/baz_2eservice org.freedesktop.systemd1.Unit FreezerState
[   11.132514] testsuite-38.sh[814]: ++ cut -d ' ' -f2
[   11.134147] testsuite-38.sh[815]: ++ tr -d '"'
[   11.135572] testsuite-38.sh[672]: + state=freezing-by-parent
[   11.137169] testsuite-38.sh[672]: + [[ freezing-by-parent =~ ^(freezing|thawing)$ ]]
[   11.139175] testsuite-38.sh[672]: + break
[   11.140424] testsuite-38.sh[672]: + '[' freezing-by-parent = frozen-by-parent ']'
[   11.142361] testsuite-38.sh[672]: + echo 'error: unexpected freezer state, expected: frozen-by-parent, actual: freezing-by-parent'
[   11.145305] testsuite-38.sh[672]: error: unexpected freezer state, expected: frozen-by-parent, actual: freezing-by-parent
[   11.148048] testsuite-38.sh[672]: + exit 1
[   11.832122][    T1] reboot: Power down
@DaanDeMeyer DaanDeMeyer added the bug 🐛 Programming errors, that need preferential fixing label May 10, 2024
@DaanDeMeyer
Copy link
Contributor Author

cc @AdrianVovk

@AdrianVovk
Copy link
Contributor

So looks like this is the flaky line:

[[ "$state" =~ ^(freezing|thawing)$ ]] || break

Which evaluates to:

[[ freezing-by-parent =~ ^(freezing|thawing)$ ]]

I think the regex is wrong. We should also check for freezing-by-parent, or change the regex to match on ^(freezing|thawing) (sans the $)

(Am traveling, so don't have the ability to contribute the fix right now)

DaanDeMeyer added a commit to DaanDeMeyer/systemd that referenced this issue May 13, 2024
The state might be "freezing-by-parent" as well so let's take that
into account.

Fixes systemd#32746
DaanDeMeyer added a commit that referenced this issue May 13, 2024
The state might be "freezing-by-parent" as well so let's take that
into account.

Fixes #32746
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
Development

Successfully merging a pull request may close this issue.

2 participants