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-execute.c:874:test_exec_dynamicuser: exec-dynamicuser-statedir.service: can_unshare=yes: exit status 1, expected 0 #23263

Closed
mbiebl opened this issue May 4, 2022 · 8 comments · Fixed by #23343
Milestone

Comments

@mbiebl
Copy link
Contributor

mbiebl commented May 4, 2022

Seen with v250 and latest git HEAD.

When running the unit-tests via LXC/autopkgtest I get the following failure in test-execute:

exec-dynamicuser-statedir.service: Child 6387 belongs to exec-dynamicuser-statedir.service.
exec-dynamicuser-statedir.service: Main process exited, code=exited, status=0/SUCCESS (success)
exec-dynamicuser-statedir.service: Running next main command for state start.
exec-dynamicuser-statedir.service: Will spawn child (service_run_next_main): sh
exec-dynamicuser-statedir.service: Passing 0 fds to service
exec-dynamicuser-statedir.service: About to execute sh -x -c "test \$\$(find / \\( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o -path /sys/fs/bpf -o -path /dev/.lxc \\) -prune -o -type d -writable -print 2>/dev/null | sort -u | tr -d \"\\\\n\") = /var/lib/private/quux/pief/var/lib/private/waldo"
exec-dynamicuser-statedir.service: Forked sh as 6388
exec-dynamicuser-statedir.service: User lookup succeeded: uid=65325 gid=65325
Received SIGCHLD from PID 6388 (sh).
Child 6388 (sh) died (code=exited, status=1/FAILURE)
exec-dynamicuser-statedir.service: Child 6388 belongs to exec-dynamicuser-statedir.service.
exec-dynamicuser-statedir.service: Main process exited, code=exited, status=1/FAILURE
exec-dynamicuser-statedir.service: Failed with result 'exit-code'.
exec-dynamicuser-statedir.service: Service will not restart (restart setting)
exec-dynamicuser-statedir.service: Changed start -> failed
exec-dynamicuser-statedir.service: Unit entered failed state.
Spawning thread to nuke /tmp/systemd-private-00dcaf0615b640509dbdecf874e9e22e-exec-dynamicuser-statedir.service-6LeDti
Spawning thread to nuke /var/tmp/systemd-private-00dcaf0615b640509dbdecf874e9e22e-exec-dynamicuser-statedir.service-kNixoB
UID 65325 is no longer referenced, cleaning up its IPC.
GID 65325 is no longer referenced, cleaning up its IPC.
Failed to connect to nscd socket: No such file or directory
Failed to connect to nscd socket: No such file or directory
no
	ProtectKernelModules: no
	ProtectKernelLogs: no
	ProtectClock: no
	ProtectControlGroups: no
	PrivateNetwork: no
	PrivateUsers: no
	ProtectHome: read-only
	ProtectSystem: strict
	MountAPIVFS: no
	IgnoreSIGPIPE: yes
	MemoryDenyWriteExecute: no
	RestrictRealtime: no
	RestrictSUIDSGID: yes
	KeyringMode: private
	ProtectHostname: no
	ProtectProc: default
	ProcSubset: all
	RuntimeDirectoryPreserve: no
	RuntimeDirectoryMode: 0755
	StateDirectoryMode: 0755
	CacheDirectoryMode: 0755
	LogsDirectoryMode: 0755
	ConfigurationDirectoryMode: 0755
	TimeoutCleanSec: infinity
	StandardInput: null
	StandardOutput: null
	StandardError: inherit
	User: games
	Group: games
	DynamicUser: yes
	LockPersonality: no
	SystemCallErrorNumber: kill
	PID: 6358
	Start Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Code: exited
	Exit Status: 0
