Bug 699829

Summary: systemd: Segfault in sd.exec when PrivateTmp is enabled
Product: [openSUSE] openSUSE 12.1 Reporter: Michal Vyskocil <mvyskocil>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Michal Vyskocil 2011-06-14 15:21:06 UTC
Hi, I try to use the per process namespace support in systemd and my first attempt failed. I have very simple service file

$ cat /etc/systemd/system/ns-query.service 
[Unit]
Description=query service

[Service]
ExecStart=/bin/true
PrivateTmp=true
Type=oneshot

Then after copy and daemon-reload, I got the
# systemctl start ns-query.service
Job failed. See system logs and 'systemctl status' for details.

where /var/log/messages has following

Jun 14 17:07:14 zelva systemd[1]: Accepted connection on private bus.
Jun 14 17:07:14 zelva systemd[1]: Running GC...
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.StartUnit() on /org/freedesktop/systemd1
Jun 14 17:07:14 zelva systemd[1]: Trying to enqueue job ns-query.service/start/replace
Jun 14 17:07:14 zelva systemd[1]: Installed new job ns-query.service/start as 4434
Jun 14 17:07:14 zelva systemd[1]: Enqueued job ns-query.service/start as 4434
Jun 14 17:07:14 zelva systemd[1]: About to execute: /bin/true
Jun 14 17:07:14 zelva systemd[1]: Forked /bin/true as 26360
Jun 14 17:07:14 zelva systemd[1]: ns-query.service changed failed -> start
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.GetUnit() on /org/freedesktop/systemd1
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.DBus.Properties.Get() on /org/freedesktop/systemd1/unit/ns_2dquery_2eservice
Jun 14 17:07:14 zelva kernel: [1045411.967253] sd.exec[26360]: segfault at 7fff33951ff8 ip 00007fe2b6e7101a sp 00007fff33952000 error 6 in libc-2.11.3.so (deleted)[7fe2b6dfe000+161000]
Jun 14 17:07:14 zelva systemd[1]: Accepted connection on private bus.
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Agent.Released() on /org/freedesktop/systemd1/agent
Jun 14 17:07:14 zelva systemd[1]: ns-query.service: cgroup is empty
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local
Jun 14 17:07:14 zelva systemd[1]: Received SIGCHLD from PID 26360 (sd.exec).
Jun 14 17:07:14 zelva systemd[1]: Got SIGCHLD for process 26360 (sd.exec)
Jun 14 17:07:14 zelva systemd[1]: Child 26360 died (code=killed, status=11/SEGV)
Jun 14 17:07:14 zelva systemd[1]: Child 26360 belongs to ns-query.service
Jun 14 17:07:14 zelva systemd[1]: ns-query.service: main process exited, code=killed, status=11
Jun 14 17:07:14 zelva systemd[1]: ns-query.service changed start -> failed
Jun 14 17:07:14 zelva systemd[1]: Job ns-query.service/start finished, result=failed
Jun 14 17:07:14 zelva systemd[1]: Unit ns-query.service entered failed state.
Jun 14 17:07:14 zelva systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local

I don't have the core file. I don't know how to generate it, the /proc/sys/kernel/core_pattern did not help me.

I have systemd-28-110.5.x86_64 from Base:System installed.
Comment 1 Frederic Crozat 2011-10-12 14:44:24 UTC
lowering the severity, the crash is caused by debug output, so if you boot with without systemd.log_level=debug, it won't crash anymore..

I'm discussing the right fix with upstream (or we will remove the debug output causing this particular issue)
Comment 2 Bernhard Wiedemann 2011-10-14 16:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (699829) was mentioned in
https://build.opensuse.org/request/show/87884 Factory / systemd
Comment 3 Frederic Crozat 2011-10-27 14:50:21 UTC
let's close it, since it is fixed in our package
Comment 4 Frederic Crozat 2011-12-02 16:30:06 UTC
upstream has fixed it properly, it will be merged in a 12.1 maintenance update.
Comment 5 Bernhard Wiedemann 2011-12-09 15:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (699829) was mentioned in
https://build.opensuse.org/request/show/96122 12.1 / systemd
https://build.opensuse.org/request/show/96125 Factory / systemd
Comment 6 Bernhard Wiedemann 2011-12-09 18:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (699829) was mentioned in
https://build.opensuse.org/request/show/96193 Factory / systemd
Comment 7 Bernhard Wiedemann 2011-12-12 17:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (699829) was mentioned in
https://build.opensuse.org/request/show/96377 12.1 / systemd