From owner-freebsd-doc@FreeBSD.ORG Wed Jun 7 09:09:39 2006 Return-Path: X-Original-To: freebsd-doc@freebsd.org Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43B6516C600 for ; Wed, 7 Jun 2006 08:43:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74E9F43D48 for ; Wed, 7 Jun 2006 08:43:53 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k578hNfR053234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 7 Jun 2006 11:43:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k578hlwx054384 for ; Wed, 7 Jun 2006 11:43:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k578hkLG054383 for freebsd-doc@freebsd.org; Wed, 7 Jun 2006 11:43:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 7 Jun 2006 11:43:46 +0300 From: Kostik Belousov To: freebsd-doc@freebsd.org Message-ID: <20060607084346.GA21391@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Subject: [patch] deadlock debugging X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2006 09:09:39 -0000 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Reports of the deadlocks are reccurrent topic on the current- and stable-= =20 lists. Many of us have to repeat the instructions on how to provide the useful initial bug report from them. Please, comment proposed addition to the kernel debugging chapter of the developer handbook. Obviously, I am not an english native speaker. Your corrections for both factual material and grammar/style are very much welcome ! P.S. I'm not on the list, do not remove CC: to me on replying. Index: en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/arch/ncvs/doc/en_US.ISO8859-1/books/developers-handboo= k/kerneldebug/chapter.sgml,v retrieving revision 1.64 diff -u -r1.64 chapter.sgml --- en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml 5 Ja= n 2006 20:03:34 -0000 1.64 +++ en_US.ISO8859-1/books/developers-handbook/kerneldebug/chapter.sgml 7 Ju= n 2006 08:39:20 -0000 @@ -821,6 +821,41 @@ on any configured console driver, including a serial console. + + + Debugging the Deadlocks + + You may experience so called deadlocks, the situation where + system stops doing useful work. To provide the useful bug report + in this situation, you shall use ddb as described above. Please, + include the output of ps and + trace for suspected processes in the + report. + + If possible, consider doing further investigation. Receipt + below is especially usefull if you suspect deadlock occurs in the + VFS layer. Add the options + makeoptions DEBUG=3D-g + options INVARIANTS + options INVARIANT_SUPPORT + options WITNESS + options DEBUG_LOCKS + options DEBUG_VFS_LOCKS + options DIAGNOSTIC + + to the kernel config. When deadlock occurs, in addition to the + output of the ps command, provide information + from the show allpcpu, show + alllocks and show + lockedvnods. More, please provide output of the + where pid for each process id mentioned in + the output of the show commands. + + + For threaded processes, to obtain meaningful backtraces, use + thread thread-id to switch to the thread + stack, and do backtrace with where. + =20