exec-dynamicuser-fixeduser-one-supplementarygroup.service
	UMask: 0022
	WorkingDirectory: /
	RootDirectory: /
	NonBlocking: no
	PrivateTmp: yes
	PrivateDevices: no
	ProtectKernelTunables: no
	ProtectKernelModules: no
	ProtectKernelLogs: no
	ProtectClock: no
	ProtectControlGroups: no
	PrivateNetwork: no
	PrivateUsers: no
	ProtectHome: read-only
	ProtectSystem: strict
	MountAPIVFS: no
	IgnoreSIGPIPE: yes
	MemoryDenyWriteExecute: no
	RestrictRealtime: no
	RestrictSUIDSGID: yes
	KeyringMode: private
	ProtectHostname: no
	ProtectProc: default
	ProcSubset: all
	RuntimeDirectoryPreserve: no
	RuntimeDirectoryMode: 0755
	StateDirectoryMode: 0755
	CacheDirectoryMode: 0755
	LogsDirectoryMode: 0755
	ConfigurationDirectoryMode: 0755
	TimeoutCleanSec: infinity
	StandardInput: null
	StandardOutput: null
	StandardError: inherit
	User: 1
	Group: 1
	DynamicUser: yes
	SupplementaryGroups: 1
	LockPersonality: no
	SystemCallErrorNumber: kill
	PID: 6366
	Start Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Code: exited
	Exit Status: 0
exec-dynamicuser-supplementarygroups.service
	UMask: 0022
	WorkingDirectory: /
	RootDirectory: /
	NonBlocking: no
	PrivateTmp: yes
	PrivateDevices: no
	ProtectKernelTunables: no
	ProtectKernelModules: no
	ProtectKernelLogs: no
	ProtectClock: no
	ProtectControlGroups: no
	PrivateNetwork: no
	PrivateUsers: no
	ProtectHome: read-only
	ProtectSystem: strict
	MountAPIVFS: no
	IgnoreSIGPIPE: yes
	MemoryDenyWriteExecute: no
	RestrictRealtime: no
	RestrictSUIDSGID: yes
	KeyringMode: private
	ProtectHostname: no
	ProtectProc: default
	ProcSubset: all
	RuntimeDirectoryPreserve: no
	RuntimeDirectoryMode: 0755
	StateDirectoryMode: 0755
	CacheDirectoryMode: 0755
	LogsDirectoryMode: 0755
	ConfigurationDirectoryMode: 0755
	TimeoutCleanSec: infinity
	StandardInput: null
	StandardOutput: null
	StandardError: inherit
	User: _du340d985882767cff
	Group: _du340d985882767cff
	DynamicUser: yes
	SupplementaryGroups: 1 2 3
	LockPersonality: no
	SystemCallErrorNumber: kill
	PID: 6375
	Start Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Code: exited
	Exit Status: 0
exec-dynamicuser-statedir.service
	UMask: 0022
	WorkingDirectory: /
	RootDirectory: /
	NonBlocking: no
	PrivateTmp: yes
	PrivateDevices: no
	ProtectKernelTunables: no
	ProtectKernelModules: no
	ProtectKernelLogs: no
	ProtectClock: no
	ProtectControlGroups: no
	PrivateNetwork: no
	PrivateUsers: no
	ProtectHome: read-only
	ProtectSystem: strict
	MountAPIVFS: no
	IgnoreSIGPIPE: yes
	MemoryDenyWriteExecute: no
	RestrictRealtime: no
	RestrictSUIDSGID: yes
	KeyringMode: private
	ProtectHostname: no
	ProtectProc: default
	ProcSubset: all
	RuntimeDirectoryPreserve: no
	RuntimeDirectoryMode: 0755
	StateDirectoryMode: 0755
	StateDirectory: waldo
	StateDirectory: quux/pief
	CacheDirectoryMode: 0755
	LogsDirectoryMode: 0755
	ConfigurationDirectoryMode: 0755
	TimeoutCleanSec: infinity
	StandardInput: null
	StandardOutput: null
	StandardError: inherit
	User: exec-dynamicuser-statedir
	Group: exec-dynamicuser-statedir
	DynamicUser: yes
	LockPersonality: no
	SystemCallErrorNumber: kill
	PID: 6388
	Start Timestamp: Wed 2022-05-04 10:08:03 UTC
	Exit Timestampsrc/test/test-execute.c:874:test_exec_dynamicuser: exec-dynamicuser-statedir.service: can_unshare=yes: exit status 1, expected 0

Full log attached
I can not reproduce the failure with qemu as backend.

log.txt

@mbiebl mbiebl added the tests label May 4, 2022
@yuwata
Copy link
Member

yuwata commented May 4, 2022

What's the result of the command find ... in that environment?

@yuwata yuwata added needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer lxc/lxd labels May 4, 2022
@mbiebl
Copy link
Contributor Author

mbiebl commented May 4, 2022

Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /var/lib/private/quux/pief
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /var/lib/private/waldo
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/intel_pstate
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq/policy1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq/policy3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq/policy0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq/policy2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq/schedutil
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpufreq
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/vulnerabilities
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/microcode
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/power
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/hotplug
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpuidle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cache/index1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cache/index3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cache/index0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cache/index2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cache
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/topology
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/microcode
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/power
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/thermal_throttle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/hotplug
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state2/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state4/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state4
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state1/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state3/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state5/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle/state5
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3/cpuidle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cache/index1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cache/index3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cache/index0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cache/index2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cache
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/topology
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/microcode
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/power
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/thermal_throttle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/hotplug
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state2/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state4/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state4
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state1/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state3/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state5/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle/state5
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2/cpuidle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cache/index1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cache/index3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cache/index0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cache/index2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cache
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/topology
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/microcode
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/power
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/thermal_throttle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/hotplug
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state2/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state4/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state4
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state1/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state3/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state5/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle/state5
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1/cpuidle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cache/index1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cache/index3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cache/index0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cache/index2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cache
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/topology
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/microcode
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/power
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/thermal_throttle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/hotplug
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state2/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state2
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state4/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state4
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state1/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state1
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state3/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state3
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state5/s2idle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle/state5
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0/cpuidle
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu/cpu0
Mai 04 12:58:11 autopkgtest-lxc-bkkihu sh[8306]: /sys/devices/system/cpu
Mai 04 12:58:10 autopkgtest-lxc-bkkihu sh[8305]: + find / ( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o -path /sys/fs/bpf -o -path /dev/.lxc ) -prune -o -type d -writable -print

@mbiebl
Copy link
Contributor Author

mbiebl commented May 4, 2022

