Bug 243729 - grubby hangs when installing new kernel
grubby hangs when installing new kernel
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-11 11:17 EDT by Casey Goodlett
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-14 11:58:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Casey Goodlett 2007-06-11 11:17:23 EDT
Description of problem:
Using the fc7 kernel package and mkinitrd from updates-testing to install a new
kernel package fails.  Grubby runs indefinitely.

Version-Release number of selected component (if applicable):
mkinitrd 6.0.9-6
kernel 2.6.21-1.3219

How reproducible:
Always

Steps to Reproduce:
1. Try to install new kernel package
  
Actual results:
rpm -ivh kernel hangs indefinitely.


Expected results:
Successful kernel installation

Additional info:
Grubby seems to be caught in an infinite loop.  Running strace on the grubby
process returns lots of lines like the following

open("/sys/block/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/ram15/subsystem/ram14/subsystem/ram8/holders/dev",
O_RDONLY/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/loop7/subsystem/ram15/subsystem/ram14/subsystem/ram8/dev",
Comment 1 Charles R. Anderson 2007-07-09 23:52:21 EDT
It appears that grubby is traversing /sys/block, and there are symlinks that
reference parent directories, causing this infinite recursion:

>ls -l /sys/block/loop7
total 0
-r--r--r-- 1 root root 4096 2007-07-09 23:51 dev
drwxr-xr-x 2 root root    0 2007-06-01 13:06 holders/
-r--r--r-- 1 root root 4096 2007-07-09 23:51 range
-r--r--r-- 1 root root 4096 2007-07-09 23:51 removable
-r--r--r-- 1 root root 4096 2007-07-09 23:51 size
drwxr-xr-x 2 root root    0 2007-06-01 13:06 slaves/
-r--r--r-- 1 root root 4096 2007-07-09 23:51 stat
lrwxrwxrwx 1 root root    0 2007-07-09 23:51 subsystem -> ../../block/
--w------- 1 root root 4096 2007-07-09 23:51 uevent

Perhaps grubby should be fixed to detect and not dereference such symlinks.
Comment 2 Peter Jones 2007-09-14 11:58:35 EDT
This should be working in current versions.  Please test, and reopen if it's not
fixed.

Note You need to log in before you can comment on or make changes to this bug.