Bug 637183 - /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0: Invalid argument
Summary: /etc/sysconfig/network/scripts/ifplugd-selectif: line 40: read: read error: 0...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: Network (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 11.2
: P3 - Medium : Normal with 1 vote (vote)
Target Milestone: ---
Deadline: 2011-02-21
Assignee: Marius Tomaschewski
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.3:37959 maint:relea...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-04 14:05 UTC by Martin Schröder
Modified: 2016-04-15 14:00 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
boot.msg (87.91 KB, text/plain)
2010-09-04 14:05 UTC, Martin Schröder
Details
dmesg (58.57 KB, text/plain)
2010-09-04 14:06 UTC, Martin Schröder
Details
Patch that should fix the error handling/reporting (1.21 KB, patch)
2010-10-08 08:42 UTC, Marius Tomaschewski
Details | Diff
Patch fixing the error handling/reporting (1.11 KB, patch)
2010-10-26 11:42 UTC, Marius Tomaschewski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schröder 2010-09-04 14:05:14 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.
Comment 1 Martin Schröder 2010-09-04 14:06:15 UTC
Created attachment 387615 [details]
dmesg
Comment 2 Bin Li 2010-09-25 08:45:27 UTC
HongDan,

 Could you help me take care of it?
Comment 3 Bin Li 2010-09-25 10:41:04 UTC
Martin,

 The error occurred when read /sys/class/net/wlan0/carrier, so could list your /sys/class/net directory with ls?
Comment 4 Martin Schröder 2010-10-03 13:52:28 UTC
(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?
Comment 5 Hong Dan Liu 2010-10-08 03:56:49 UTC
(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.
Comment 6 Bin Li 2010-10-08 07:44:41 UTC
Marius,

 Any idea about this? Should we got the carrier when the wlan is disabled via kill switch?

 Thanks!
Comment 7 Marius Tomaschewski 2010-10-08 08:40:16 UTC
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...
Comment 8 Marius Tomaschewski 2010-10-08 08:42:45 UTC
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.
Comment 9 Marius Tomaschewski 2010-10-08 08:52:10 UTC
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...
Comment 10 Hong Dan Liu 2010-10-08 10:12:57 UTC
reassign to Marius.
Comment 11 Marius Tomaschewski 2010-10-26 11:42:11 UTC
Created attachment 397040 [details]
Patch fixing the error handling/reporting

Tested, works fine for me.
Comment 12 Marius Tomaschewski 2010-10-26 12:00:40 UTC
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?
Comment 13 Martin Schröder 2010-10-26 12:06:19 UTC
(In reply to comment #12)
> Martin, can you test it?

No, as I just quit the job which provides this notebook and 11.2 :-)
Comment 14 Marius Tomaschewski 2010-10-26 12:15:18 UTC
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.
Comment 16 Christian Dengler 2010-10-27 15:21:19 UTC
We can pick it up with the next sysconfig update I think (-1).
Comment 17 Christian Dengler 2010-11-09 14:23:14 UTC
for the next update
Comment 20 Swamp Workflow Management 2011-01-03 07:48:17 UTC
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource
Products:
openSUSE 11.3 (debug, i586, x86_64)
Comment 21 Swamp Workflow Management 2011-01-12 20:53:21 UTC
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)
Comment 22 Swamp Workflow Management 2011-02-14 18:06:00 UTC
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.
Comment 23 Swamp Workflow Management 2011-04-14 09:32:04 UTC
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource
Products:
openSUSE 11.2 (debug, i586, x86_64)
openSUSE 11.3 (debug, i586, x86_64)
Comment 24 Bernhard Wiedemann 2016-04-15 14:00:37 UTC
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