Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jun 2009 15:20:32 +0200
From:      =?ISO-8859-1?Q?Marius_N=FCnnerich?= <marius@nuenneri.ch>
To:        Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How best to debug locking/scheduler problems
Message-ID:  <b649e5e0906160620i2ffb7200vb77f7f68fa292859@mail.gmail.com>
In-Reply-To: <200906151353.06630.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>
References:  <200906151353.06630.mel.flynn%2Bfbsd.hackers@mailing.thruhere.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 15, 2009 at 23:53, Mel
Flynn<mel.flynn+fbsd.hackers@mailing.thruhere.net> wrote:
> Hi,
>
> I'm trying to get to the bottom of a bug with getpeername() and certain kde4
> applications which is probably as low-level as the libthr and the scheduler.
>
> From browsing various related files in sys/kern it seems KTR is a good bet to
> get the information needed, yet it isn't really well supported in userland.
> For one, I've got no clue other then logging console output(?) how to retrieve
> the lock info or filter it in userland from reading ktr(9) and alq(9). Gdb is
> useless as the process doesn't give the information gdb wants and gdb just
> hangs in wait. ktrace also does not provide anything as there are no more
> syscalls being made, so I'll have to get to the bottom of this by tracing and
> filtering.
>
> Short description of the problem:
> a process never gets out of mi_switch and remains locked even init tries to
> shut it down.
>

[snip]

Hi Mel,

my idea would be to try DTrace for this. Hopefully the following link
will help you:
http://wiki.freebsd.org/DTrace
There are more links at the bottom.

I added DTrace probes to geom a while ago and it's really easy. Feel
free to ask for more help.

Kind regards
Marius



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b649e5e0906160620i2ffb7200vb77f7f68fa292859>