Closed
Description
TLDR; The eth0 carrier state flag gets stuck at '1' if /sys/class/net/eth0/carrier is polled within <1 second after unplugging the network cable. Systems that depend on it then fail (e.g. route).
Hardware (3 devices were tested, on 2 different networks):
- RPI3B+ (rev. a020d3), new raspbian (kernel 4.14.79-v7+).
- Raspberry pi official power supply (5.1V, 2.5A)
- peripherals: ethernet cable, usb keyboard (dell), hdmi screen (dell).
Setup
- OS (2018-11-13-raspbian-stretch-lite.img) is written to SD-card, ssh is not enabled.
- ethernet cable is plugged in before boot.
- local login.
- cat /sys/class/net/eth0/carrier (do enter yet!)
- unplug ethernet cable
- enter within 1 second after unplug.
- (To retry a reboot is needed.)
Result
The /sys/class/net/eth0/carrier flag gets stuck at '1'.
Also, the 'route' command hangs as the os probably doesn't know the interface is down (route -n works).
Expected result
The /sys/class/net/eth0/carrier flag becomes '0'
Situation where this issue is relevant
A script may be checking the carrier flag to failover to WiFi, for example every 10 seconds. However, every once in a while a race condition can occur where this bug is triggered on disconnecting the cable.
Metadata
Metadata
Assignees
Labels
No labels