Bug 229274 - RHEL-3 kernel can hang while doing Sysrq on the keyboard during heavy network traffic
RHEL-3 kernel can hang while doing Sysrq on the keyboard during heavy network...
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Kernel Manager
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2007-02-19 16:18 EST by Chris Lalancette
Modified: 2007-11-16 20:14 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 14:38:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Debugging netconsole patch (1.03 KB, patch)
2007-02-19 16:32 EST, Chris Lalancette
no flags Details | Diff

  None (edit)
Description Chris Lalancette 2007-02-19 16:18:43 EST
Description of problem:
The RHEL-3 kernel can hang while doing a Sysrq-? on the keyboard, while there is
heavy network traffic.  Here is how to reproduce

1)  Boot a single processor system with the SMP kernel (or, alternatively, boot
with maxcpus=1)
1)  ping flood from 2 (or more) separate boxes to your victim machine
2)  enable sysrq on the machine (echo 1 > /proc/sys/kernel/sysrq)
3)  Press Alt-Sysrq-t repeatedly

And watch the box spin forever.

What happens is that we take the dev->xmit_lock in softirq context, to process
the incoming/outgoing network packets.  However, interrupts are *not* disabled
during this time.  So if you hit the Sysrq sequence while it is holding the
dev->xmit_lock, printk will be fired, which will lead to the
write_netconsole_msg() function in drivers/net/netconsole.c, which also tries to
take dev->xmit_lock, and we deadlock.

     Jeff suggested that in write_netconsole_msg() we could do a spin_trylock()
and a check for xmit_owner != current_cpu, and if we don't get the lock (because
someone else is already holding it), we just drop the current packet.
Comment 1 Chris Lalancette 2007-02-19 16:32:08 EST
Created attachment 148369 [details]
Debugging netconsole patch

For the morbidly curious, this is the patch used to show what happens when you
get into this situation.
Comment 2 RHEL Product and Program Management 2007-10-19 14:38:35 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

Note You need to log in before you can comment on or make changes to this bug.