Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#31301 - [systemd] services fail to start when /var/tmp is a symlink

Attached to Project: Arch Linux
Opened by ajes (ajes) - Monday, 27 August 2012, 09:28 GMT
Last edited by Dave Reisner (falconindy) - Monday, 15 October 2012, 06:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture i686
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
After switching to systemd, cups do not start.

# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: failed (Result: exit-code) since Mon, 27 Aug 2012 11:16:13 +0200; 4min 16s ago
Process: 1455 ExecStart=/usr/sbin/cupsd -f (code=exited, status=226/NAMESPACE)
CGroup: name=systemd:/system/cups.service

Aug 27 11:16:13 msi systemd[1455]: Failed at step NAMESPACE spawning /usr/sbin/cupsd: Operation not permitted


THe same problem is described here:
https://lists.fedoraproject.org/pipermail/users/2012-April/416766.html

Additional info:
* cups 1.6.1-5
* systemd 189-2

Steps to reproduce:
Switch to systemd.
run: systemctl enable cups.service
reboot
check: systemctl status cups.service
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 15 October 2012, 06:32 GMT
Reason for closing:  Won't fix
Additional comments about closing:  This isn't a supported configuration.
Comment by Jan Steffens (heftig) - Monday, 03 September 2012, 19:43 GMT
Are you running a custom kernel?

What's the filesystem and mode of /tmp?
Comment by Cristiano Peressini (SleazyCriss) - Monday, 03 September 2012, 20:09 GMT
Right now cups doesn't work even with the work around of the wiki and makes systemd eat a lot of cpu. Systemd and his journal with cups enabled use 70% of cpu on a 3GHz quadcore amd cpu!
Comment by Andreas Radke (AndyRTR) - Monday, 03 September 2012, 20:24 GMT
That doesn't answer the question about your kernel and filesystem. Do you use anything custom and uncommon? You seem to be the only one with this issue.
Comment by Cristiano Peressini (SleazyCriss) - Monday, 03 September 2012, 20:41 GMT
I'm not the one who submitted the bug. Anyway I use the default archlinux kernel and I every core component is from the archlinux repos.

There was also another task open by another user which was closed as a duplicate of this one, he was reporting what I said in the previous post,a high cpu usage of systemd when cups is enabled.

Comment by Christian Hesse (eworm) - Monday, 03 September 2012, 21:13 GMT
I do have the same issue. Linux kernel is latest from stable core repo. /tmp is tmpfs with mode 1777. Will take a look at the mount options tomorrow.
Comment by Christian Hesse (eworm) - Tuesday, 04 September 2012, 06:23 GMT
/tmp is mounted with "defaults,size=6G", in reference to mount resulting in "rw,relatime,size=6291456k". So nothing unusual here I think.
Comment by Christian Hesse (eworm) - Tuesday, 04 September 2012, 06:43 GMT
Looks like this is a problem in systemd. All services using PrivateTmp fail:

# systemctl status ntpd.service
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
Active: failed (Result: exit-code) since Tue, 04 Sep 2012 08:15:46 +0200; 25min ago
Process: 1129 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=226/NAMESPACE)
CGroup: name=systemd:/system/ntpd.service
Comment by ajes (ajes) - Tuesday, 04 September 2012, 06:43 GMT
linux 3.5.3-1 (It's standard Arch Linux kernel)

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)

drwxrwxrwt 10 root root 280 Sep 4 08:40 /tmp/
drwxrwxrwt 2 root root 4096 Sep 4 08:40 /var/tmp/

Regards
Comment by ajes (ajes) - Tuesday, 04 September 2012, 06:46 GMT
I disagree about ntpd:
# systemctl status ntpd.service
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
Active: active (running) since Tue, 04 Sep 2012 08:44:42 +0200; 3s ago
Process: 725 ExecStart=/usr/bin/ntpd -g -u ntp:ntp (code=exited, status=0/SUCCESS)
Main PID: 727 (ntpd)
CGroup: name=systemd:/system/ntpd.service
└ 727 /usr/bin/ntpd -g -u ntp:ntp
(...)
Comment by Christian Hesse (eworm) - Tuesday, 04 September 2012, 07:15 GMT
I found my problem: /var/tmp was a symlink to /tmp. systemd failed to bind mount the private namespace to /var/tmp/. After fixing this cupsd and ntpd are up and running for me.

Artur, how about you, is /var/tmp a symlink on your system? However I do not have any idea why cupsd and ntpd service files should have different results.
Comment by ajes (ajes) - Tuesday, 04 September 2012, 07:31 GMT
You are right. Now as You asked, I remember, that before (when I submit bug) my /var/tmp was a symlink to /tmp.. now I have it as separate dir, so cups is working again.
So problem is with symlink on /var/tmp.

# ls -dl /var/tmp/
drwxrwxrwt 5 root root 4096 Sep 4 09:23 /var/tmp/
# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: active (running) since Tue, 04 Sep 2012 09:23:27 +0200; 1min 56s ago
Main PID: 1045 (cupsd)
CGroup: name=systemd:/system/cups.service
└ 1045 /usr/sbin/cupsd -f

Sep 04 09:23:27 msi cupsd[1045]: Unknown directive DefaultAuthType on line 25.

and

# rm -rf /var/tmp && ln -s /tmp /var/tmp
# ls -ld /var/tmp
lrwxrwxrwx 1 root root 4 Sep 4 09:26 /var/tmp -> /tmp
# systemctl start cups.service
# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled)
Active: failed (Result: exit-code) since Tue, 04 Sep 2012 09:26:50 +0200; 2s ago
Process: 1080 ExecStart=/usr/sbin/cupsd -f (code=exited, status=226/NAMESPACE)
CGroup: name=systemd:/system/cups.service

Comment by Christian Hesse (eworm) - Tuesday, 04 September 2012, 09:35 GMT
I suppose this breaks since "namespace: rework namespace support" (commit ac0930c892bc7979b4c9bc2a52e5e844650b025d).
Comment by Dave Reisner (falconindy) - Tuesday, 04 September 2012, 10:10 GMT
This seems like a dupe of  FS#30229 . I see no reason to support /var/tmp as a symlink.
Comment by Cristiano Peressini (SleazyCriss) - Tuesday, 04 September 2012, 18:55 GMT
For me that is not the case


# ls -dl /var/tmp/
drwxrwxrwt 3 root root 143360 4 set 20.51 /var/tmp/


# systemctl start cups.service
# systemctl status cups.service
cups.service - CUPS Printing Service
Loaded: loaded (/usr/lib/systemd/system/cups.service; disabled)
Active: failed (Result: signal) since Tue, 04 Sep 2012 20:54:15 +0200; 8s ago
Process: 13373 ExecStart=/usr/sbin/cupsd -f (code=killed, signal=ABRT)
CGroup: name=systemd:/system/cups.service

zsh: segmentation fault systemctl status cups.service


I think is a slightly different bug as systemd use a lot of cpu.
Comment by Cristiano Peressini (SleazyCriss) - Tuesday, 04 September 2012, 19:45 GMT
Looks like reinstalling for the fourth time cups solve the problem!
Comment by Greg (dolby) - Monday, 15 October 2012, 03:40 GMT
Status?

Loading...