Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 354525 - sys-apps/netplug - occasional eth0 failure to start with sys-apps/openrc, RC_PARALLEL=yes
Summary: sys-apps/netplug - occasional eth0 failure to start with sys-apps/openrc, RC_...
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: openrc:oldnet
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 20:22 UTC by David Flogeras
Modified: 2022-06-29 06:46 UTC (History)
3 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 David Flogeras 2011-02-11 20:22:55 UTC
I have an embedded board (Eurotech ISIS Atom based board), with a e100 based NIC.  I installed openrc/baselayout2 (with everything else stable, except the 2.6.37 kernel). I had netplug installed as well.

I have RC_PARALLEL=yes

I did ln -s /etc/init.d/net.lo /etc/init.d/net.eth0, but left /etc/conf.d/net blank as I want dhcpc to run.

It randomly will say "ERROR: eth0 Failed to start" when starting up the service (right after backgrounding).  It however continues to run dhcpcd and gets an IP.  Of course dependent services (like sshd) don't start because net.eth0 failed with an error.  If I /etc/init.d/net.eth0 restart a few times it will eventually (and randomly) start without error.

If I set RC_PARALLEL=no, it works everytime.

Also, I replaced netplug with ifplugd, and it now works with RC_PARALLEL=yes.  Not sure what causes this (seemingly) race condition, but maybe it gives some insight.  There is only one place in /etc/init.d/net.lo where RC_PARALLEL is referenced, but I'm certainly the wrong person to read that script.



Reproducible: Always
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-02-15 23:13:33 UTC
Some of the e100 and e1000 cards do not detect link status reliably until you actually force them online. I know ifplugd has a workaround for this, but I don't know if netplug does.

If netplug does have the workaround, or you have confirmed that your hardware doesn't have this problem, then we need to look at that init script.
Comment 2 David Flogeras 2011-02-16 11:08:52 UTC
All I know of the HW is what lspci tells me, does this help?  Can I get any other info for you before we close completely?


02:07.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 10)
        Flags: bus master, medium devsel, latency 64, IRQ 16
        Memory at 81020000 (32-bit, non-prefetchable) [size=4K]
        I/O ports at 4000 [size=64]
        Memory at 81000000 (32-bit, non-prefetchable) [size=128K]
        Expansion ROM at a0000000 [disabled] [size=64K]
        Capabilities: [dc] Power Management version 2
        Kernel driver in use: e100
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-02-16 11:16:57 UTC
Rough testcase for the problem:

1. set netplug & ifplug to NOT start.
2. Run "ip addr show dev eth0", capture output. Should say state down.
Example:
# ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff

3. Physically disconnect network cable.
4. Hard reboot.
5. Run "ip addr show dev eth0", capture output. Should say state down.
6. Insert network cable.
7. Run "ip addr show dev eth0", capture output.
8. Run "ip link set eth0 up".
9. Run "ip addr show dev eth0", capture output.

If the output of #7 says "down", then you have the hardware bug I described.
The network interface should work after #9 as normal (it should also note UP, LOWER_UP in the flags).
Comment 4 David Flogeras 2011-02-16 17:29:47 UTC
Thanks Robin,

Ok, so put in my /etc/conf.d/net
modules_eth0=( "!plug" )

To disable plug daemons

Then after hard reboot with no cable:

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:80:66:04:e2:5e brd ff:ff:ff:ff:ff:ff


After inserting cable:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:80:66:04:e2:5e brd ff:ff:ff:ff:ff:ff


Then after 'ip link set eth0 up':

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:80:66:04:e2:5e brd ff:ff:ff:ff:ff:ff



Looks like it detected the cable?
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-02-16 21:11:45 UTC
Yup. I think netplug is the source of the bug then.
volkmar: your bug...