From owner-svn-src-all@FreeBSD.ORG Sat Apr 14 04:13:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12DD5106566C; Sat, 14 Apr 2012 04:13:52 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id BA6AD8FC0A; Sat, 14 Apr 2012 04:13:51 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1SIuMh-000HO9-6q; Fri, 13 Apr 2012 21:13:36 -0700 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <201204121743.q3CHhxQA039333@svn.freebsd.org> Date: Fri, 13 Apr 2012 21:13:42 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201204121743.q3CHhxQA039333@svn.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 2012-04-12, at 10:43 AM, John Baldwin wrote: > Author: jhb > Date: Thu Apr 12 17:43:59 2012 > New Revision: 234190 > URL: http://svn.freebsd.org/changeset/base/234190 > > Log: > - Extend the KDB interface to add a per-debugger callback to print a > backtrace for an arbitrary thread (rather than the calling thread). > A kdb_backtrace_thread() wrapper function uses the configured debugger > if possible, otherwise it falls back to using stack(9) if that is > available. > - Replace a direct call to db_trace_thread() in propagate_priority() > with a call to kdb_backtrace_thread() instead. > > > Modified: head/sys/kern/subr_turnstile.c > ============================================================================== > --- head/sys/kern/subr_turnstile.c Thu Apr 12 16:55:48 2012 (r234189) > +++ head/sys/kern/subr_turnstile.c Thu Apr 12 17:43:59 2012 (r234190) > @@ -217, 9 +217, 7 @@ propagate_priority(struct thread *td) > printf( > "Sleeping thread (tid %d, pid %d) owns a non-sleepable lock\n", > td->td_tid, td->td_proc->p_pid); > -#ifdef DDB > - db_trace_thread(td, -1); > -#endif > + kdb_backtrace_thread(td); > panic("sleeping thread"); > } [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234190 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2012 04:13:52 -0000 On 2012-04-12, at 10:43 AM, John Baldwin wrote: > Author: jhb > Date: Thu Apr 12 17:43:59 2012 > New Revision: 234190 > URL: http://svn.freebsd.org/changeset/base/234190 >=20 > Log: > - Extend the KDB interface to add a per-debugger callback to print a > backtrace for an arbitrary thread (rather than the calling thread). > A kdb_backtrace_thread() wrapper function uses the configured = debugger > if possible, otherwise it falls back to using stack(9) if that is > available. > - Replace a direct call to db_trace_thread() in propagate_priority() > with a call to kdb_backtrace_thread() instead. >=20 >=20 > Modified: head/sys/kern/subr_turnstile.c > = =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=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/kern/subr_turnstile.c Thu Apr 12 16:55:48 2012 = (r234189) > +++ head/sys/kern/subr_turnstile.c Thu Apr 12 17:43:59 2012 = (r234190) > @@ -217,9 +217,7 @@ propagate_priority(struct thread *td) > printf( > "Sleeping thread (tid %d, pid %d) owns a non-sleepable = lock\n", > td->td_tid, td->td_proc->p_pid); > -#ifdef DDB > - db_trace_thread(td, -1); > -#endif > + kdb_backtrace_thread(td); > panic("sleeping thread"); > } It seems that missing "#ifdef DDB" break build for kernels without DDB = enabled: cc1: warnings being treated as errors /src/FreeBSD/head/sys/kern/subr_turnstile.c: In function = 'propagate_priority': /src/FreeBSD/head/sys/kern/subr_turnstile.c:220: warning: implicit = declaration of function 'kdb_backtrace_thread' /src/FreeBSD/head/sys/kern/subr_turnstile.c:220: warning: nested extern = declaration of 'kdb_backtrace_thread' [-Wnested-externs]