[systemd-bugs] [Bug 89217] New: systemd thinks timesyncd has failed if /var/tmp doesn't exist

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 18 19:28:34 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89217

            Bug ID: 89217
           Summary: systemd thinks timesyncd has failed if /var/tmp
                    doesn't exist
           Product: systemd
           Version: unspecified
          Hardware: Other
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: jdub at perkypants.org
        QA Contact: systemd-bugs at lists.freedesktop.org

Everything about the timesyncd service and binary seemed to be correct, but it
was hitting a restart limit, and I was seeing the following error in the
journal:

systemd-timesyncd.service failed to run 'start' task: No such file or directory


That usually indicates that there's something wrong with the ExecStart program,
but it existed, and worked fine.

Shawn Landden (scientes) suggested I strace PID 1 to see what systemd thought
was going on.

It turns out that because systemd fails to create a directory under /var/tmp,
it thinks that timesyncd itself is broken. If I create /var/tmp, timesyncd is
A-OK!

I don't know if the absence of /var/tmp is a problem with my science experiment
of a distro (it's OpenWrt + systemd), but systemd should definitely not blame
timesyncd for the failure to create a directory under /var/tmp, and... is it
necessary anyway?

I create a symlink from /var/tmp to /tmp, and now that timesyncd is running,
here's the contents of /var/tmp:

# find /var/tmp/
/var/tmp/
/var/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-YJDsMU
/var/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-YJDsMU/tmp
/var/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-2vQ4v0
/var/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-2vQ4v0/tmp


And here's the relevant PID 1 strace snippet showing the /var/tmp failure:

mkdir("/var/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-OUeCeA",
0700) = -1 ENOENT (No such file or directory)
umask(0)                                = 077
rmdir("/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-G5yGdf/tmp")
= 0
rmdir("/tmp/systemd-private-496647d450244423afd7faaa2ac6420c-systemd-timesyncd.service-G5yGdf")
= 0
sendmsg(28, {msg_name(0)=NULL,
msg_iov(4)=[{"PRIORITY=4\nSYSLOG_FACILITY=3\nCOD"..., 172}, {"MESSAGE=", 8},
{"systemd-timesyncd.service failed"..., 79}, {"\n", 1}], msg_controllen=0,
msg_flags=0}, MSG_NOSIGNAL) = 260

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150219/597b0931/attachment.html>


More information about the systemd-bugs mailing list