Bug 695375
Summary: | binfmt_misc rule delays systemd | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Zdenek Kabelac <zkabelac> | ||||
Component: | module-init-tools | Assignee: | Jon Masters <jcm> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | jcm, jonathan, lpoetter, mschmidt | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | module-init-tools-3.12-5.fc15 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-04-28 19:24:45 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 695415 | ||||||
Attachments: |
|
Description
Zdenek Kabelac
2011-04-11 14:15:55 UTC
It could be triggered by just: /bin/mount binfmt_misc /proc/sys/fs/binfmt_misc -t binfmt_misc There are two convenience features which work fine if taken independently, but together they lead to Zdeněk's lockup: - the rule in /etc/modprobe.d/dist.conf mounts /proc/sys/fs/binfmt_misc automatically when someone loads the binfmt_misc kernel module. - systemd uses autofs on /proc/sys/fs/binfmt_misc to mount it automatically when someone attempts to use it. The kernel will request the binfmt_misc module when it needs for the mount. But even without systemd's autofs involvement (tested by masking the proc-sys-fs-binfmt_misc.automount unit) there is a little bug: # /bin/mount binfmt_misc /proc/sys/fs/binfmt_misc -t binfmt_misc mount: binfmt_misc already mounted or /proc/sys/fs/binfmt_misc busy mount: according to mtab, none is already mounted on /proc/sys/fs/binfmt_misc In this case the result was just a confusing error message, as the mount did actually succeed. The rule for binfmt_misc should be removed because: - Fedora kernels are built with CONFIG_BINFMT_MISC=y anyway, so the rule has no effect there. - on custom kernels with CONFIG_BINFMT_MISC=m it leads to the lockup when used with systemd's automount. Yes, I agree with Michal, the rule should be removed. Kay Sievers had this to say about our dist.conf on IRC #systemd: <kay> michich: wow, people run mount(8) from modprobe? <kay> yikes, that needs to go <kay> nothing should ever call mount or any other stuff like that in sync calls like modprobe <kay> http://pkgs.fedoraproject.org/gitweb/?p=module-init-tools.git;a=blob;f=modprobe-dist.conf;h=eadd5c7e9a82b6cdcb4ef9ac7e67c771fbf38a02;hb=refs/heads/f15/master <kay> there are many really nice things in that file :) <kay> can someone hit jcm with a cluebat please! <michich> kay, can I quote you in the bug? :-) <kay> michich: oh, yeah, please do <kay> michich: there is almost nothing in that file, that belongs there <kay> michich: lots of stuff does not exist anymore; static aliases belong into the kernel module, not magically mapped in userspace; /bin/true stuff should be blacklisted; magically named aliases don't belong into module-init-tools Related to this, I asked the kernel folks to compile binfmt_misc as module by default. If this happens this line really has to go. https://bugzilla.redhat.com/show_bug.cgi?id=695415 Thanks for the ping in #systemd. I'll get crufty stupid synchronous calls to mount and friends ripped out. Looks like this is just a straightforward removal as systemd will mount this now anyway, so I'll just can that rule and any others I see like it that aren't needed (and look at anything else in dist.conf that needs love). Oh, and the OSS thing...I got the ping on that, too. Jon. Created attachment 491450 [details]
Stack trace when TB mounts binfmt_misc
Well it has 'extra' bonus - which probably deserves new BZ for gnome-vfs.
TB is pushed to use gnome-vfs - and gnome-vfs seems to be read /etc/mtab (which is on my system symbolic link to /proc/mounts - is that correct with current version of systemd ?)
Anyway - makes 'stat' on each mountpoint - thus effectively mounts all disks - very funny...
Though I've no idea whether gnome-vfs really needs to do all these 'stats' ?
So any idea ?
stat() on autofs mount points is a very bad idea, since it triggers them. lstat() doesn't, so this should be a relatively easy fix. Is this only gnome-vfs or also gvfs? Lennart: I've removed that particular mount from the update I'm pushing but I could do with some help identifying other calls to mount that we can remove. I'd like to kill all of them, and we will, but let's start by removing calls we don't need to replace with something else. What's the story with NFS on your end now? Jon. It's really just SUN RPC and NFS remaining. Also, I removed the unmount since I assume you're taking care of unmounting the filesystem too via autofs. Jon. module-init-tools-3.12-5.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/module-init-tools-3.12-5.fc15 Package module-init-tools-3.12-5.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing module-init-tools-3.12-5.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/module-init-tools-3.12-5.fc15 then log in and leave karma (feedback). Yes, we unmount everything as necessary on shutdown. No need to explicitly unmount everything. I am not entirely sure about the NFS special dirs and where that should move. A better place its probably the NFS scripts in some way. But I am not sure really. There's so much kludgy shell involved with starting up RPC/NFS, it's a bit of a nightmare... module-init-tools-3.12-5.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |