Bug 199242 - Xen: infinite loop in /lib/udev/rename_device
Summary: Xen: infinite loop in /lib/udev/rename_device
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-18 11:17 UTC by Mark McLoughlin
Modified: 2014-03-17 03:00 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-19 14:47:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
initscripts-rename-device-xen-guest.patch (1.33 KB, patch)
2006-07-18 11:17 UTC, Mark McLoughlin
no flags Details | Diff

Description Mark McLoughlin 2006-07-18 11:17:33 UTC
For whatever reason, in a Xen guest, ifcfg-vif0.[0-7] all contain
HWADDR=FE:FF:FF:FF:FF:FF

Now that may be a bug in itself, but it also causes an infinite loop in
/lib/udev/rename_device

Basically, with e.g. vif0.0 rename_device picks the first device with
HWADDR=FE:FF:FF:FF:FF:FF which might be e.g. vif0.6 and keeps trying to rename
vif0.0 to vif6.0, which obviously fails

Attaching a patch which recognises the possibility that other devices might be
configured with the same HWADDR as the one we're being asked to rename

This lops a whole 60 seconds off my domU boot time

(Also, fixes an fd leak ... it was running out of fds)

(I like your sighandler() { exit(1) }; alarm(10); loop catcher btw ... it made
it nice and challenging to realize there actually was a loop somewhere :-)

Comment 1 Mark McLoughlin 2006-07-18 11:17:33 UTC
Created attachment 132594 [details]
initscripts-rename-device-xen-guest.patch

Comment 2 Mark McLoughlin 2006-07-18 11:21:57 UTC
Oh, and while you're fixing that, it would probably be safer to do:

-     mv /dev/.dhclient-${DEVICE}.leases /var/lib/dhclient/dhclient-${DEVICE}.leases
+     mv -f /dev/.dhclient-${DEVICE}.leases
/var/lib/dhclient/dhclient-${DEVICE}.leases


Comment 3 Bill Nottingham 2006-07-19 14:47:22 UTC
Added in CVS, will be in the next build.


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