Skip to content

Possible tx stall with macb on pi5/cm5 with 6.18(.24) #7339

Closed

Description

@nbuchwitz

Describe the bug

@lukaszraczylo posted an RFC about a possible tx stall in the macb driver on rp1. Ran into the same on a CM5 today and the symptoms match: link comes up but tx_packets stops incrementing, rx still works, ip link set eth0 down/up recovers it. Often after a link bounce.

Will test the RFC series and update this issue, then post a PR with the patches once I've dug a bit deeper. Issue is just meant as info for others with the same symptoms.

Netdev discussion: https://lore.kernel.org/netdev/cover.1777064117.git.lukasz@raczylo.com/

(6.18.22 ran fine, started seeing it after updating our downstream tree to 6.18.24. Per the upstream report it also reproduces on 6.17, so likely latent rather than a 6.18.24 regression.)

Steps to reproduce the behaviour

Run 6.18.24 on Pi5/CM5

Device (s)

Raspberry Pi CM5

System

Linux RevPi150349 6.18.24-revpi0-rpi-v8 #1+deb12+1+260427+g895e84f73e SMP PREEMPT_RT Mon Apr 27 20:46:08 aarch64 GNU/Linux

(also ran into this with stock rpi kernel)

Logs

No response

Additional context

No response

Activity

  1. lukaszraczylo commented on Apr 28, 2026

    @lukaszraczylo
    Contributor

    As a background - there's bit more of discussions :

    I have prepared PR for you as well ( perfect timing as I just wrapped the siderolabs/pkgs one ) - #7340

  2. koeqaife commented on Apr 28, 2026

    @koeqaife

    I just wanted to actually make issue about that. My network got frozen 4 times in 2 days... Had to make watchdog because kernel doesn't even implement TX watchdog, so my all connections get frozen (including wifi on LAN, because it tries to respond through ethernet even if request went from wifi). Also PHY runs on polling instead of interrupts which is weird

  3. lukaszraczylo commented on Apr 28, 2026

    @lukaszraczylo
    Contributor

    @koeqaife I've tried it - before digging deeper with the watchdog, unfortunately it never fired - hence my dig into the kernel itself in the search of an issue resulting in the patch. I'm currently on 2400 node-hours ( 24 nodes ) without issues post patching so - I'd say "it works" :)

  4. koeqaife commented on Apr 28, 2026

    @koeqaife

    The bug is really annoying cause I have no access to ssh when it dies, so I have to just reboot by raspberry pi 😭

  5. koeqaife commented on Apr 28, 2026

    @koeqaife

    I wrote my own watchdog that was just pinging 1.1.1.1, and if it fails 3 times it restarts whole ethernet interface

  6. lukaszraczylo commented on Apr 28, 2026

    @lukaszraczylo
    Contributor

    @koeqaife hopefully it'll be end of the trouble after this PR is approved :) My kubernetes cluster had nodes flapping left and right for no reason, which of course neither postgres or longhorn liked so - I've had motivation and enough of caffeine to dig into it last Friday

  7. koeqaife commented on Apr 28, 2026

    @koeqaife

    I wasn't home when my network stopped working, so basically it wasn't working for 2 hours, it was crazy. And I thought it was crashing, but no logs in journalctl, no logs in dmesg, postgresql was working fine and everything else was working fine and even shutdown was fine

  8. koeqaife commented on Apr 28, 2026

    @koeqaife

    Also I run this on startup

    ExecStart=/usr/bin/ethtool -K end0 tso off sg off
    ExecStart=-/usr/bin/ethtool --set-eee end0 eee off
    

    It fixes everything but loads CPU more

    EDIT: Not really...

  9. koeqaife commented on Apr 28, 2026

    @koeqaife

    [mrdan@rasberry-pi ~]$ cat /var/log/net-watchdog.log
    Wed Apr 29 12:10:02 AM CEST 2026 ping fail #1
    Wed Apr 29 12:10:15 AM CEST 2026 ping fail #2
    Wed Apr 29 12:10:28 AM CEST 2026 ping fail #3
    Wed Apr 29 12:10:28 AM CEST 2026 resetting end0
    Wed Apr 29 12:10:43 AM CEST 2026 ping fail #1
    Wed Apr 29 12:10:56 AM CEST 2026 ping fail #2
    Wed Apr 29 12:11:09 AM CEST 2026 ping fail #3
    Wed Apr 29 12:11:09 AM CEST 2026 resetting end0
    ...

    Omg looks like I have to do bind/unbind instead of down/up 😭
    It kills driver completely...

  10. P33M commented on Apr 30, 2026

    @P33M
    Contributor

    With the system in the "hung" state, what is the output of sudo busybox devmem 0x1f00100014? What happens if you do sudo busybox devmem 0x1f00100000 32 0x0010021C - does traffic resume?

  11. koeqaife commented on Apr 30, 2026

    @koeqaife

    I will try that, but my internet wasn't dying for a day now

  12. koeqaife commented on Jun 15, 2026

    @koeqaife

    By the way, fixed in last versions of linux-rpi

  13. mattie47 commented on Jul 5, 2026

    @mattie47

    By the way, fixed in last versions of linux-rpi

    Do you know what actually fixed it, or the relevant PR? Since if it's fixed then this issue could reference it and be closed.

    Thanks

  14. pelwell commented on Jul 6, 2026

    @pelwell
    Contributor

    If there's anyone here who used to suffer from TX stalls, please try the patch in #7472 - it takes a different approach to solving the problem. As ever, you can install it with sudo rpi-update pulls/7472.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions