Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 2009 16:12:45 +0300
From:      Mikolaj Golub <to.my.trociny@gmail.com>
To:        xorquewasp@googlemail.com,  freebsd-hackers@freebsd.org
Subject:   Re: diagnosing freezes (DRI?)
Message-ID:  <86zlen9vw2.fsf@kopusha.onet>
In-Reply-To: <20090411101559.GC83697@logik.internal.network> (xorquewasp@googlemail.com's message of "Sat\, 11 Apr 2009 11\:15\:59 %2B0100")
References:  <20090410132354.GA20721@logik.internal.network> <20090410154251.GA49384@logik.internal.network> <1239385368.1922.74.camel@balrog.2hip.net> <20090410175922.GA50520@logik.internal.network> <1239388293.1922.80.camel@balrog.2hip.net> <20090410211307.GA83697@logik.internal.network> <3a142e750904101730k53b7fbabn6e801ac36f1182e0@mail.gmail.com> <20090411101559.GC83697@logik.internal.network>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sat, 11 Apr 2009 11:15:59 +0100 xorquewasp@googlemail.com wrote:

 x> On 2009-04-11 02:30:40, Paul B. Mahol wrote:
 >> 
 >> If it locks under X11 then use debug.debugger_on_panic=0 sysctl.
 >> Not doing this will increase drasticaly chances of locking whole system
 >> and not providing any debug data.

 x> I don't seem to have that sysctl.

You will see this sysctl only if you build your kernel with ddb(4) support.

If you are interested in providing useful information about your freezes,
please read the following:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html

You need to build your kernel with options described in

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-ddb.html

and 

http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-deadlocks.html

As you run X, you need to have debug.debugger_on_panic=0 set (as Paul has
suggested). Otherwise ddb would enter on panic but you wouldn't be able to
access it due to X. After panic you will be able to get useful information
from generated core dump using kgdb.

Another option is to set debug.debugger_on_panic=1 but also set some ddb
script that will run when the kernel debugger is entered as a result of a
panic. This script will enable output capture, dump some useful debugging info
to capture buffer, and then force a kernel dump to be written out followed by
a reboot. E.g. running something like this will do the trick:

ddb script 'kdb.enter.panic=capture on; show pcpu; show allpcpu; bt; ps; show locks; show alllocks; show lockedvnods; alltrace; call doadump; reset'

After reboot you can extract captured information from the capture buffer
information using the command:

ddb capture -M /var/crash/vmcore.X print > ddb.out

You need to increase the value of debug.ddb.capture.bufsize sysctl variable to
make sure all ddb output will be captured.

You can read more about this in ddb(4), ddb(8), textdump(4).

-- 
Mikolaj Golub



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