[Bug 1804603] Re: systemd-tmpfiles-setup.service fails on btrfs

Andreas Kar 1804603 at bugs.launchpad.net
Mon Jan 14 17:21:28 UTC 2019


To supplement the issue I will add more relevant links:


https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1804847
https://forum.armbian.com/topic/8852-ssh-doesnt-work-on-orange-pi-zero/
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1811580

For me the issue also appeared with 229-4ubuntu21.9. Was fixed with
229-4ubuntu21.10 and now appeared again with 229-4ubuntu21.15. I'm on
Armbian with ext4 and have the issue now again.

Distribution / Kernel
Linux xxx 3.4.113-sun8i #2 SMP PREEMPT Sat Jan 12 15:54:26 CET 2019 armv7l armv7l armv7l GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

Output of journalctl -b 0 -u systemd-tmpfiles-setup.service

Jän 14 11:01:51 xxx systemd[1]: Starting Create Volatile Files and Directories...
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var/log: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var/lib: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /run/sendsigs.omit.d: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /home: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /srv: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /run/lock/subsys: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var/run/lighttpd: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var/cache: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /var/cache/man: Bad file descriptor
Jän 14 11:01:51 xxx systemd-tmpfiles[581]: Failed to validate path /run/openvpn: Bad file descriptor
Jän 14 11:01:51 xxx systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
Jän 14 11:01:51 xxx systemd[1]: Failed to start Create Volatile Files and Directories.
Jän 14 11:01:51 xxx systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
Jän 14 11:01:51 xxx systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.

Affected services:

# dnsmasq.service loaded failed failed dnsmasq - A lightweight DHCP and caching DNS server
# lighttpd.service loaded failed failed Lighttpd Daemon
# openvpn at server.service loaded failed failed OpenVPN connection to server
# ssh.service loaded failed failed OpenBSD Secure Shell server
# systemd-tmpfiles-setup-dev.service loaded failed failed Create Static Device Nodes in /dev
# systemd-tmpfiles-setup.service loaded failed failed Create Volatile Files and Directories

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1804603

Title:
  systemd-tmpfiles-setup.service fails on btrfs

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Bionic:
  Fix Released
Status in systemd source package in Cosmic:
  Fix Released
Status in systemd source package in Disco:
  Fix Released

Bug description:
  [Impact]

   * Last security update introduced a regression on btrfs based systems, causing systemd-tmpfiles-setup.service to fail to start, resulting in degraded machines.
   * Cherrypick upstream fixes to resolve this.

  [Test Case]

   * Install VM using btrfs for /
   * Boot, check that systemd-tmpfiles-setup.service is started successfully with:
  $ systemctl status systemd-tmpfiles-setup.service

  [Regression Potential]

   * btrfs fd doesn't support the set of flags that systemd used, with
  this patch, a compat set of flags is set instead, thus resolving the
  introduced regression. The worst case scenario is that creating
  subvolumes/directories is still broken (as in, the current status
  quo).

  [Other Info]
   
   * Example bad output

  
  After update to systemd 237-3ubuntu10.9 systemd-tmpfiles-setup.service fails with:

  Nov 21 13:44:12 node-blc49 systemd[1]: Starting Create Volatile Files and Directories...
  Nov 21 13:44:12 node-blc49 systemd-tmpfiles[1226]: Failed to create directory or subvolume "/var": Bad file descriptor
  Nov 21 13:44:12 node-blc49 systemd-tmpfiles[1226]: Failed to create directory or subvolume "/home": Bad file descriptor
  Nov 21 13:44:12 node-blc49 systemd-tmpfiles[1226]: Failed to create directory or subvolume "/srv": Bad file descriptor
  Nov 21 13:44:12 node-blc49 systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
  Nov 21 13:44:12 node-blc49 systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.
  Nov 21 13:44:12 node-blc49 systemd[1]: Failed to start Create Volatile Files and Directories.

  This happens on btrfs root filesystems in real hardware and on our
  virtualized servers as well. 237-3ubuntu10.6 didnt show this errors
  and going back to 237-3ubuntu10 removes them as well.

  # lsb_release -rd
  Description:    Ubuntu 18.04.1 LTS
  Release:        18.04

  # apt-cache policy systemd
  systemd:
    Installiert:           237-3ubuntu10.9
    Installationskandidat: 237-3ubuntu10.9
    Versionstabelle:
   *** 237-3ubuntu10.9 500
          500 http://de.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
          100 /var/lib/dpkg/status
       237-3ubuntu10 500
          500 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1804603/+subscriptions



More information about the foundations-bugs mailing list