[Solved] [RPi3B] eth0 enable freezes with 5.10

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[Solved] [RPi3B] eth0 enable freezes with 5.10

Postby martinherndl » Sat Mar 13, 2021 3:15 pm

Hi,

I have strange apparently network related issues after upgrading the Kernel from 5.4 to 5.10. The first symptoms were that the Raspberry Pi 3B does not connect via LAN any more and I cannot SSH in. I could still use it via connected monitor and keyboard and then I noticed freezes/hangs when using commands like `ip addr` or `sudo`. After a while an exception with a trace shows up in dmesg.

Are there any known problems or is obvious what the problem could be?

I reverted `config.txt` and `cmdline.txt` to the defaults which did not change anything. Then I tried to collect as much info as possible, e.g. cleaned up output of `dmesg`, `lsusb` and `lsmod` that I will attach. If I do a downgrade in the faulty state everything goes back to normal again after reboot..
I noticed this in January and tried upgrading a few times but had the same problem every time.

I also thought of re-installing the AArch64 variant if this makes sense? I don't use any closed source vendor libs I think.

Any help is greatly appreciated.

Log output bad vs good
https://gist.github.com/monojp/e1a32a79 ... bd1a1faf0f

dmesg bad vs good diff
https://gist.github.com/monojp/256ff31b ... 56f4ed1c17
Last edited by martinherndl on Sun Mar 14, 2021 10:57 am, edited 2 times in total.
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Re: [RPi3B] (network related?) freezes with 5.10

Postby graysky » Sat Mar 13, 2021 3:52 pm

First question: to be clear, you just upgraded your RPi3B from a rather old kernel to the latest kernel and as a result you consistently have no network initialized on a boot? Meaning that multiple reboots result in a non-functional network?

2nd question: I am confused by your statement quoted below since your logs indicate you're running armv7h not aarch64. Are you running armv7h or aarch64?
$this->bbcode_second_pass_quote('martinherndl', 'I') also thought of re-installing the AArch64 variant if this makes sense?


3rd: post the output of:
$this->bbcode_second_pass_code('', 'uname -a')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [RPi3B] (network related?) freezes with 5.10

Postby martinherndl » Sat Mar 13, 2021 5:22 pm

Thanks for taking a look graysky and sorry for being ambiguous..

1. the problems are consistent, yes. rebooting does not change anything, my dmesg output is from the second boot
2. I'm using armv7h but thought about switching to aarch64
3 current working state (with the old kernel):
$this->bbcode_second_pass_code('', 'Linux <hostname> 5.4.83-4-ARCH #1 SMP PREEMPT Wed Jan 20 14:06:49 UTC 2021 armv7l GNU/Linux')
Last edited by martinherndl on Sat Mar 13, 2021 7:25 pm, edited 1 time in total.
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Re: [RPi3B] (network related?) freezes with 5.10

Postby graysky » Sat Mar 13, 2021 5:27 pm

And which kernel package? Post:
$this->bbcode_second_pass_code('', 'pacman -Ss linux-ras')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [RPi3B] (network related?) freezes with 5.10

Postby martinherndl » Sat Mar 13, 2021 7:27 pm

$this->bbcode_second_pass_code('', '
→pacman -Ss linux-ras
core/linux-raspberrypi 5.10.22-3 [installed: 5.4.83-4]
The Linux Kernel and modules - Raspberry Pi
core/linux-raspberrypi-headers 5.10.22-3
Header files and scripts for building modules for linux
kernel - Raspberry Pi
core/linux-raspberrypi4 5.10.22-3
The Linux Kernel and modules - Raspberry Pi 4
core/linux-raspberrypi4-headers 5.10.22-3
Header files and scripts for building modules for linux
kernel - Raspberry Pi 4
')
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Re: [RPi3B] (network related?) freezes with 5.10

Postby graysky » Sat Mar 13, 2021 9:05 pm

If I am not mistaken, the RPi3B can run the linux-raspberrypi4 kernel. If you have another armv7h device and a uSD reader, you can try it and easily recover if I am mistaken.
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [RPi3B] (network related?) freezes with 5.10

Postby martinherndl » Sun Mar 14, 2021 10:41 am

my rsync backup is always ready, trying things out is no problem :)

I actually have the exact same behaviour on the raspberrypi4 kernel as on the default one.

I then continued disabling all services that are affected by freezing and show up in dmesg. After disabling "netctl-ifplugd@eth0" and a reboot things were looking good. It did not took long to get to the apparent root cause. Enabling eth0 does not work / freezes. I disabled all netctl services, rebooted and tried to manually assign the IP and enable the device. When I try the following "ip" just does not do anything anymore
$this->bbcode_second_pass_code('', '
ip link set eth0 up
')
very odd
Last edited by martinherndl on Sun Mar 14, 2021 10:50 am, edited 1 time in total.
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Re: [RPi3B] (network related?) freezes with 5.10

Postby martinherndl » Sun Mar 14, 2021 10:47 am

I got it!

USB autosuspend is the culprit. It was enabled and apparently the device simply does not "wake up" anymore..
After removing the udev rule everything started to work again as on the 5.4 kernel.

See also https://wiki.archlinux.org/index.php/Po ... utosuspend
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Re: [Solved] [RPi3B] eth0 enable freezes with 5.10

Postby graysky » Sun Mar 14, 2021 12:20 pm

If you use systemd-networkd to manage your network, does it behave as expected without the usb autosuspend hack?

1. Disable netctl services
2. Remove your udev rule
3. Put the following in /etc/systemd/network/10-wired.network
$this->bbcode_second_pass_code('', '
[Match]
Name=eth0

[Network]
DHCP=ipv4
')
4. enabled systemd-networkd and reboot
$this->bbcode_second_pass_code('', '# systemctl enable systemd-networkd
# systemctl enable systemd-resolved
# reboot')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: [Solved] [RPi3B] eth0 enable freezes with 5.10

Postby martinherndl » Sun Mar 14, 2021 12:52 pm

I'm pretty confident that netctl has nothing to do with it, after the manual network setup worked I enabled it with ifplugd again.

I was auto suspending all USB devices which is suboptimal I guess :) Just removing that udev rule fixes things and I assume systemd networking should work too. Fyi I'm not using dhcp and have a static IP.

Are you looking for something specific?
martinherndl
 
Posts: 10
Joined: Sat Mar 13, 2021 2:57 pm

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 9 guests