wakes up from automount-expire timer every second

Bug #1470845 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

I noticed that systemd on my idle Wily desktop is creating very short lived threads at 1Hz. While these aren't doing much, it still consumes power doing wakeups to create these periodic threads.

Showing thread creation with forkstat:

$ sudo forkstat
Time Event PID Info Duration Process
13:43:07 clone 1 parent /sbin/init splash
13:43:07 clone 7483 thread /sbin/init splash
13:43:07 exit 7483 0 0.001 /sbin/init splash
13:43:08 clone 1 parent /sbin/init splash
13:43:08 clone 7484 thread /sbin/init splash
13:43:08 exit 7484 0 0.000 /sbin/init splash
13:43:10 clone 1 parent /sbin/init splash
13:43:10 clone 7485 thread /sbin/init splash
13:43:10 exit 7485 0 0.000 /sbin/init splash
13:43:11 clone 1 parent /sbin/init splash
13:43:11 clone 7486 thread /sbin/init splash
13:43:11 exit 7486 0 0.000 /sbin/init splash
13:43:12 clone 1 parent /sbin/init splash
13:43:12 clone 7487 thread /sbin/init splash
13:43:12 exit 7487 0 0.000 /sbin/init splash
13:43:13 clone 1 parent /sbin/init splash
13:43:13 clone 7488 thread /sbin/init splash
13:43:13 exit 7488 0 0.000 /sbin/init splash
13:43:15 clone 1 parent /sbin/init splash
13:43:15 clone 7489 thread /sbin/init splash
13:43:15 exit 7489 0 0.000 /sbin/init splash
13:43:16 clone 1 parent /sbin/init splash
13:43:16 clone 7490 thread /sbin/init splash
13:43:16 exit 7490 0 0.000 /sbin/init splash
13:43:17 clone 1 parent /sbin/init splash
13:43:17 clone 7491 thread /sbin/init splash
13:43:17 exit 7491 0 0.000 /sbin/init splash

And it's consuming some cycles over time:

$ sudo perf stat -p 1
^C
 Performance counter stats for process id '1':

          7.519868 task-clock (msec) # 0.000 CPUs utilized
                41 context-switches # 0.005 M/sec
                39 cpu-migrations # 0.005 M/sec
                 3 page-faults # 0.399 K/sec
        12,107,977 cycles # 1.610 GHz
        10,597,101 stalled-cycles-frontend # 87.52% frontend cycles idle
                 0 stalled-cycles-backend # 0.00% backend cycles idle
         2,285,818 instructions # 0.19 insns per cycle
                                                  # 4.64 stalled cycles per insn
           457,133 branches # 60.790 M/sec
            69,444 branch-misses # 15.19% of all branches

      46.099593011 seconds time elapsed

The thread is just doing the following:

clock_gettime(0x7 /* CLOCK_??? */, {52592, 947682919}) = 0
read(14, "\1\0\0\0\0\0\0\0", 8) = 8
fcntl(30, F_DUPFD_CLOEXEC, 3) = 15
ioctl(30, 0xc0189374, 0x7ffeaf311470) = 0
fcntl(16, F_GETFD) = 0x1 (flags FD_CLOEXEC)
clone(Process 7466 attached
child_stack=0x7f97c3580e30, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f97c35819d0, tls=0x7f97c3581700, child_tidptr=0x7f97c35819d0) = 7466
[pid 7466] set_robust_list(0x7f97c35819e0, 24) = 0
[pid 1] timerfd_settime(14, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={52594, 197493000}}, NULL <unfinished ...>
[pid 7466] ioctl(15, 0xc018937c <unfinished ...>
[pid 1] <... timerfd_settime resumed> ) = 0
[pid 7466] <... ioctl resumed> , 0x7f97c3580d60) = -1 EAGAIN (Resource temporarily unavailable)
[pid 1] epoll_wait(4, <unfinished ...>
[pid 7466] close(15) = 0
[pid 7466] close(16) = 0
[pid 7466] madvise(0x7f97c2d81000, 8368128, MADV_DONTNEED) = 0
[pid 7466] _exit(0) = ?
[pid 7466] +++ exited with 0 +++
<... epoll_wait resumed> {{EPOLLIN, {u32=3, u64=3}}}, 34, -1) = 1