# findmnt 
TARGET                                SOURCE                                                FSTYPE     OPTIONS
/                                     /dev/sda6[/var/lib/lxc/autopkgtest-lxc-bkkihu/rootfs] ext4       rw,relatime,errors=remount-ro
├─/run                                tmpfs                                                 tmpfs      rw,nosuid,nodev,size=3253420k,nr_inodes=819200,mode=755,inode64
│ └─/run/lock                         tmpfs                                                 tmpfs      rw,nosuid,nodev,noexec,relatime,size=5120k,inode64
├─/dev                                none                                                  tmpfs      rw,relatime,size=492k,mode=755,inode64
│ ├─/dev/shm                          tmpfs                                                 tmpfs      rw,nosuid,nodev,inode64
│ ├─/dev/hugepages                    hugetlbfs                                             hugetlbfs  rw,relatime,pagesize=2M
│ ├─/dev/mqueue                       mqueue                                                mqueue     rw,nosuid,nodev,noexec,relatime
│ ├─/dev/.lxc/proc                    proc                                                  proc       rw,relatime
│ ├─/dev/.lxc/sys                     sys                                                   sysfs      rw,relatime
│ ├─/dev/pts                          devpts                                                devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ ├─/dev/ptmx                         devpts[/ptmx]                                         devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ ├─/dev/console                      devpts[/0]                                            devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ ├─/dev/tty1                         devpts[/1]                                            devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ ├─/dev/tty2                         devpts[/2]                                            devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ ├─/dev/tty3                         devpts[/3]                                            devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
│ └─/dev/tty4                         devpts[/4]                                            devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666,max=1028
├─/proc                               proc                                                  proc       rw,nosuid,nodev,noexec,relatime
│ ├─/proc/sys                         proc[/sys]                                            proc       ro,relatime
│ │ ├─/proc/sys/kernel/random/boot_id none[/.lxc-boot-id]                                   tmpfs      ro,nosuid,nodev,noexec,relatime,size=492k,mode=755,inode64
│ │ └─/proc/sys/net                   proc[/sys/net]                                        proc       rw,nosuid,nodev,noexec,relatime
│ ├─/proc/sysrq-trigger               proc[/sysrq-trigger]                                  proc       ro,relatime
│ ├─/proc/cpuinfo                     lxcfs[/proc/cpuinfo]                                  fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/diskstats                   lxcfs[/proc/diskstats]                                fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/loadavg                     lxcfs[/proc/loadavg]                                  fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/meminfo                     lxcfs[/proc/meminfo]                                  fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/slabinfo                    lxcfs[/proc/slabinfo]                                 fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/stat                        lxcfs[/proc/stat]                                     fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ ├─/proc/swaps                       lxcfs[/proc/swaps]                                    fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
│ └─/proc/uptime                      lxcfs[/proc/uptime]                                   fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
├─/sys                                sysfs                                                 sysfs      ro,nosuid,nodev,noexec,relatime
│ ├─/sys/devices/virtual/net          sysfs[/devices/virtual/net]                           sysfs      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections          fusectl                                               fusectl    rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup                    none                                                  cgroup2    rw,nosuid,nodev,noexec,relatime
│ └─/sys/devices/system/cpu           lxcfs[/sys/devices/system/cpu]                        fuse.lxcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other
└─/tmp/autopkgtest-lxc.tx2xx0s5       /dev/sda6[/tmp/autopkgtest-lxc.tx2xx0s5]              ext4       rw,relatime,errors=remount-ro

@mbiebl
Copy link
Contributor Author

mbiebl commented May 4, 2022

This is lxc 4.0.11-1 and lxcfs 5.0.0-1

@mbiebl mbiebl removed the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label May 4, 2022
@mbiebl
Copy link
Contributor Author

mbiebl commented May 4, 2022

It appears lxcfs is a Recommends of the lxc package, which is why it's installed (automatically) on the host system.
https://tracker.debian.org/pkg/lxcfs

@bluca
Copy link
Member

bluca commented May 5, 2022

Does it work after adding -o -path /sys/devices/system/cpu to the exclusion list in test/test-execute/exec-dynamicuser-statedir.service?

bluca added a commit to bluca/systemd that referenced this issue May 11, 2022
test-execute checks that only /var/lib/private/waldo is writable, but there are
some filesystems that are always writable and excluded. Add /sys/devices/system/cpu
which is created by lxcfs.

Fixes systemd#23263
@bluca bluca added this to the v251 milestone May 11, 2022
@mbiebl
Copy link
Contributor Author

mbiebl commented May 11, 2022

Does it work after adding -o -path /sys/devices/system/cpu to the exclusion list in test/test-execute/exec-dynamicuser-statedir.service?

Yes, this works i.e. makes the test suite pass.

@bluca
Copy link
Member

bluca commented May 11, 2022

thanks

keszybz pushed a commit that referenced this issue May 11, 2022
test-execute checks that only /var/lib/private/waldo is writable, but there are
some filesystems that are always writable and excluded. Add /sys/devices/system/cpu
which is created by lxcfs.

Fixes #23263
keszybz pushed a commit to systemd/systemd-stable that referenced this issue May 25, 2022
test-execute checks that only /var/lib/private/waldo is writable, but there are
some filesystems that are always writable and excluded. Add /sys/devices/system/cpu
which is created by lxcfs.

Fixes systemd/systemd#23263

(cherry picked from commit 646cba5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants