Open enp6s0 opened 2 years ago
Hello, I have the same issue but it appeared that only wired connection hangs. If wi-fi was connected the wireless connection stays alive. Also I used uart0 for troubleshooting. In the logs I see
Oct 08 13:51:51 rpi dhcpcd[606]: eth0: carrier lost
Oct 08 13:51:51 rpi kernel: ------------[ cut here ]------------
Oct 08 13:51:51 rpi kernel: WARNING: CPU: 0 PID: 33 at drivers/net/phy/phy.c:943 phy_error+0x34/0x6c
Oct 08 13:51:51 rpi kernel: Modules linked in: xt_nat xt_tcpudp veth rfcomm xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nft_counter xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc overlay 8021q garp stp llc vc4 spidev brcmfmac snd_soc_hdmi_codec brcmutil cec binfmt_misc drm_kms_helper cfg80211 cdc_acm bcm2835_isp(C) ftdi_sio bcm2835_codec(C) bcm2835_v4l2(C) rpivid_hevc(C) usbserial bcm2835_mmal_vchiq(C) v4l2_mem2mem videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops snd_soc_core videobuf2_v4l2 rfkill videobuf2_common snd_bcm2835(C) raspberrypi_hwmon videodev snd_compress snd_pcm_dmaengine snd_pcm snd_timer v3d i2c_bcm2835 gpu_sched i2c_brcmstb snd vc_sm_cma(C) spi_bcm2835 syscopyarea sysfillrect sysimgblt fb_sys_fops mc uio_pdrv_genirq nvmem_rmem uio drm i2c_dev fuse drm_panel_orientation_quirks
Oct 08 13:51:51 rpi kernel: backlight ip_tables x_tables ipv6
Oct 08 13:51:51 rpi kernel: CPU: 0 PID: 33 Comm: kworker/0:1 Tainted: G C 5.15.68-v7l+ #1586
Oct 08 13:51:51 rpi kernel: Hardware name: BCM2711
Oct 08 13:51:51 rpi kernel: Workqueue: events_power_efficient phy_state_machine
Oct 08 13:51:51 rpi kernel: Backtrace:
Oct 08 13:51:51 rpi kernel: [<c0bd5d9c>] (dump_backtrace) from [<c0bd5fe8>] (show_stack+0x20/0x24)
Oct 08 13:51:51 rpi kernel: r7:000003af r6:c0e3f418 r5:00000000 r4:60000013
Oct 08 13:51:51 rpi kernel: [<c0bd5fc8>] (show_stack) from [<c0bda6f8>] (dump_stack_lvl+0x70/0x94)
Oct 08 13:51:51 rpi kernel: [<c0bda688>] (dump_stack_lvl) from [<c0bda734>] (dump_stack+0x18/0x1c)
Oct 08 13:51:51 rpi kernel: r7:000003af r6:00000009 r5:c08eb2e4 r4:c0e9a62c
Oct 08 13:51:51 rpi kernel: [<c0bda71c>] (dump_stack) from [<c02226c0>] (__warn+0xfc/0x114)
Oct 08 13:51:51 rpi kernel: [<c02225c4>] (__warn) from [<c0bd66a8>] (warn_slowpath_fmt+0x70/0xd8)
Oct 08 13:51:51 rpi kernel: r7:000003af r6:c0e9a62c r5:c1205048 r4:00000000
Oct 08 13:51:51 rpi kernel: [<c0bd663c>] (warn_slowpath_fmt) from [<c08eb2e4>] (phy_error+0x34/0x6c)
Oct 08 13:51:51 rpi kernel: r9:fffffffb r8:c228d400 r7:00000004 r6:c228d738 r5:c228d738 r4:c228d400
Oct 08 13:51:51 rpi kernel: [<c08eb2b0>] (phy_error) from [<c08ec8cc>] (phy_state_machine+0xdc/0x210)
Oct 08 13:51:51 rpi kernel: r5:c1205048 r4:c228d70c
Oct 08 13:51:51 rpi kernel: [<c08ec7f0>] (phy_state_machine) from [<c0240108>] (process_one_work+0x250/0x57c)
Oct 08 13:51:51 rpi kernel: r9:00000000 r8:efefd400 r7:00000000 r6:efef9bc0 r5:c1662480 r4:c228d70c
Oct 08 13:51:51 rpi kernel: [<c023feb8>] (process_one_work) from [<c0240494>] (worker_thread+0x60/0x5c4)
Oct 08 13:51:51 rpi kernel: r10:efef9bc0 r9:c1203d00 r8:efef9bd8 r7:00000008 r6:efef9bc0 r5:c1662498
Oct 08 13:51:51 rpi kernel: r4:c1662480
Oct 08 13:51:51 rpi kernel: [<c0240434>] (worker_thread) from [<c02487b4>] (kthread+0x178/0x194)
Oct 08 13:51:51 rpi kernel: r10:c167e000 r9:c1547e74 r8:00000000 r7:c1662480 r6:c0240434 r5:c166c400
Oct 08 13:51:51 rpi kernel: r4:c166e080
Oct 08 13:51:51 rpi kernel: [<c024863c>] (kthread) from [<c02000d4>] (ret_from_fork+0x14/0x20)
Oct 08 13:51:51 rpi kernel: Exception stack(0xc167ffb0 to 0xc167fff8)
Oct 08 13:51:51 rpi kernel: ffa0: 00000000 00000000 00000000 00000000
Oct 08 13:51:51 rpi kernel: ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Oct 08 13:51:51 rpi kernel: ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Oct 08 13:51:51 rpi kernel: r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c024863c
Oct 08 13:51:51 rpi kernel: r4:c166c400
Oct 08 13:51:51 rpi kernel: ---[ end trace 89c6ec1ab50f7e96 ]---
Oct 08 13:51:51 rpi kernel: bcmgenet fd580000.ethernet eth0: Link is Down
Oct 08 13:51:51 rpi dhcpcd[606]: eth0: deleting address fe80::b1ed:6aa3:bfa9:a171
Oct 08 13:51:51 rpi avahi-daemon[428]: Withdrawing address record for fe80::b1ed:6aa3:bfa9:a171 on eth0.
Oct 08 13:51:51 rpi avahi-daemon[428]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::b1ed:6aa3:bfa9:a171.
Oct 08 13:51:51 rpi avahi-daemon[428]: Interface eth0.IPv6 no longer relevant for mDNS.
Oct 08 13:51:51 rpi avahi-daemon[428]: Withdrawing address record for 192.168.11.67 on eth0.
Oct 08 13:51:51 rpi avahi-daemon[428]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.11.67.
Oct 08 13:51:51 rpi avahi-daemon[428]: Interface eth0.IPv4 no longer relevant for mDNS.
eth0 looks like
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group0
link/ether dc:a6:32:aa:d1:ab brd ff:ff:ff:ff:ff:ff
If I shutdown the script I can bring eth0 up with sudo ifup eth0
But it doesn't restore connectivity, only reboot helps.
I have few docker containers containers running + python scripts that read mcp9808 data from i2c bus And issue repeats on the same platform without sensors connected.
Update: tried on the fresh install of raspbian and I get the same issue. I have 2xRPI4 B 4GB On RPI3 it works without problems
The cause of my issue was wrong mqtt password, after fixing typo in the config the module worked. Still it is totally strange that it caused system to crash, but it works now. Update: After trying to add more pins to config I bumped into the same issue, when eth0 goes hard down and doesn't come up until reboot. It happens if the pin is not correct, I also have feeling if this happens when other process tries to access the pin that is already in use. BTW the "pin" in the config is actually referring to GPIO number and is different from physical pin number.
It is really hard to troubleshoot in headless mode, because it cuts down communication via eth0. The good thing is if wi-fi was connected it doesn't go down. In my case I used another rpi to connect it's UART to serial console of RPI with mqtt-io and get direct console access.
Describe the bug mqtt-io non-deterministically causing a hard lockup on the Raspberry Pi 4B
When
mqtt-io
is started (either directly through the console or throughsystemd
), there is a chance that the entire Pi will just lock up (it won't even respond to network pings, nor local console inputs). On the occasion that it works, there is a syslog message:dmesg
seems to say:But then mqtt-io would start normally and everything works as expected. However, more often than not, nothing happens, and then the Pi would just completely lock up. No error message, no nothing from mqtt-io or Python. The local console seem to complain about the system locking up so hard the filesystem is breaking. At this stage, nothing can be done except for a cold reset:
Observing
htop
results before lockup (by starting the service then immediately running htop), the last thing I observed before the crash was that the Python process that's runningmqtt_io
uses 100% CPU on one core. Not sure if this is important info or not, but I'll just include it just in case. Observing the syslog before lockup does not seem to reveal anything weird.I'm running this on a Raspberry Pi 4B (2GB), but would like to use the
gpiod
driver so that the configuration will (hopefully?) be more portable to another OS that is not Raspbian.Expected behavior mqtt-io should be able to run without locking the Pi up
Config
Hardware
System:
Linux 5.10.63-v8+
)SystemD config
Raspberry Pi config.txt
Would appreciate some insights into this problem. Thanks!