summary: systemd on wily desktop generating short lived threads every second in a
- quite system
+ quiet system
Changed in systemd (Ubuntu):
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote : Re: systemd on wily desktop generating short lived threads every second in a quiet system

I don't see this in a VM, but I do see it on my wily desktop.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Unhelpfully this stops after "sudo systemctl daemon-reexec" and even "sudo systemctl daemon-reload", so this always needs a fresh boot. To confirm, is that the same on your system?

Revision history for this message
Martin Pitt (pitti) wrote :
Martin Pitt (pitti)
summary: - systemd on wily desktop generating short lived threads every second in a
- quiet system
+ wakes up from automount-expire timer every second
Changed in systemd (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Stopping proc-sys-fs-binfmt_misc.automount also stops this. Waiting for upstream comment now.

Martin Pitt (pitti)
Changed in systemd (Ubuntu):
importance: High → Medium
Martin Pitt (pitti)
Changed in systemd (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package systemd - 223-1ubuntu1

---------------
systemd (223-1ubuntu1) wily; urgency=medium

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Hack to support system-image read-only /etc, and modify files in
      /etc/writable/ instead.
    - Keep our much simpler udev maintainer scripts (all platforms must
      support udev, no debconf).
    - initramfs init-bottom: If LVM is installed, settle udev,
      otherwise we get missing LV symlinks. Workaround for LP #1185394.
    - Add debian/udev.lvm2.init: Dummy SysV init script to satisfy insserv
      dependencies to "lvm2" which is handled with udev rules in Ubuntu.
    - Add debian/udev.lvm2.service to avoid running the dummy lvm2 init
      script.
    - Provide shutdown fallback for upstart. (LP: #1370329)
    - debian/extra/ifup@.service: Additionally run for "auto" class. We don't
      really support "allow-hotplug" in Ubuntu at the moment, so we need to
      deal with "auto" devices appearing after "/etc/init.d/networking start"
      already ran. (LP: #1374521)
    - ifup@.service: Drop dependency on networking.service (i. e.
      /etc/init.d/networking), and merely ensure that /run/network exists.
      This avoids unnecessary dependencies/waiting during boot and dependency
      cycles if hooks wait for other interfaces to come up (like ifenslave
      with bonding interfaces). (LP: #1414544)
    - Add Get-RTC-is-in-local-time-setting-from-etc-default-rc.patch: In
      Ubuntu we currently keep the setting whether the RTC is in local or UTC
      time in /etc/default/rcS "UTC=yes|no", instead of /etc/adjtime.
      (LP: #1377258)
    - Put session scopes into all cgroup controllers. This makes unprivileged
      user LXC containers work under systemd. (LP: #1346734)
    - systemctl: Don't forward telinit u to upstart. This works around
      upstart's Restart() always reexec'ing /sbin/init on Restart(), even if
      that changes to point to systemd during the upgrade. This avoids running
      systemd during a dist-upgrade. (LP: #1430479)
    - Drop hwdb-update dependency from udev-trigger.service, which got
      introduced in v219-stable. This causes udev and plymouth to start too
      late and isn't really needed in Ubuntu yet as we don't support stateless
      systems yet and handle hwdb.bin updates through dpkg triggers. This can
      be dropped again with initramfs-tools 0.117.
    - Lower Breaks: to plymouth version which has the udev inotify fix in
      Ubuntu.
    - Lower apparmor Breaks: to the Ubuntu version that dropped $remote_fs.
    - Change systemd-sysv's conflicts to upstart-sysv. (LP: #1422681)

    Upgrade fixes, keep until 16.04 LTS release:
    - systemd Conflicts/Replaces/Provides systemd-services.
    - Remove obsolete systemd-logind upstart job.
    - Clean up obsolete /etc/udev/rules.d/README.
    - systemd.postinst: Migrate mountall specific fstab options to standard
      util-linux "nofail" option.

systemd (223-3) UNRELEASED; urgency=medium

  * boot-and-services autopkgtest: Ignore thermald. Since 1.4.3-2 it starts by
    default, but fails in most virtual envs.

systemd (223-2) unstable; urgency=medium

...

Read more...

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.