Skip to contentSkip to conversation

Problems with udev > 106 and multiple network cards

DISCUSSION Gabriel C 3 participants 8 messages Apr 10, 2007 – Apr 12, 2007

lore
Share & tools
lore

Gabriel C

author
#0 lore raw

Hello,

I have some problems with udev 107 and 108 with my network cards.

This box has 3 network cards ( 2 at the moment ) a buildin sis900 , and 2 RealTek cards one USB and one pcmcia.

I use the pcmcia RealTek one as default , sis900 is not used while borken and the usb one is used just sometimes for my LAN.

I use on this box minimal initramfs ( FS drivers etc to boot ) but I get the same problem without initramfs too.

After upgrading from udev 106 to 107 ( later to 108 ) and rebooting the
box my network stoped working.

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

The only way to make my network work was to blacklist the drivers from sis and the USB one, and edit the *-net rules manually but as soon I add any other card ,
or remove the drivers from the blacklist I have the same problem.

I've also tested udev 107 and 108 with a lot kernels 2.6.20.X , 2.6.21-rc{5,6}.git{X} and latest -mm kernel and I have the same problem on all.

I noticed one more strange thing with the db , while in <= 106 the db was like foo\@bar -> something , >106 looks here like %2fbar%2fbaz -> something
( http://frugalware.org/~crazy/other/udev/udev_db.txt )

Going back to udev 106 make everything working again. ( with all kernels with or without initramfs ).

Any idea what could cause this problems ?

Regards,

Gabriel C

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

On Wednesday 11 April 2007, Gabriel C wrote:
[...]

Quoted 11 lines

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

well it is possible that your rules are now confused by this commit. At least, it is the only one that has something to do with network interfaces:

commit eb5b86405b14ca2ac2508f9dec9862cc57110131

Author: Kay Sievers <[email protected]>
Date:   Mon Mar 19 09:56:53 2007 +0100

update %n on netif name change

:100644 100644 24f65ca... 03514e1... M  udev_device.c
:100644 100644 ea02b8e... f8844a8... M  udev_rules.c
:100644 100644 7431dd6... 1846a42... M  udev_sysfs.c

You could try to revert it as quick check.

Quoted 5 lines

I noticed one more strange thing with the db , while in <= 106 the db was like foo\@bar -> something , >106 looks here like %2fbar%2fbaz -> something
( http://frugalware.org/~crazy/other/udev/udev_db.txt )

Yes it is this one:

commit 9c6ad9fbbac82e517f5e748ddbe166f96f120afe

Author: Kay Sievers <[email protected]>
Date:   Wed Mar 14 21:41:33 2007 +0100

encode db-file names, instead of just replacing '/'

:100644 100644 849de96... 200d7e8... M  udev.h
:100644 100644 b1217d8... 9032eef... M  udev_db.c
:100644 100644 8cda472... b0641f0... M  udev_utils_string.c
:100644 100644 961ceb5... 07f1c48... M  udevd.c
:100644 100644 c809d2d... 2bdd0c8... M  udevtrigger.c

-andrey

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Gabriel C
Quoted 24 lines · Gabriel C

Hello,

I have some problems with udev 107 and 108 with my network cards.

This box has 3 network cards ( 2 at the moment ) a buildin sis900 , and 2 RealTek cards one USB and one pcmcia.

I use the pcmcia RealTek one as default , sis900 is not used while borken and the usb one is used just sometimes for my LAN.

I use on this box minimal initramfs ( FS drivers etc to boot ) but I get the same problem without initramfs too.

After upgrading from udev 106 to 107 ( later to 108 ) and rebooting the
box my network stoped working.

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Quoted 4 lines

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

I suspect it is this bug:
http://thread.gmane.org/gmane.linux.hotplug.devel/11001

Look into /etc/udev/rules.d/70-persistent-net.rules, and
into /dev/.udev/tmp-rules--70-persistent-net.rules if there are rules that set the same name for two different cards (mac addresses).
The tmp-location is used as long as / is read-only at udev startup time.

Easiest is to delete both files and reboot / or edit the set names for net-devices to be unique. Then the error should be gone.
If not you found another bug.

Quoted 6 lines

I noticed one more strange thing with the db , while in <= 106 the db was like foo\@bar -> something , >106 looks here like %2fbar%2fbaz -> something
( http://frugalware.org/~crazy/other/udev/udev_db.txt )

This is OK, it's the new name-encoding.

Matthias

Signature · 11 lines
Matthias Schwarzott (zzam)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#3 lore raw
In reply to Gabriel C
Quoted 28 lines · Matthias Schwarzott
Quoted 24 lines · Gabriel C

Hello,

I have some problems with udev 107 and 108 with my network cards.

This box has 3 network cards ( 2 at the moment ) a buildin sis900 , and 2 RealTek cards one USB and one pcmcia.

I use the pcmcia RealTek one as default , sis900 is not used while borken and the usb one is used just sometimes for my LAN.

I use on this box minimal initramfs ( FS drivers etc to boot ) but I get the same problem without initramfs too.

After upgrading from udev 106 to 107 ( later to 108 ) and rebooting the
box my network stoped working.

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Quoted 8 lines
Quoted 5 lines

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

I suspect it is this bug:
http://thread.gmane.org/gmane.linux.hotplug.devel/11001

Yes is the same problem.

Quoted 10 lines

Look into /etc/udev/rules.d/70-persistent-net.rules, and
into /dev/.udev/tmp-rules--70-persistent-net.rules if there are rules that set the same name for two different cards (mac addresses).
The tmp-location is used as long as / is read-only at udev startup time.

Easiest is to delete both files and reboot / or edit the set names for net-devices to be unique. Then the error should be gone.
If not you found another bug.

I said editing the *rules manually make them work but this is a very ugly workaround for this problem.

I've detelet both rules and now after rebooting the box only the /dev/.udev/tmp-* one is created.

The *_rename thing is gone but there is still something wrong.

eth0 is eth1 and it is the only card right now here :

$ ls -1 /sys/class/net
eth1@
lo@
ppp0@

ifconfig -a | grep eth
eth1 Link encap:Ethernet HWaddr 00:80:5A:24:8C:FA

So is the same problem but I guess the bug is different.

Quoted 8 lines
Quoted 6 lines

I noticed one more strange thing with the db , while in <= 106 the db was like foo\@bar -> something , >106 looks here like %2fbar%2fbaz -> something
( http://frugalware.org/~crazy/other/udev/udev_db.txt )

This is OK, it's the new name-encoding.

Ok , thx for the info.

Quoted 3 lines

Matthias

Gabriel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#4 lore raw
In reply to Gabriel C
Quoted 23 lines · Andrey Borzenkov

On Wednesday 11 April 2007, Gabriel C wrote:
[...]

Quoted 7 lines

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Quoted 5 lines

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

well it is possible that your rules are now confused by this commit. At least, it is the only one that has something to do with network interfaces:

commit eb5b86405b14ca2ac2508f9dec9862cc57110131

Author: Kay Sievers <[email protected]>
Date:   Mon Mar 19 09:56:53 2007 +0100
Quoted 10 lines

update %n on netif name change

:100644 100644 24f65ca... 03514e1... M  udev_device.c
:100644 100644 ea02b8e... f8844a8... M  udev_rules.c
:100644 100644 7431dd6... 1846a42... M  udev_sysfs.c

You could try to revert it as quick check.

Reverting it does't change something.

Quoted 2 lines

-andrey

Gabriel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

author
#5 lore raw
In reply to Gabriel C
Quoted 68 lines · Gabriel C
Quoted 30 lines · Matthias Schwarzott
Quoted 25 lines · Gabriel C

Hello,

I have some problems with udev 107 and 108 with my network cards.

This box has 3 network cards ( 2 at the moment ) a buildin sis900 , and 2 RealTek cards one USB and one pcmcia.

I use the pcmcia RealTek one as default , sis900 is not used while borken and the usb one is used just sometimes for my LAN.

I use on this box minimal initramfs ( FS drivers etc to boot ) but I get the same problem without initramfs too.

After upgrading from udev 106 to 107 ( later to 108 ) and rebooting the
box my network stoped working.

I figured the 'cards names' looks weird , random they are called now ethX_rename (
http://frugalware.org/~crazy/other/udev/sys_class_net.txt |
http://frugalware.org/~crazy/other/udev/ifconfig-a.txt )
as well I get for each card an long timeout ( 5 to 15 seconds for each wrong named card ) on boot because the 70-persistent-net.rules.

Quoted 10 lines
Quoted 6 lines

Deleting the rules before udev starts make the timout be human again ( like 2 - 3 seconds ) but the rules are still wrong because I get as NAME ethX_rename.

I suspect it is this bug:
http://thread.gmane.org/gmane.linux.hotplug.devel/11001

Yes is the same problem.

Quoted 11 lines

Look into /etc/udev/rules.d/70-persistent-net.rules, and
into /dev/.udev/tmp-rules--70-persistent-net.rules if there are rules that set the same name for two different cards (mac addresses).
The tmp-location is used as long as / is read-only at udev startup time.

Easiest is to delete both files and reboot / or edit the set names for net-devices to be unique. Then the error should be gone.
If not you found another bug.

I said editing the *rules manually make them work but this is a very ugly workaround for this problem.

I've detelet both rules and now after rebooting the box only the /dev/.udev/tmp-* one is created.

The *_rename thing is gone but there is still something wrong.

eth0 is eth1 and it is the only card right now here :

Quoted 8 lines
$ ls -1 /sys/class/net
eth1@
lo@
ppp0@

ifconfig -a | grep eth
eth1 Link encap:Ethernet HWaddr 00:80:5A:24:8C:FA

This problem is fixed in git for me by this commit :

http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h�313e1b48866efb9e40eb88420643de05275b56

Quoted 4 lines

So is the same problem but I guess the bug is different.

I've played around abit and I think I know the reason for this problem but I have no idea where the bug is in code. ( maybe is the kernel ? )

I have also an FireWire device too which is there as :

/sys/class/net/eth0 -> ../../devices/virtual/net/eth0/

INTERFACE="eth0" DEVPATH="/sys/class/net/eth0" \

Quoted 1 line

sudo /lib/udev/write_net_rules

No MAC address for eth0.

This virtual device is causing the whole problem. Udev does not write any rules for it ( knows about it ? ) and without to blacklist the firewire driver
eth0 is always the firewire devices as :

eth0 Link encap:UNSPEC HWaddr
00-40-D0-01-00-15-F6-9E-00-00-00-00-00-00-00-00
....

Booting with Firewire device the sis and pcmcia card I get this rules , generated by udev :

# PCI device 0x1039:0x0900 (sis900)
SUBSYSTEM="net", DRIVERS="?*", ATTRS{address}="00:40:d0:42:ed:0b", NAME="eth2"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM="net", DRIVERS="?*", ATTRS{address}="00:80:5a:24:8c:fa", NAME="eth1"

Trying now to make eth1 -> eth0 I get on next boot ( with an long timeout ) :

.....

eth2 Link encap:Ethernet HWaddr 00:40:D0:42:ED:0B BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:11 Base address:0xe400

eth2_rena Link encap:Ethernet HWaddr 00:80:5A:24:8C:FA BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:10 Base address:0xa000

...

With the patch from git and blacklisted eth1394 driver things are working again but is again ugly workarounded.

I guess to fix this problem udev need to ignore such /virtual/ devices ?

Regards,

Gabriel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Gabriel C
Quoted 7 lines · Gabriel C

I have also an FireWire device too which is there as :

/sys/class/net/eth0 -> ../../devices/virtual/net/eth0/

INTERFACE="eth0" DEVPATH="/sys/class/net/eth0" \

Quoted 7 lines
Quoted 1 line

sudo /lib/udev/write_net_rules

No MAC address for eth0.

This virtual device is causing the whole problem. Udev does not write any rules for it ( knows about it ? ) and without to blacklist the firewire driver

Perhaps you miss some rule like:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="address"

Does udevtrigger creates an appropriate rule?

Quoted 13 lines

eth0 is always the firewire devices as :

eth0 Link encap:UNSPEC HWaddr
00-40-D0-01-00-15-F6-9E-00-00-00-00-00-00-00-00
....

Booting with Firewire device the sis and pcmcia card I get this rules , generated by udev :

Quoted 5 lines

With the patch from git and blacklisted eth1394 driver things are working again but is again ugly workarounded.

I guess to fix this problem udev need to ignore such /virtual/ devices ?

Ignoring will not help, as then udev still hangs on its (60sec) timeout if the name it wants to give to some eth card is used by your eth1394 device. Perhaps post the content of 70-persistent-net.rules, and
udevinfo -a -p /sys/class/net/eth? for the eth1394 device.

Btw. why does this driver uses eth? as the device name and not something prefixed with firewire?

Regards
Matthias

Signature · 11 lines
Matthias Schwarzott (zzam)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
author
#7 lore raw
In reply to Gabriel C
Quoted 17 lines · Matthias Schwarzott
Quoted 6 lines · Gabriel C

I have also an FireWire device too which is there as :

/sys/class/net/eth0 -> ../../devices/virtual/net/eth0/

INTERFACE="eth0" DEVPATH="/sys/class/net/eth0" \

Quoted 8 lines
Quoted 1 line

sudo /lib/udev/write_net_rules

No MAC address for eth0.

This virtual device is causing the whole problem. Udev does not write any rules for it ( knows about it ? ) and without to blacklist the firewire driver

Quoted 5 lines

Perhaps you miss some rule like:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="address"

Does udevtrigger creates an appropriate rule?

Yes I was actually missing it. Thx.

Quoted 18 lines
Quoted 18 lines

eth0 is always the firewire devices as :

eth0 Link encap:UNSPEC HWaddr
00-40-D0-01-00-15-F6-9E-00-00-00-00-00-00-00-00
....

Booting with Firewire device the sis and pcmcia card I get this rules , generated by udev :

With the patch from git and blacklisted eth1394 driver things are working again but is again ugly workarounded.

Quoted 8 lines
Quoted 3 lines

I guess to fix this problem udev need to ignore such /virtual/ devices ?

Ignoring will not help, as then udev still hangs on its (60sec) timeout if the name it wants to give to some eth card is used by your eth1394 device. Perhaps post the content of 70-persistent-net.rules, and
udevinfo -a -p /sys/class/net/eth? for the eth1394 device.

I solved it by adding the missing rules and prefixing firewire with fw-eth%n as you suggested.

Thank you very much for your help.

Quoted 3 lines

Btw. why does this driver uses eth? as the device name and not something prefixed with firewire?

Good question :) I never cared about because everything worked fine.

I'm not really sure what the best method is to match all firewire devices with a udev rules.

So far I see all this ethX_firewire devices have :

ATTR{type}="24"

So I've created a rule like this one :

ACTION="add", SUBSYSTEM="net", ATTR{type}="24", NAME="fw-eth%n"

which works fine but may be not the best solution. Do you know the right way to do this ?

Maybe udev should have some rules to prefix this devices by default ?

Quoted 4 lines

Regards
Matthias

Regards,

Gabriel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel