Bug 990139 - Wired connection sticks to unavailable until NetworkManager restart
Wired connection sticks to unavailable until NetworkManager restart
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-30 09:11 EDT by Mark Harfouche
Modified: 2015-02-17 11:27 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 11:27:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/var/log/messages after disconnect and reconnect (12.54 MB, text/plain)
2013-07-31 13:33 EDT, Mark Harfouche
no flags Details

  None (edit)
Description Mark Harfouche 2013-07-30 09:11:29 EDT
Description of problem:
Wired connection always appears as unplugged AFTER I unplug it the first time.

Version-Release number of selected component (if applicable):
Fedora 19 x64

Name        : NetworkManager
Arch        : x86_64
Epoch       : 1
Version     : 0.9.8.2
Release     : 8.git20130709.fc19
Size        : 3.9 M
Repo        : installed
From repo   : updates

How reproducible:
Very

Steps to Reproduce:
1. Boot up computer.
2. Physically connect to a wired network.
3. Notice that the connection was made and that you are now able to connect to the internet.

$nmcli dev
DEVICE     TYPE              STATE        
wlo1       802-11-wireless   connecting (getting IP configuration)
eno1       802-3-ethernet    connected
4. Unplug the ethernet chord
# nmcli dev
DEVICE     TYPE              STATE        
wlo1       802-11-wireless   connected    
eno1       802-3-ethernet    unavailable 
5. Plug back the ethernet chord
$nmcli dev
DEVICE     TYPE              STATE        
wlo1       802-11-wireless   connected    
eno1       802-3-ethernet    unavailable

6. Restart network manager
systemclt restart NetworkManager

7. Now nmcli-dev can detect the ethernet connection
$nmcli dev
DEVICE     TYPE              STATE        
wlo1       802-11-wireless   connected    
eno1       802-3-ethernet    connected

Hardware Info:
Relevant (if you need any other info simply ask) lspci output
01:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 0a)


Expected results:
I should not have to restart NetworkManager to connect to my wired network again.

Additional info:
I CAN switch the network interface on and off from the gnome-shell interface. It simply has trouble when I disconnect the cable.


While spamming nmcli dev with requests to update the ethernet state, it spewed this out exactly the first time the state when from connected->unavailable

** (process:4145): WARNING **: Could not create object for /org/freedesktop/NetworkManager/ActiveConnection/2: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist


** (process:4145): WARNING **: handle_property_changed: failed to update property 'active-connections' of object type NMClient.
Comment 1 Jirka Klimes 2013-07-31 03:35:54 EDT
Please try again unplugging and plugging the cable and then grab and attach /var/log/messages file. Do you see any errors in dmesg?
$ nmcli -f general dev list iface eno1
Comment 2 Mark Harfouche 2013-07-31 12:54:04 EDT
(the interface seems to have change from eno1 to em1 :S)

# nmcli -f general dev list iface em1
GENERAL.DEVICE:                         em1
GENERAL.TYPE:                           802-3-ethernet
GENERAL.VENDOR:                         Realtek Semiconductor Co., Ltd.
GENERAL.PRODUCT:                        --
GENERAL.DRIVER:                         r8169
GENERAL.DRIVER-VERSION:                 2.3LK-NAPI
GENERAL.FIRMWARE-VERSION:               rtl8411-1_0.0.3 06/18/12
GENERAL.HWADDR:                         AC:16:2D:49:89:85
GENERAL.STATE:                          20 (unavailable)
GENERAL.REASON:                         40 (Carrier/link changed)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.2/net/em1
GENERAL.IP-IFACE:                       
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.CONNECTION:                     not connected
Comment 3 Dan Williams 2013-07-31 12:57:44 EDT
Mark, any chance you can attach /var/log/messages showing the cable plug/unplug as Jirka requested?

Also, whats the output of:

