Bug 217519

Summary: commit 6e98b09da931a00bf4e0477d0fa52748bf28fcce suspect causing full system lockup
Product: Drivers Reporter: SamW (proaudiomanuk)
Component: NetworkAssignee: drivers_network (drivers_network)
Status: NEW ---    
Severity: high CC: bagasdotme, hkallweit1
Priority: P3    
Hardware: AMD   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: syslog from system lockup

Description SamW 2023-06-01 22:53:55 UTC
6e98b09da931a00bf4e0477d0fa52748bf28fcce
OS slackware64-current fully upto date, on an AMD 990fx motherboard with a 
Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09).
Linux-rt-devel-rc2-rt1 and linux-rt-devel-6.4-rc3-rt2 had same issue, previous linux-rt-devel-6.3.3-rt15 worked with no issue.

Hello I suspect this series of commits is causing the full system lock im having when using the r8169 driver with linux-rt-devel-6.4-rc3-rt2. With the driver enabled my system locks up with a few mins of booting and logging into desktop. I have to use power off button and reboot to older kernel. With the r8169 driver blacklisted the kernel works perfectly.
My syslog attachment shows the driver errors and after looking at commits I saw the above numbered as being the most likly cause.
A member of oftc linux-rt irc channel looked and gave the comment posted below.
"tell the driver maintainers they must not enable the irq in the napi poll function"
He said it looked like that could be causing the errors and then full system lockup.
please contact me if any further information is required.

My fix has been blacklist r8169 and use the r8168 driver from relatek with a patch to enable builfing with the 6.4 kernel.
Thank you for your time
SamW
Comment 1 SamW 2023-06-01 22:55:27 UTC
Created attachment 304365 [details]
syslog from system lockup
Comment 2 Bagas Sanjaya 2023-06-02 02:09:20 UTC
(In reply to SamW from comment #0)
> 6e98b09da931a00bf4e0477d0fa52748bf28fcce
> OS slackware64-current fully upto date, on an AMD 990fx motherboard with a 
> Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit
> Ethernet Controller (rev 09).
> Linux-rt-devel-rc2-rt1 and linux-rt-devel-6.4-rc3-rt2 had same issue,
> previous linux-rt-devel-6.3.3-rt15 worked with no issue.
> 

Can you repeat bisection with vanilla mainline between v6.3 and v6.4?
Comment 3 Heiner Kallweit 2023-06-02 05:40:52 UTC
Please re-test with 6.4-rc4 and linux-next. The following may have fixed the issue you're seeing.

d6c36cbc5e53 ("r8169: Use a raw_spinlock_t for the register locks.")
Comment 4 SamW 2023-06-02 20:56:21 UTC
Thank you for your quick response and the information, Ive spoke to the irc group and I'm just waiting for their next release.
Comment 5 Bagas Sanjaya 2023-06-03 00:22:38 UTC
(In reply to SamW from comment #4)
> Thank you for your quick response and the information, Ive spoke to the irc
> group and I'm just waiting for their next release.

It doesn't answer Heiner's question. I repeat: does d6c36cbc5e53 fix your regression?
Comment 6 SamW 2023-06-05 18:51:09 UTC
Sorry for the delay, ive only just bee#n able to find out due to waiting for linux-rt-devel to release the next version. linux-rt-devel-6.4-rc5-rt3 which has
6c36cbc5e53 is applied to rt kernel in commit below.
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?h=linux-6.4.y-rt&id=d6c36cbc5e533f48bd89a7b5f339bd82b8b4378a

And works perfectly thank you very much for your help and the patch. your r9169 driver is so much better than the realtek version. Realteks driver drops out constantly when streaming films and downloading.

Ive notified the RT group that your commit has now fixed the driver in the RT kernel.
SamW