networkmanager possibly misses udev add events occasionally



Hi!
I have faced with a problem that eth0 is not initialized always at boot. I have traced the problem and now it seems that networkmanager (possibly??) ignores/does not notice udev add events.
Ifconfig reports then only lo interface that is coming from /etc/network/interfaces.

Only following two lines related to eth0/ethernet are present in journal when problem hits:
Jan 10 15:04:31 cpr3 kernel[437]: [    1.061954] cpsw 4a100000.ethernet: Detected MACID = 50:72:24:bf:89:f0
Jan 10 15:04:31 cpr3 kernel[437]: [    1.068965] cpsw 4a100000.ethernet: cpts: overflow check period 850

Then /sys/class/net/eth0 provides following responses:
# cat /sys/class/net/eth0/carrier
cat: read error: Invalid argument
# cat /sys/class/net/eth0/uevent
INTERFACE=eth0
IFINDEX=2
So, carrier is not initialized, but there has beed uevent add event!

However, following lines get journaled from eth0/ethernet when everything is fine:
Jan 10 15:04:34 cpr3 kernel[578]: [    1.061927] cpsw 4a100000.ethernet: Detected MACID = 50:72:24:bf:89:f0
Jan 10 15:04:34 cpr3 kernel[578]: [    1.068931] cpsw 4a100000.ethernet: cpts: overflow check period 850
Jan 10 15:04:37 cpr3 NetworkManager[534]: <info>  devices added (path: /sys/devices/platform/ocp/4a100000.ethernet/net/eth0, iface: eth0)
Jan 10 15:04:37 cpr3 NetworkManager[534]: <info>  device added (path: /sys/devices/platform/ocp/4a100000.ethernet/net/eth0, iface: eth0): no ifupdown configuration found.
Jan 10 15:04:38 cpr3 NetworkManager[534]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/eth0 (754f5a0d-0fcf-49c2-8e1a-4560502f38c1,"eth0")
Jan 10 15:04:38 cpr3 NetworkManager[534]: <info>  (eth0): new Ethernet device (carrier: OFF, driver: 'cpsw', ifindex: 2)
Jan 10 15:04:38 cpr3 NetworkManager[534]: <info>  (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan 10 15:04:38 cpr3 kernel: net eth0: initializing cpsw version 1.12 (0)
Jan 10 15:04:38 cpr3 kernel: net eth0: initialized cpsw ale version 1.4
Jan 10 15:04:38 cpr3 kernel[578]: [   19.947868] net eth0: initializing cpsw version 1.12 (0)
Jan 10 15:04:38 cpr3 kernel[578]: [   19.953477] net eth0: initialized cpsw ale version 1.4
Jan 10 15:04:38 cpr3 kernel: net eth0: ALE Table size 1024
Jan 10 15:04:38 cpr3 kernel[578]: [   19.970013] net eth0: ALE Table size 1024
Jan 10 15:04:38 cpr3 kernel: net eth0: phy found : id is : 0x7c0f1
Jan 10 15:04:38 cpr3 kernel[578]: [   19.989109] net eth0: phy found : id is : 0x7c0f1
Jan 10 15:04:42 cpr3 kernel: cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Jan 10 15:04:42 cpr3 kernel[578]: [   24.034502] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Jan 10 15:04:42 cpr3 NetworkManager[534]: <info>  (eth0): link connected
Jan 10 15:04:42 cpr3 NetworkManager[534]: <info>  (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Jan 10 15:04:42 cpr3 NetworkManager[534]: <info>  Auto-activating connection 'eth0'.
Jan 10 15:04:42 cpr3 NetworkManager[534]: <info>  (eth0): Activation: starting connection 'eth0' (754f5a0d-0fcf-49c2-8e1a-4560502f38c1)
Jan 10 15:04:43 cpr3 NetworkManager[534]: <info>  (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jan 10 15:04:43 cpr3 NetworkManager[534]: <info>  (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
Jan 10 15:04:43 cpr3 NetworkManager[534]: <info>  (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
Jan 10 15:04:43 cpr3 NetworkManager[534]: <info>  Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jan 10 15:04:43 cpr3 NetworkManager[534]: <info>  (eth0): DHCPv4 state changed unknown -> bound

Then /sys/class/net/eth0 provides following responses:
cat /sys/class/net/eth0/carrier
1
# cat /sys/class/net/eth0/uevent                       
INTERFACE=eth0
IFINDEX=2

I iserted /etc/udev/scripts/network.sh debug printing from every event and it looks lit it prints both lo and eth0 interfaces at every boot.

What else/where could I check check?

I'm running linux kernel version 4.4/networkmanager 1.0.10 on am335x based board.

Thanks,
Matti


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]