cat /sys/class/net/em1/carrier
Comment 4 Mark Harfouche 2013-07-31 13:10:32 EDT
Sorry for the omission of /var/log/messages before. It is being uploaded, but it will be rather slow on my DSL connection (13MB file)

Here is the output you also requested

$ sudo cat /sys/class/net/em1/carrier 
0
Comment 5 Dan Williams 2013-07-31 13:17:42 EDT
(In reply to Mark Harfouche from comment #4)
> Sorry for the omission of /var/log/messages before. It is being uploaded,
> but it will be rather slow on my DSL connection (13MB file)
> 
> Here is the output you also requested
> 
> $ sudo cat /sys/class/net/em1/carrier 
> 0

Is this with the cable plugged in?  If so, then this indicates a kernel bug, since when a cable is connected, this should be '1'.
Comment 6 Mark Harfouche 2013-07-31 13:21:31 EDT
Yes the cable is still plugged in. My router detects that there is something at the other end too. Does this mean it is a Kernel bug?

Kernel version
Linux charlie 3.10.3-300.fc19.x86_64 #1 SMP Fri Jul 26 00:00:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I think this was happening with kernel 3.9 too, can't check now since it would stop the upload.
Comment 7 Mark Harfouche 2013-07-31 13:33:05 EDT
Created attachment 781281 [details]
/var/log/messages after disconnect and reconnect
Comment 8 Dan Williams 2013-07-31 13:41:47 EDT
(In reply to Mark Harfouche from comment #6)
> Yes the cable is still plugged in. My router detects that there is something
> at the other end too. Does this mean it is a Kernel bug?
> 
> Kernel version
> Linux charlie 3.10.3-300.fc19.x86_64 #1 SMP Fri Jul 26 00:00:58 UTC 2013
> x86_64 x86_64 x86_64 GNU/Linux
> 
> I think this was happening with kernel 3.9 too, can't check now since it
> would stop the upload.

Yes, if a cable is plugged in, and 'ifconfig' shows the interface is UP, then we expect /sys/class/net/em1/carrier to be 1.  If that's not the case, then there's a driver bug in the kernel.

In your logs, this is the kernel message about link changes:

Jul 31 13:02:07 charlie kernel: [ 3392.683673] r8169 0000:01:00.2 em1: link up
Jul 31 13:02:16 charlie kernel: [ 3401.572235] r8169 0000:01:00.2 em1: link down

if you run:

watch -n 1 "dmesg | tail -n 30"

and plug/unplug the cable every 2 seconds or so, do you see a corresponding message for each plug/unplug?  If not, it's almost definitely a kernel bug.
Comment 9 Mark Harfouche 2013-07-31 13:59:04 EDT
You know what is really weird, if 

unplug it, and plug it back in quickly, I see 

[ 6529.022955] r8169 0000:01:00.2 em1: link up
[ 6537.654244] r8169 0000:01:00.2 em1: link down
[ 6539.611636] r8169 0000:01:00.2 em1: link up
[ 6541.945655] r8169 0000:01:00.2 em1: link down
[ 6543.587587] r8169 0000:01:00.2 em1: link up
[ 6573.517569] r8169 0000:01:00.2 em1: link down
[ 6575.143578] r8169 0000:01:00.2 em1: link up

running watch -n 1 "dmesg | tail -n 30"

(I tested it a few times there)

But if i wait until the little NetworkManager icon in Gnome-Shell notices that the interface is down (roughly 2 seconds), then it won't detect that the ethernet cable is in anymore.








Note: I don't need to reset my interface, I don't need to restart NetworkMangager via

systemctl restart NetworkManager

I only need to restart the interface
sudo ifconfig em1 down
sudo ifconfig em1 up
Comment 10 Mark Harfouche 2013-07-31 14:00:46 EDT
I don't see any error messages in dmseg.
Comment 11 Fedora End Of Life 2015-01-09 14:10:40 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Fedora End Of Life 2015-02-17 11:27:08 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.