Bug 463582 - Installation of JRE 6 update 12 breaks boot (binfmt_misc issue)
Summary: Installation of JRE 6 update 12 breaks boot (binfmt_misc issue)
Status: RESOLVED FIXED
: 461199 461786 462550 462609 468970 471179 (view as bug list)
Alias: None
Product: openSUSE 11.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: x86-64 Linux
: P2 - High : Major (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.1:22687
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 15:50 UTC by Libor Pechacek
Modified: 2010-07-28 10:15 UTC (History)
6 users (show)

See Also:
Found By: L3
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
SysRq-T dump (5.08 KB, text/plain)
2009-01-05 15:50 UTC, Libor Pechacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Libor Pechacek 2009-01-05 15:50:22 UTC
Created attachment 263214 [details]
SysRq-T dump

Installing Java 6 update 12 JRE (http://pack.suse.cz/mvyskocil/sun_java_u12_howto/) breaks boot if you enable NFS client mounts.  The problem is stuck "mount -t binfmt_misc none /proc/sys/fs/binfmt_misc".  I was able to reproduce the issue even in RPM installation.  The process states are following:
dhcp27:~ # pstree -p 9081
rpm(9081)???sh(9082)???jexec(9260)???jexec(9261)???jexec(9262)???mount(9264)

dhcp27:~ # ps xa
...
 9081 pts/0    S+     0:00 rpm -i /tmp/jre-6u12-ea-linux-amd64.rpm
 9082 pts/0    S+     0:00 /bin/sh /var/tmp/rpm-tmp.89787 1
 9260 pts/0    S+     0:00 /bin/sh /etc/init.d/jexec start
 9261 pts/0    S+     0:00 /bin/sh /etc/init.d/jexec start
 9262 pts/0    S+     0:00 /bin/sh /etc/init.d/jexec start
 9264 pts/0    D+     0:00 mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
 9265 ?        S<     0:00 [khelper]
 9266 ?        S      0:00 /sbin/modprobe -q -- binfmt_misc
 9267 ?        S      0:00 sh -c /sbin/modprobe --ignore-install binfmt_misc && { mount -t binfmt_misc none /proc/sys/fs/binfmt_misc; }
 9270 ?        S      0:00 mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
...

SysRq-t dump is attached (too long for inline).  Obviously there is a deadlock between the two mounts (9264 & 9270) introduced by line 274 in /etc/modprobe.conf.


How to reproduce:
1) install SLES11 RC1 x86_64, minimal system config
2) download Java 6u12 JRE RPM, unpack the shell archive
3) install the JRE RPM, maybe it deadlocks already here
4) enable NFS mounts in your setup
5) reboot - the reboot will fail as the NFS mount will be blocked by the 
   stalled binfmt_misc mount

Workaround: Manually kill the shell running the second mount (usually does not work during boot, SSH is started later), or possibly disable the install script in modprobe.conf (untested).
Comment 1 Michal Marek 2009-01-05 15:57:37 UTC
Why do the two mount commands deadlock? :(

Libor, does the deadlock go away if you change the install line to

install binfmt_misc /sbin/modprobe --ignore-install --first-time binfmt_misc && { mount -t binfmt_misc none /proc/sys/fs/binfmt_misc; }

? With --first-time, the second modprobe command should fail.
Comment 2 Michal Marek 2009-01-06 10:10:16 UTC
(In reply to comment #1 from Michal Marek)
> Why do the two mount commands deadlock? :(

Ah, the first mount comes from the init script and results in a request_module("binfmt_misc") call which results in another mount and a deadlock. Crap.
Comment 3 Libor Pechacek 2009-01-06 10:43:33 UTC
Trying "mount -t binfmt_misc none /proc/sys/fs/binfmt_misc" suffices to reproduce the deadlock.  Strange I did not try it before.  I was probably too focused on the Java package.
Comment 4 Michal Marek 2009-01-06 10:47:36 UTC
Right, because it goes like mount -> request_module -> modprobe -> mount. I'll check if any package relies on the install line and remove it.
Comment 5 Michal Marek 2009-01-06 11:10:29 UTC
It seems that binfmt_misc is only used by java. Our /etc/init.d/java.binfmt_misc doesn't require the automatic mounting (but it also doesn't break with the current setup). I'll nuke the install line.
Comment 6 Michal Marek 2009-01-06 12:52:19 UTC
done.
Comment 7 Michal Marek 2009-01-13 09:06:35 UTC
*** Bug 462550 has been marked as a duplicate of this bug. ***
Comment 8 Olaf Hering 2009-01-20 12:38:14 UTC
if there is ever an online update for that issue,
release also afected libspe2 for bug #467540
Comment 9 Michal Marek 2009-01-20 13:06:59 UTC
Sorry about that, I did check if other packages are affected, but I only looked at i586.
Comment 10 Michal Marek 2009-01-22 09:32:44 UTC
Moving to openSUSE so that openSUSE users are able to find it and stop reporting duplicates.
Comment 11 Michal Marek 2009-01-22 09:34:14 UTC
*** Bug 461199 has been marked as a duplicate of this bug. ***
Comment 12 Michal Marek 2009-01-23 11:44:44 UTC
As written in the duplicates, there is going to be an online update for 11.1 to address this bug. In the meantime, you can delete the this line

install binfmt_misc /sbin/modprobe --ignore-install binfmt_misc && { mount -t binfmt_misc none /proc/sys/fs/binfmt_misc; }

from /etc/modprobe.conf as a workaround.
Comment 13 Michal Vyskocil 2009-02-04 10:32:19 UTC
*** Bug 468970 has been marked as a duplicate of this bug. ***
Comment 14 Michal Vyskocil 2009-02-04 10:34:47 UTC
*** Bug 471179 has been marked as a duplicate of this bug. ***
Comment 15 Michal Marek 2009-02-04 10:48:16 UTC
*** Bug 461786 has been marked as a duplicate of this bug. ***
Comment 16 Cyril Hrubis 2009-02-13 13:57:05 UTC
*** Bug 462609 has been marked as a duplicate of this bug. ***
Comment 17 Swamp Workflow Management 2009-02-26 14:25:55 UTC
Update released for: module-init-tools
Products:
openSUSE 11.1 (debug, i586, ppc, x86_64)