Bugzilla – Bug 637183
/etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument
Last modified: 2016-04-15 14:00:37 UTC
Created attachment 387614 [details] boot.msg User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-1.3 Firefox/3.6.8 At bootup I get these messages: ------------------ <notice -- Sep 4 15:27:57.953566000> service earlyxdm doneStarting service kdmdone Setting up (localfs) network interfaces: lo lo IP address: 127.0.0.1/8 IP address: 127.0.0.2/8 lo done eth0 device: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02) eth0 is controlled by ifplugd eth0 waiting wlan0 device: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02) wlan0 is controlled by ifplugd wlan0 waiting eth0 device: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02) eth0 ifplugd is running eth0 no cable connected eth0 . . . is just beeing set up eth0 done wlan0 device: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02) wlan0 ifplugd is running /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument wlan0 no cable connected wlan0 . . . is just beeing set up wlan0 is down wlan0 ------------------ dmesg etc. are attached. The wlan is disabled via kill switch. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 387615 [details] dmesg
HongDan, Could you help me take care of it?
Martin, The error occurred when read /sys/class/net/wlan0/carrier, so could list your /sys/class/net directory with ls?
(In reply to comment #3) > The error occurred when read /sys/class/net/wlan0/carrier, so could list your > /sys/class/net directory with ls? ------------------------- lrwxrwxrwx 1 root root 0 2. Okt 20:11 eth0 -> ../../devices/pci0000:00/0000:00:1c.5/0000:09:00.0/net/eth0 lrwxrwxrwx 1 root root 0 2. Okt 20:11 lo -> ../../devices/virtual/net/lo lrwxrwxrwx 1 root root 0 2. Okt 20:11 wlan0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:0c:00.0/net/wlan0 > LANG=C ls -la /sys/class/net/wlan0/ total 0 drwxr-xr-x 4 root root 0 Oct 2 23:51 . drwxr-xr-x 3 root root 0 Oct 2 23:51 .. -r--r--r-- 1 root root 4096 Oct 3 13:19 addr_len -r--r--r-- 1 root root 4096 Oct 3 13:19 address -r--r--r-- 1 root root 4096 Oct 3 13:19 broadcast -r--r--r-- 1 root root 4096 Oct 3 13:19 carrier -r--r--r-- 1 root root 4096 Oct 3 13:19 dev_id lrwxrwxrwx 1 root root 0 Oct 3 12:36 device -> ../../../0000:0c:00.0 -r--r--r-- 1 root root 4096 Oct 3 13:19 dormant -r--r--r-- 1 root root 4096 Oct 3 13:19 features -rw-r--r-- 1 root root 4096 Oct 3 13:19 flags -rw-r--r-- 1 root root 4096 Oct 3 13:19 ifalias -r--r--r-- 1 root root 4096 Oct 3 12:36 ifindex -r--r--r-- 1 root root 4096 Oct 3 13:19 iflink -r--r--r-- 1 root root 4096 Oct 3 13:19 link_mode -rw-r--r-- 1 root root 4096 Oct 3 13:19 mtu -r--r--r-- 1 root root 4096 Oct 3 13:19 operstate lrwxrwxrwx 1 root root 0 Oct 3 13:19 phy80211 -> ../../ieee80211/phy0 drwxr-xr-x 2 root root 0 Oct 3 13:19 power drwxr-xr-x 2 root root 0 Oct 3 13:19 statistics lrwxrwxrwx 1 root root 0 Oct 3 13:19 subsystem -> ../../../../../../class/net -rw-r--r-- 1 root root 4096 Oct 3 13:19 tx_queue_len -r--r--r-- 1 root root 4096 Oct 3 12:36 type -rw-r--r-- 1 root root 4096 Oct 3 01:05 uevent > LANG=C cat /sys/class/net/wlan0/carrier cat: /sys/class/net/wlan0/carrier: Invalid argument ------------------------- wlan0 is currently disabled via the kill switch. Could that cause this problem?
(In reply to comment #4) > > LANG=C cat /sys/class/net/wlan0/carrier > cat: /sys/class/net/wlan0/carrier: Invalid argument > ------------------------- > > wlan0 is currently disabled via the kill switch. Could that cause this > problem? Yes. A device is not able to indicate carrier accurately when the device is not currently running. So you will get an -EINVAL until the device is brought up. The reason is that most drivers don't even probe the link or negotiate link speed and flow control until the device is brought up. Many don't even power up the PHY when the device is down, in order to save power. If you disable eth0, /sys/class/net/eth0/carrier can't be read either.
Marius, Any idea about this? Should we got the carrier when the wlan is disabled via kill switch? Thanks!
No, as explained by Hong Dan in comment 5, it is normal that the carrier is not readable in several cases, basically when the hw is not (yet) ready to report it. It is even worser, sometime the drivers reports (reported) there is carrier, but drop anything for a "long time": when I remember correctly, bnx2 driver reports/reported carrier, but the hardware still dropped for _30_ secs... No idea if and where this is fixed in the kernel driver in the meantime or not yet. ifplugd-selectif waits 10 secs (40 * 0.25 sec) to get it and gives up, what is IMO fine here. The problem here is the error reporting only -- we may not throw away the read error correctly and should not speak about "cable" in wlan case...
Created attachment 393735 [details] Patch that should fix the error handling/reporting This patch _should_ fix the error reporting in ifplugd-selectif, but I didn't tested it yet.
See above. Please reassign to me, when you're done with this bug and I should fix the error handling/reporting in ifplugd-selectif. Martin, there is a optional /etc/sysconfig/network/scripts/link_wait script (on 11.3 at least), that can be used to wait in e.g. the bnx2 case. But see also bug 644738; the ping variant in it seems to not work correctly in all cases and may just report errors instead of wait...
reassign to Marius.
Created attachment 397040 [details] Patch fixing the error handling/reporting Tested, works fine for me.
Applied the patch (git variant) to: $OBS/home:mtomaschewski:branches:openSUSE:11.2:Update:Test/sysconfig It will appear soon at: http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/openSUSE:/11.2:/Update:/Test/openSUSE_11.2_Update_Test/ Martin, can you test it?
(In reply to comment #12) > Martin, can you test it? No, as I just quit the job which provides this notebook and 11.2 :-)
OK, thanks for the report anyway!! The fix is in master of http://gitorious.org/opensuse/sysconfig and will be in the next submission to Base:System / Factory.
We can pick it up with the next sysconfig update I think (-1).
for the next update
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource Products: openSUSE 11.3 (debug, i586, x86_64)
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource Products: SLE-DEBUGINFO 11-SP1 (i386, ia64, ppc64, s390x, x86_64) SLE-DESKTOP 11-SP1 (i386, x86_64) SLE-SERVER 11-SP1 (i386, ia64, ppc64, s390x, x86_64) SLES4VMWARE 11-SP1 (i386, x86_64)
The SWAMPID for this issue is 38677. This issue was rated as important. Please submit fixed packages until 2011-02-21. When done, please reassign the bug to security-team@suse.de. Patchinfo will be handled by security team.
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource Products: openSUSE 11.2 (debug, i586, x86_64) openSUSE 11.3 (debug, i586, x86_64)
This is an autogenerated message for OBS integration: This bug (637183) was mentioned in https://build.opensuse.org/request/show/52837 Factory / sysconfig https://build.opensuse.org/request/show/61166 11.2:Test / sysconfig