You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TEST-37-RUNTIMEDIRECTORYPRESERVE gets stuck on focal-s390x, focal-ppc64el #21458
bug 🐛Programming errors, that need preferential fixingregression ⚠️A bug in something that used to work correctly and broke through some recent committests
For a couple of weeks now s390x and ppc64el runs of integration tests seem to timeout pretty consistently (but not 100% of the time). Adding some timestamps (#21455), it seems the whole test suite runs in a few minutes, but then gets stuck for ~3 hours:
It's running the same check for the various directory types - is the daemon-reload the issue? I can make it change the unit name, that should not require a daemon-reload anymore then
It's running the same check for the various directory types - is the daemon-reload the issue? I can make it change the unit name, that should not require a daemon-reload anymore then
Ahh, nevermind, I completely missed it's in a function, sigh. I'll continue looking...
changed the title [-]TEST-34-DYNAMICUSERMIGRATE gets stuck on focal-s390x, focal-ppc64el[/-][+]TEST-37-RUNTIMEDIRECTORYPRESERVE gets stuck on focal-s390x, focal-ppc64el[/+]on Nov 24, 2021
System is tainted: cgroupsv1
Starting /etc/rc.local Compatibility...
Starting User Login Management...
Starting Permit User Sessions...
Starting TEST-37-RUNTIMEDIRECTORYPRESERVE...
[ 572.550911] rc.local[26]: /etc/rc.local: 2: iptables: not found
[ OK ] Started /etc/rc.local Compatibility.
[ OK ] Finished Permit User Sessions.
[ OK ] Started Console Getty.
[ OK ] Reached target Login Prompts.
[ 572.574139] testsuite-37.sh[30]: + set -o pipefail
[ 572.574261] testsuite-37.sh[30]: + systemd-mount -p RuntimeDirectory=hoge -p RuntimeDirectoryPreserve=yes -t tmpfs tmpfs /tmp/aaa
Mounting /tmp/aaa...
[ OK ] Mounted /tmp/aaa.
[ 572.592839] testsuite-37.sh[32]: Started unit tmp-aaa.mount for mount point: /tmp/aaa
[ 572.593125] testsuite-37.sh[30]: + touch /run/hoge/foo
[ 572.598720] testsuite-37.sh[30]: + touch /tmp/aaa/bbb
[ 572.608309] testsuite-37.sh[30]: + systemctl restart tmp-aaa.mount
Unmounting /tmp/aaa...
tmp-aaa.mount: Deactivated successfully.
[ OK ] Unmounted /tmp/aaa.
[ OK ] Started D-Bus System Message Bus.
[ 572.661057] systemd-logind[27]: New seat seat0.
[ OK ] Started User Login Management.
[ OK ] Reached target Multi-User System.
Starting Record Runlevel Change in UTMP...
systemd-update-utmp-runlevel.service: Deactivated successfully.
[ OK ] Finished Record Runlevel Change in UTMP.
H login: Trying to halt container. Send SIGTERM again to trigger immediate termination.
[ 1172.315403] testsuite-37.sh[36]: Warning! D-Bus connection terminated.
[ 1172.316873] testsuite-37.sh[36]: Failed to wait for response: Connection reset by peer
Container root terminated by signal KILL.
E: Test timed out after 600s
$ journalctl --file artifacts/TEST-37-RUNTIMEDIRECTORYPRESERVE.journal -o short-monotonic
-- Journal begins at Wed 2021-11-24 12:58:02 CET, ends at Wed 2021-11-24 13:08:02 CET. --
[ 572.512762] H systemd-journald[17]: Journal started
[ 572.512806] H systemd-journald[17]: Runtime Journal (/run/log/journal/432a59df398744368b68ecb52a8fc365) is 3.7M, max 29.8M, 26.1M free.
[ 572.521076] H systemd-journald[17]: Time spent on flushing to /var/log/journal/432a59df398744368b68ecb52a8fc365 is 724us for 2 entries.
[ 572.521076] H systemd-journald[17]: System Journal (/var/log/journal/432a59df398744368b68ecb52a8fc365) is 5.2M, max 41.9M, 36.7M free.
[ 572.535022] H systemd-tmpfiles[24]: Cannot set file attributes for '/var/log/journal', maybe due to incompatibility in specified attributes, previous=0x00080000, current=0x00080000, expected=0x00880000, ignoring.
[ 572.535418] H systemd-tmpfiles[24]: Cannot set file attributes for '/var/log/journal/432a59df398744368b68ecb52a8fc365', maybe due to incompatibility in specified attributes, previous=0x00080000, current=0x00080000, expected=0x00880000,>
[ 572.550615] H rc.local[26]: /etc/rc.local: 2: iptables: not found
[ 572.573983] H testsuite-37.sh[30]: + set -o pipefail
[ 572.573983] H testsuite-37.sh[30]: + systemd-mount -p RuntimeDirectory=hoge -p RuntimeDirectoryPreserve=yes -t tmpfs tmpfs /tmp/aaa
[ 572.592697] H testsuite-37.sh[32]: Started unit tmp-aaa.mount for mount point: /tmp/aaa
[ 572.593120] H testsuite-37.sh[30]: + touch /run/hoge/foo
[ 572.598709] H testsuite-37.sh[30]: + touch /tmp/aaa/bbb
[ 572.608297] H testsuite-37.sh[30]: + systemctl restart tmp-aaa.mount
[ 572.660880] H systemd-logind[27]: New seat seat0.
[ 572.672558] H dbus-daemon[38]: [system] Successfully activated service 'org.freedesktop.systemd1'
[ 1172.315230] H testsuite-37.sh[36]: Warning! D-Bus connection terminated.
[ 1172.315230] H testsuite-37.sh[36]: Failed to wait for response: Connection reset by peer
Nov 24 15:08:39 H testsuite-37.sh[36]: Warning! D-Bus connection terminated.
Nov 24 15:08:39 H testsuite-37.sh[36]: Failed to wait for response: Connection reset by peer
THis is interesting. It suggests that D-Bus kicks systemctl off the bus. Which it typically does when there are protocol issues, in particular when we send rubbish to it, or something dbus-daemon thinks is rubbish...
might be good to get dbus-daemon debug logs somehow
i figure the fedora test cases all use dbus-broker so we haven't seen this so far there
Relevant lines from the console log - #21458 (comment) (regarding the rate limiting):
tmp-aaa.mount: Executing: /bin/umount /tmp/aaa -c
Remounted /run/systemd/unit-root/run/systemd/incoming.
...
Event source 0x2aa1f5d4a50 (mount-monitor-dispatch) entered rate limit state.
...
Remounted /run/systemd/unit-root/run/user.
dbus.service: Kernel keyring access prohibited, ignoring.
systemd-journald.service: Added fd 38 (n/a) to fd store.
systemd-journald.service: Got notification message from PID 17 (FDSTORE=1)
dbus.service: Executing: /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
systemd-journald.service: Added fd 39 (n/a) to fd store.
Received SIGCHLD from PID 38 (umount).
Child 38 (umount) died (code=exited, status=0/SUCCESS)
tmp-aaa.mount: Child 38 belongs to tmp-aaa.mount.
tmp-aaa.mount: Mount process exited, code=exited, status=0/SUCCESS (success)
tmp-aaa.mount: Deactivated successfully.
tmp-aaa.mount: Changed unmounting -> dead
tmp-aaa.mount: Job 82 tmp-aaa.mount/restart finished, result=done
[ OK ] Unmounted tmp-aaa.mount.
[ OK ] Unmounted tmp-aaa.mount.
tmp-aaa.mount: Converting job tmp-aaa.mount/restart -> tmp-aaa.mount/start
...
[ OK ] Finished systemd-update-utmp-runlevel.service.
...
systemd-journald.service: Got notification message from PID 17 (FDSTORE=1)
systemd-journald.service: Added fd 38 (n/a) to fd store.
systemd-journald.service: Received EPOLLHUP on stored fd 38 (stored), closing.
Event source 0x2aa1f5d4a50 (mount-monitor-dispatch) left rate limit state.
KDSETMODE ioctl for switching to text mode failed on TTY, ignoring: Inappropriate ioctl for device
Not writing wtmp: No such file or directory
...
Trying to halt container. Send SIGTERM again to trigger immediate termination.
Container root terminated by signal KILL.
E: Test timed out after 600s
So, yeah, it looks like we just drop the start job for the mount unit, because we're rate limited, but then we don't re-enqueue it back once the rate limit is lifted.
Great find - I'd say let's wait a few days until next week for a follow-up, and if not revert and re-introduce after the release of v250, so that we don't introduce regressions
So, yeah, it looks like we just drop the start job for the mount unit, because we're rate limited, but then we don't re-enqueue it back once the rate limit is lifted.
Actually, commit edc027b should do exactly that. Previously we skipped mount start job because we were ratelimited but once ratelimit is over we should dispatch jobs in run queue in the next event loop iteration.
bug 🐛Programming errors, that need preferential fixingregression ⚠️A bug in something that used to work correctly and broke through some recent committests
Activity
mrc0mmand commentedon Nov 23, 2021
Ugh, that's... interesting. The test takes so long because it "loops". When it gets to the "daemon-reload":
systemd/test/units/testsuite-34.sh
Lines 71 to 72 in 7d34f26
after de-serializing the state the scripts starts from the beginning.
bluca commentedon Nov 23, 2021
It's running the same check for the various directory types - is the daemon-reload the issue? I can make it change the unit name, that should not require a daemon-reload anymore then
bluca commentedon Nov 23, 2021
but there must be some race somewhere, it couldn't possibly take 3 hours...
mrc0mmand commentedon Nov 23, 2021
Ahh, nevermind, I completely missed it's in a function, sigh. I'll continue looking...
bluca commentedon Nov 23, 2021
Let's see if removing daemon-reload does anything: #21478
mrc0mmand commentedon Nov 24, 2021
Hmm, I checked multiple timed out job's logs and the issue seems to be in TEST-37 rather than TEST-34:
the CI just gets stuck there (on both s390x and ppc64le).
[-]TEST-34-DYNAMICUSERMIGRATE gets stuck on focal-s390x, focal-ppc64el[/-][+]TEST-37-RUNTIMEDIRECTORYPRESERVE gets stuck on focal-s390x, focal-ppc64el[/+]bluca commentedon Nov 24, 2021
Uh of course, and it's also obvious from the output i attached here... d'oh!
mrc0mmand commentedon Nov 24, 2021
Interesting (and not very useful, so far):
Let's try again with
KERNEL_APPEND=debug...mrc0mmand commentedon Nov 24, 2021
Nevertheless, the CI at least finishes with
QEMU_TIMEOUT=andNSPAWN_TIMEOUT=set:So it would be good to set some reasonable values for these timeouts in Ubuntu CI (as they default to infinity) to not waste resources in such cases.
mrc0mmand commentedon Nov 24, 2021
Ugh, I'm still not sure what's going wrong, but it's getting stuck on
systemctl restart tmp-aaa.mount:Here's the full TEST-37 log (for convenience), along with the respective journal, maybe someone else can figure out what's going on:
poettering commentedon Nov 24, 2021
hmm the journal ends in this:
THis is interesting. It suggests that D-Bus kicks systemctl off the bus. Which it typically does when there are protocol issues, in particular when we send rubbish to it, or something dbus-daemon thinks is rubbish...
might be good to get dbus-daemon debug logs somehow
i figure the fedora test cases all use dbus-broker so we haven't seen this so far there
15 remaining items
bluca commentedon Nov 24, 2021
Excellent job, thank you!
poettering commentedon Nov 25, 2021
/cc @msekletar
mrc0mmand commentedon Nov 25, 2021
Relevant lines from the console log - #21458 (comment) (regarding the rate limiting):
So, yeah, it looks like we just drop the
startjob for the mount unit, because we're rate limited, but then we don't re-enqueue it back once the rate limit is lifted.bluca commentedon Nov 25, 2021
Great find - I'd say let's wait a few days until next week for a follow-up, and if not revert and re-introduce after the release of v250, so that we don't introduce regressions
msekletar commentedon Nov 25, 2021
Actually, commit edc027b should do exactly that. Previously we skipped mount start job because we were ratelimited but once ratelimit is over we should dispatch jobs in run queue in the next event loop iteration.
unit: add jobs that should be dispatched later back to run_queue
unit: add jobs that should be dispatched later back to run_queue
unit: add jobs that should be dispatched later back to run_queue
unit: add jobs that were skipped because of ratelimit back to run_queue
unit: add jobs that were skipped because of ratelimit back to run_queue
unit: add jobs that were skipped because of ratelimit back to run_queue