Bug 75512 - systemd tagged udev disk and network device units not created/detected at boot time for systemd-209/210
Summary: systemd tagged udev disk and network device units not created/detected at boo...
Status: RESOLVED INVALID
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 23:58 UTC by jpsinthemix
Modified: 2014-02-26 03:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Contextual Info and results of various commands under emergency shell (51.18 KB, text/plain)
2014-02-25 23:58 UTC, jpsinthemix
Details

Description jpsinthemix 2014-02-25 23:58:19 UTC
Created attachment 94740 [details]
Contextual Info and results of various commands under emergency shell

Hi,

I have been using systemd-208 without issue since its release on source-based i686-pc-linux-gnu systems (under gcc-4.8.2, glibc-2.19, binutils-2.24, and linux-3.13.5.) which I maintain.

On upgrading from systemd-208 to systemd-209 (and then to systemd-210), my development
system no longer is able to mount non-root disk partitions listed in /etc/fstab at boot time. On this system, I'm using MBR (not GPT) disk partitions, and not using lvm.

My grub2 boot kernel line is:

  linux   /boot/vmlinuz-3.13.5 root=/dev/sda7 ro raid=noautodetect quiet \
          acpi_os_name="Microsoft Windows NT" \
          systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M

I have attached a number of text files with detailed contextual infomation, but here I'll simply summarize. At boot, I get the messages:

systemd-fsck[62]: /sbin/fsck.xfs: XFS file system.
[ * ] (1 of 4) A start job is running for dev-sda10.device. (1min 26s / 1min 30s)

The root partition is fsck'd and mounted properly, but 4 other partitions specified in /etc/fstab, /dev/sda{1,6,9,10}, are not (/dev/sda1 is a swap partition). For each of /dev/sda{1,6,9,10}, I get journal messages like:

Feb 24 05:01:58 b-movie systemd[1]: Job dev-sda10.device/start timed out.
Feb 24 05:01:58 b-movie systemd[1]: Timed out waiting for device dev-sda10.device.
Feb 24 05:01:58 b-movie systemd[1]: Dependency failed for /home.
Feb 24 05:01:58 b-movie systemd[1]: Dependency failed for Local File Systems.
Feb 24 05:01:58 b-movie systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
Feb 24 05:01:58 b-movie systemd[1]: Dependency failed for File System Check on /dev/sda10.

After the 1m 30s timeout, I'm greeted with an emergency shell; I login, then issue 'systemctl daemon-reload', and then, 'exit'.

Immediately after issuing 'exit', booting resumes, the fstab entries are fsck'd and mounted, and all appears to be Ok.

Note that the hardware is fine as I am able to boot on the system without issue under systemd-208 on a different partition which also shares the use of /dev/sda{1,6,9,10}.

I'm unable to run systemd-analyze blame in the emergency shell as dbus.service/socket is stopped on entry to the emergency shell, and /run/dbus is thus no longer present; I get

systemd-analyze blame
Failed to create bus connection: No such file or directory

The absent file (from strace) is:
connect(3, {sa_family=AF_LOCAL, sun_path="/run/dbus/system_bus_socket"}, 29) = -1 ENOENT (No such file or directory)

In addition to the disk device issue, I also have a (probably related) problem with network device unit creation/detection: I have a udev rule file (in /etc/udev/rules.d) for network activation which, while a bit hackish, works just fine under systemd-208, with the following line:

ACTION=="add", SUBSYSTEM=="net", NAME=="en*|wl*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcpcd@$name.service"

and in dhcpcd@.service, I have the lines:

BindsTo = sys-subsystem-net-devices-%i.device
After   = sys-subsystem-net-devices-%i.device

My Ethernet interface is enp2s2; in systemd-208 the dhcpcd@enp2s2.service is started without issue, while in systemd-209/210, it fails due to sys-subsystem-net-devices-enp2s2.device never appearing.

Again, if I issue 'systemctl daemon-reload' in the emergency shell, then immediately after this, sys-subsystem-net-devices-enp2s2.device becomes 'active (plugged)', and I can manually start dhcpcd.

So, it appears to me that the 'Timed out waiting for device dev-sda10.device' message is the key here; for some reason the device unit creation is failing at boot time for non-'/' disk partitions, and for network devices.

I have attached a zip archive (systemd-209_210-boot-issue.zip) containing number of text files providing contextual information from within the emergency shell:

unzip -l systemd-209_210-boot-issue.zip

Archive:  systemd-209_210-boot-issue.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  02-25-2014 18:47   systemd-209_210-boot-issue/
     2471  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:dev-disk-contents
      335  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:df
   100456  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:dmesg
      268  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:etc-fstab
   118487  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:journalctl_xb
     1355  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:lsblk_f
     1269  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:lsmod
     2309  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:ps_xa
      928  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:run-systemd-contents
     4588  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:summary
       17  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:systemctl_list-jobs
     1932  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:systemd-build-info
     3774  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:systemd_list-units
     1962  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:udevadm_info_qall_p-sda1
     1961  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:udevadm_info_qall_p-sda10
     1953  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:udevadm_info_qall_p-sda6
     1953  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:udevadm_info_qall_p-sda7
     1952  02-25-2014 18:43   systemd-209_210-boot-issue/00-boot-issue:udevadm_info_qall_p-sda9
---------                     -------
   247970                     19 files

Unfortunately, I'm not at all familiar with systemd internals, so I'm not sure where to begin looking at the code to root out this issue. I can, however, provide additional info, run tests, test patches, etc. Any ideas/help would be greatly appreciated.

thanks much,
John
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-02-26 00:07:13 UTC
Do you have CONFIG_FHANDLE set in the kernel config?
Comment 2 jpsinthemix 2014-02-26 00:49:40 UTC
(In reply to comment #1)
> Do you have CONFIG_FHANDLE set in the kernel config?

No, I do not. If I should, I'll add it and rebuild the kernel now and have test results about an hour from now.
Comment 3 Zbigniew Jedrzejewski-Szmek 2014-02-26 00:57:07 UTC
Yeah, CONFIG_FHANDLE is now required.
Comment 4 jpsinthemix 2014-02-26 01:00:49 UTC
(In reply to comment #3)
> Yeah, CONFIG_FHANDLE is now required.

Ok, great, report results in an hour or so. Are there any other kernel config changes needed for v209/v210 w.r.t v208 ?
Comment 5 Zbigniew Jedrzejewski-Szmek 2014-02-26 01:02:11 UTC
PAM login_uid finally works in containers with kernel 3.14.
Comment 6 jpsinthemix 2014-02-26 03:05:10 UTC
That was it. Thanks much. I apologize for not looking at the README (Requirements) file; I only looked at NEWS..
Comment 7 jpsinthemix 2014-02-26 03:08:36 UTC
I guess this can be marked as closed / invalid as its obviously not a bug at all.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.