Skip to content

systemd-nspawn attempts to parse the deserialization FD as a runlevel, overriding the default target in some cases #24452

@mrc0mmand

Description

@mrc0mmand

systemd version the issue has been seen with

latest main

Used distribution

Arch Linux

Linux kernel version used

5.19.2-arch1-2

CPU architectures issue was seen on

No response

Component

No response

Expected behaviour you didn't see

No response

Unexpected behaviour you saw

In a couple of instances I noticed TEST-60 fail in a strange way when running in nspawn:

[ 1429.132180] H systemd[1]: Unmounting tmp-hoge.mount...
[ 1429.132894] H systemd[1]: tmp-hoge.mount: Deactivated successfully.
[ 1429.132995] H systemd[1]: Unmounted tmp-hoge.mount.
[ 1429.138308] H systemd[1]: Mounting tmp-hoge.mount...
[ 1429.211643] H systemd[1]: Mounted tmp-hoge.mount.
[ 1429.219430] H testsuite-60.sh[30]: + systemctl daemon-reexec
[ 1429.228060] H systemd[1]: Reexecuting.
[ 1429.345856] H testsuite-60.sh[30]: + sleep 1
[ 1430.348594] H testsuite-60.sh[344]: ++ systemctl is-failed tmp-hoge.mount
[ 1430.356990] H testsuite-60.sh[30]: + [[ active == \f\a\i\l\e\d ]]
[ 1430.357184] H testsuite-60.sh[30]: + journalctl -u tmp-hoge.mount -q --grep 'but there is no mount'
[ 1430.363253] H testsuite-60.sh[30]: + systemctl stop tmp-hoge.mount
[ 1430.372512] H systemd[1]: Unmounting tmp-hoge.mount...
[ 1430.374867] H systemd[1]: tmp-hoge.mount: Deactivated successfully.
[ 1430.375028] H systemd[1]: Unmounted tmp-hoge.mount.
[ 1430.378063] H testsuite-60.sh[30]: + (( i++ ))
[ 1430.378063] H testsuite-60.sh[30]: + (( i < 10 ))
[ 1430.378063] H testsuite-60.sh[30]: + systemctl --no-block start tmp-hoge.mount
[ 1430.388351] H systemd[1]: Mounting tmp-hoge.mount...
[ 1430.389520] H testsuite-60.sh[30]: + sleep .27798
[ 1430.669053] H testsuite-60.sh[30]: + systemctl daemon-reexec
[ 1430.677580] H systemd[1]: Mounted tmp-hoge.mount.
[ 1430.678540] H systemd[1]: Reexecuting.
[ 1430.782465] H testsuite-60.sh[30]: + sleep 1
[ 1430.788947] H systemd[1]: Reached target testsuite.target.
[ 1430.789334] H systemd[1]: Starting end.service...
[ 1430.790802] H sh[369]: + systemctl poweroff --no-block
[ 1430.795787] H systemd-logind[27]: The system will power off now!
[ 1430.796294] H systemd-logind[27]: System is powering down.
[ 1430.807180] H systemd[1]: multi-user.target: Found ordering cycle on testsuite.target/stop
[ 1430.807217] H systemd[1]: multi-user.target: Found dependency on end.service/stop
[ 1430.807251] H systemd[1]: multi-user.target: Found dependency on multi-user.target/stop
[ 1430.807289] H systemd[1]: multi-user.target: Job testsuite.target/stop deleted to break ordering cycle starting with multi-user.target/stop
[ 1430.814120] H systemd[1]: end.service: Deactivated successfully.
[ 1430.814260] H systemd[1]: Stopped end.service.
[ 1430.814756] H systemd[1]: Removed slice system-modprobe.slice.
[ 1430.815138] H systemd[1]: Stopped target cryptsetup.target.
[ 1430.815449] H systemd[1]: Stopped target getty.target.
[ 1430.815679] H systemd[1]: Stopped target integritysetup.target.
[ 1430.815981] H systemd[1]: Stopped target paths.target.
[ 1430.816085] H systemd[1]: systemd-ask-password-console.path: Deactivated successfully.
[ 1430.816266] H systemd[1]: Stopped systemd-ask-password-console.path.
[ 1430.816409] H systemd[1]: systemd-ask-password-wall.path: Deactivated successfully.
[ 1430.822846] H systemd[1]: Stopped systemd-ask-password-wall.path.
[ 1430.823195] H systemd[1]: Stopped target slices.target.
[ 1430.823506] H systemd[1]: Stopped target sockets.target.
[ 1430.823801] H systemd[1]: Stopped target timers.target.
[ 1430.823911] H systemd[1]: systemd-tmpfiles-clean.timer: Deactivated successfully.
[ 1430.824103] H systemd[1]: Stopped systemd-tmpfiles-clean.timer.
[ 1430.824420] H systemd[1]: Stopped target veritysetup.target.
[ 1430.824605] H systemd[1]: systemd-coredump.socket: Deactivated successfully.
[ 1430.824871] H systemd[1]: Closed systemd-coredump.socket.
[ 1430.825313] H systemd[1]: Stopping console-getty.service...
[ 1430.825611] H systemd[1]: Stopping dbus.service...
[ 1430.825685] H systemd[1]: Stopping systemd-logind.service...
[ 1430.826208] H systemd[1]: Stopping systemd-update-utmp.service...
[ 1430.827134] H systemd[1]: testsuite-60.service: Main process exited, code=killed, status=15/TERM
[ 1430.827179] H systemd[1]: testsuite-60.service: Failed with result 'signal'.

Journals:

Steps to reproduce the problem

No response

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixingnspawn

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions