public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Davda, Bhavesh P (Bhavesh)" <bhavesh@avaya.com>
Cc: linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>
Subject: RE: Debugging kernel semaphore contention and priority  inversion
Date: Thu, 18 Aug 2005 11:15:40 -0400	[thread overview]
Message-ID: <1124378140.5186.57.camel@localhost.localdomain> (raw)
In-Reply-To: <21FFE0795C0F654FAD783094A9AE1DFC0830FE03@cof110avexu4.global.avaya.com>

On Thu, 2005-08-18 at 08:50 -0600, Davda, Bhavesh P (Bhavesh) wrote:

> > >This is a headless system.
> > 
> > You could try netconsole.
> 
> Haven't heard of it before. Will look into it. But I doubt it will help
> pinpoint the semaphore holder, if all I can do is sysrq stuff.

Or does this system have a serial?  This is just as good (if not better)
than netconsole, since it is simpler, and netconsole still needs to use
the IP stack.  Although, in most cases netconsole works for me. But with
a serial, you can also send commands.  Netconsole is better if you need
to send lots of data, and need a higher speed data transfer rate.

I usually set up a minicom attached to the target computer, and on the
target run "cat /dev/ttyS0 > /dev/null &" just to open a port. This is
needed, since the reading of the serial will only be done if something
is actually reading from it.  On the kernel command line you will also
need to add, console=ttyS0,115200N8 (change the baud to whatever, since
here I use 115200).  From minicom, you can send a sysrq-t with C-a f t.
The C-a f sends a break, and the t tells the kernel this is a sysrq-t.
Read Documentation/serial-console.txt for more information.

For netconsole read: Documentation/networking/netconsole.txt


> 
> > 
> > > >
> > > > How stuck is the system?
> > > >
> > > > Keith
> > >
> > >Very. Only pingable, but can't login via 
> > telnet/ssh/anything. Reason is 
> > >the same reason the low priority mystery task is unable to run and 
> > >release the held semaphore.
> > 
> > (hmm.  I'm obviously missing some original context here)
> > 
> > Sounds like there must be another player who is RT prio + spinning.
> > 
> >          -Mike 
> 
> Very good! Yes, I left out that piece of detail in my original posting.
> There is a real low priority (4) SCHED_FIFO (hence still higher than any
> SCHED_OTHER) task spinning. But it is not the semaphore holder. I am
> trying to identify which kernel thread (because that's most likely)
> running at SCHED_OTHER real low priority (too nice) is holding the
> semaphore, locking out a priority 50 SCHED_FIFO task in its sys_write()
> as a result.

Also have a look at Ingo Molnar's RT patch. It takes care of priority
inversion (with priority inheritance) and also has lots of other nifty
features to debug semaphores and locks.

You can find it here:

http://people.redhat.com/mingo/realtime-preempt/


-- Steve


  parent reply	other threads:[~2005-08-18 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 14:50 Debugging kernel semaphore contention and priority inversion Davda, Bhavesh P (Bhavesh)
2005-08-18 15:13 ` Hal Wigoda
2005-08-18 15:15 ` Steven Rostedt [this message]
     [not found] <21FFE0795C0F654FAD783094A9AE1DFC0830FE03@cof110avexu4.glob al.avaya.com>
2005-08-19  5:16 ` Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18 17:50 Davda, Bhavesh P (Bhavesh)
2005-08-18  3:43 Davda, Bhavesh P (Bhavesh)
2005-08-18 17:39 ` Keith Mannthey
2005-08-17 22:52 Davda, Bhavesh P (Bhavesh)
2005-08-17 23:33 ` Keith Mannthey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124378140.5186.57.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=bhavesh@avaya.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox