Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239239 - sys-apps/openrc-0.2.5 & sys-fs/udev-128 race condition for /etc/init.d/net.br0 restart
Summary: sys-apps/openrc-0.2.5 & sys-fs/udev-128 race condition for /etc/init.d/net.br...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-01 11:17 UTC by Natanael Copa
Modified: 2008-12-24 15:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-10-01 11:17:02 UTC
When br0 is restarted it triggers a uevent upon deleting the br0 interface.

The /lib64/udev/net.sh seems to do try stop the device at the end:

# If we're stopping then sleep for a bit in-case a daemon is monitoring
# the interface. This to try and ensure we stop after they do.
[ "${ACTION}" == "stop" ] && sleep 2

IN_HOTPLUG=1 "${SCRIPT}" --quiet "${ACTION}"

The result here seems to be that after the sleep it will try to stop the interface again which is already restarted, which again triggers another uevent and it ends up in an endless loop, which runs '/etc/init.d/net.br0 stop' every 2 seconds.

A workaround is to add br* to the static list of interfacse to ignore. I don't think thats a good longtime solution though. I suppose that bond and vlan interfacs should go there too in that case.

--- /lib64/udev/net.sh.orig	2008-10-01 13:10:10.000000000 +0200
+++ /lib64/udev/net.sh	2008-10-01 13:10:22.000000000 +0200
@@ -12,7 +12,7 @@
 
 # ignore interfaces that are registered after being "up" (?)
 case ${IFACE} in
-	ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
+	ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*|br*)
 		exit 0 ;;
 esac
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-10-07 14:37:19 UTC
Matthias, any input here? It looks like something that should be fixed in udev to me.
Comment 2 Matthias Schwarzott gentoo-dev 2008-10-09 08:57:17 UTC
The problem with all these devices is: user may rename them to any allowed name, so our name-based strategy will fail in these cases.
Do we have a better plan?

In between: I added this to udev-130-r1.

@Cardoe:
Do we also need to backport it to any stable or soon to be stabled version for openrc stablization?
Comment 3 Roy Marples 2008-10-09 10:43:23 UTC
(In reply to comment #2)
> The problem with all these devices is: user may rename them to any allowed
> name, so our name-based strategy will fail in these cases.
> Do we have a better plan?

Disable hotplugging of services by default?

> In between: I added this to udev-130-r1.
> 
> @Cardoe:
> Do we also need to backport it to any stable or soon to be stabled version for
> openrc stablization?

I would like to get udev starting in the boot runlevel before we start thinking about getting openrc stable. This should be done today or tomorrow from the openrc end.
Comment 4 Roy Marples 2008-10-10 10:18:19 UTC
(In reply to comment #3)
> I would like to get udev starting in the boot runlevel before we start thinking
> about getting openrc stable. This should be done today or tomorrow from the
> openrc end.

This is now done - grab the udev script on bug #240984
Comment 5 Roy Marples 2008-10-10 10:20:46 UTC
(In reply to comment #2)
> The problem with all these devices is: user may rename them to any allowed
> name, so our name-based strategy will fail in these cases.
> Do we have a better plan?

Another viable solution is to alter the net scripts so they don't destroy the interface on stop. However, this does mean that any interfaces where options can only be set on interface creation will no longer work.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2008-12-24 15:10:46 UTC
Looks like all we needed to get done has been done. Newer udev and newer OpenRC are available in tree.