Bug 76497

Summary: [ARCH] [208-210] [regression?] systemd-remount-fs fails at boot -> succeeds later after manual invocation
Product: systemd Reporter: Ronald <ronald645>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTOURBUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fstab of all systems
Kernel .config of ~10yr old UP system
Initrd script that does some initial work

Description Ronald 2014-03-23 08:51:09 UTC
Created attachment 96224 [details]
Fstab of all systems

I have three systems running Arch:

- 10yr old UP system; 32bit userspace; 32bit kernel; v3.14-rc7; custom stripped kernel; FAIL
- ~4yr old SMP system; 32bit userspace; 64bit kernel; v3.13.6-1; ARCH kernel; SUCCESS
- 7yr old UP system; 64bit kernel; 32/64bit userspace; v3.14-rc3; custom stripped kernel; FAIL

I have attached:
- fstab used on all three systems
- .config of the 10yr old UP system

I replaced systemd-remount-fs with a shell script that invokes the binary with strace:

[pid   459] mount("run", "/run", 0x1a0b240,MS_MGC_VAL|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_REMOUNT|MS_NOATIME,"mode=0755,size=5m") = -1 EINVAL (Invalid argument) <0.000039>

If I invoke systemd-remount-fs later, I get:

[mount][pid  2411] mount("run", "/run", 0x986d978,MS_MGC_VAL|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_REMOUNT|MS_NOATIME,"mode=0755,size=5m") = 0

Kernel logs indicate mount fails with error code 32 (-EINVAL?). The mount manpage says:

source had an invalid superblock. Or, a remount (MS_REMOUNT) was attempted, but source was not already mounted on target. Or, a move (MS_MOVE) was attempted, but source was not a mount point, or was '/'.

So, I tested if the filesystem existed before by adding

mountpoint /run

Which claimed it was a valid mountpoint before systemd-remount-fs was invoked.
Comment 1 Ronald 2014-03-23 08:51:45 UTC
Created attachment 96225 [details]
Kernel .config of ~10yr old UP system
Comment 2 Ronald 2014-03-23 08:55:56 UTC
Created attachment 96226 [details]
Initrd script that does some initial work

I also attached the custom script that sets up /run from within initrd. It's from initcpio and not dracut.
Comment 3 Lennart Poettering 2014-06-23 17:08:16 UTC
Looks like a kernel problem really if this even happens with our tool replaced. Can you file this on the kernel bugzilla please?
Comment 4 Ronald 2014-06-23 17:33:31 UTC
This issue appeared after I upgraded systemd from v208 to v210.

Anyway, I upgraded my initramfs from a script based version to a systemd based version and all is well.

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.