[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1005228: linux-image-4.19.0-18-amd64: Short freeze on virtual machine with message: "rcu: INFO: rcu_sched self-detected stall on CPU"



On Mon, 2022-02-28 at 15:03 +0000, Adrien TREMOT wrote:
> Hi,
> 
> It seems the issue was linked to the 8139cp NIC driver.
> I changed the NIC driver to virtio and the stall did not occure anymore.
> Let me know if you need more informations about this or if I should signal the issue somewhere else.

My memory is that the 8139cp emulation in QEMU has very poor
performance (the physical device was only designed for 100 Mbit/s
Ethernet anyway) and is not suitable for use in production.

If virtio_net is working for you then I don't think this bug is worth
investigating.

But if you would like to investigate this, you could try applying the
attached patch and switching back to 8139cp temporarily.  Instructions
for rebuilding a kernel package can be found in the debian-kernel-
handbook package at
file:///usr/share/doc/debian-kernel-handbook/kernel-handbook.html/ch-common-tasks.html#s-common-official
(This is normally also available online but that server is currently
down.)

Ben.

-- 
Ben Hutchings
The first rule of tautology club is the first rule of tautology club.
From 139819f9b8009144f15a6659ce767023a0583ef8 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 28 Feb 2022 17:44:27 +0100
Subject: [PATCH] 8139cp: Count Rx failures towards polling budget

In cp_rx_poll() the loop condition is 'while (rx < budget)', but in
error cases it moves on to the next descriptor without incrementing
rx.  This is not correct and can lead to a soft lockup.

Reported-by: Adrien TREMOT <a.tremot@alphalink.fr>
Fixes: bea3348eef27 ("[NET]: Make NAPI polling independent of struct ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/ethernet/realtek/8139cp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index ad7b9e9d7f95..063a4dc338cc 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -535,7 +535,6 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
 		cp->rx_skb[rx_tail] = new_skb;
 
 		cp_rx_skb(cp, skb, desc);
-		rx++;
 		mapping = new_mapping;
 
 rx_next:
@@ -547,6 +546,8 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
 		else
 			desc->opts1 = cpu_to_le32(DescOwn | cp->rx_buf_sz);
 		rx_tail = NEXT_RX(rx_tail);
+
+		rx++;
 	}
 
 	cp->rx_tail = rx_tail;

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: