From nobody@FreeBSD.org  Thu Sep  6 18:23:14 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6CF0116A418
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Sep 2007 18:23:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 5CF3E13C45B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Sep 2007 18:23:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l86INEfN043753
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 6 Sep 2007 18:23:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l86INEsk043752;
	Thu, 6 Sep 2007 18:23:14 GMT
	(envelope-from nobody)
Message-Id: <200709061823.l86INEsk043752@www.freebsd.org>
Date: Thu, 6 Sep 2007 18:23:14 GMT
From: Joshua Isom <jrisom@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Panic while debugging on CURRENT
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116159
>Category:       amd64
>Synopsis:       [panic] Panic while debugging on CURRENT
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 06 18:30:01 GMT 2007
>Closed-Date:    Thu Oct 14 18:52:33 UTC 2010
>Last-Modified:  Thu Oct 14 18:52:33 UTC 2010
>Originator:     Joshua Isom
>Release:        CURRENT kernel, STABLE userland
>Organization:
>Environment:
FreeBSD freebsd 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Sep  5 06:32:03 CDT 2007     root@freebsd:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
When I use a 6-STABLE userland with a 7-CURRENT kernel(for support for
my dvd drive), I can predictably cause a panic in the kernel while
debugging a program, and all as a non root user.  Looking at the coredump
seems to provide no information but once it paniced I was able to get
this information.

kdb_enter() at kdb_enter+0x31
panic() at panic+0x173
postsig() at postsig+0x155
thread_export_context() at thread_export_context+0x1c7
thread_userret() at thread_userret+0x481
userret() at userret+0xfb
trap() at trap+0x22d
calltrap() at calltrap+0x8

trap 0xc, rip=0xdc0038, rsp=0x7fffffffe730, rbp=0x7fffffffee760

The way I cause this is to debug a program that segfaults, and type in
"next" or a similar command into gdb.  When I tried upgrading to a full
CURRENT system, debugging anything seemed to be broken(one command would
become zombied and I couldn't figure out which).  I don't have any
problems with debugging with a 6-STABLE system.
>How-To-Repeat:
$ gdb foo
> run
program went boom
> next
kernel goes boom
>Fix:
Unknown, but everything works in 6-STABLE.

>Release-Note:
>Audit-Trail:

From: Joshua Isom <jrisom@gmail.com>
To: bug-followup@FreeBSD.org,
 jrisom@gmail.com
Cc:  
Subject: Re: amd64/116159: Panic while debugging on CURRENT
Date: Sun, 9 Sep 2007 21:25:22 -0500

 I disabled the debugging lines in the GENERIC and rebuilt, and I didn't 
 have problems debugging.
 
 #makeoptions    DEBUG=-g        # Build kernel with gdb(1) debug symbols
 
 #options    KDB         # Enable kernel debugger support.
 #options    DDB         # Support DDB.
 #options    GDB         # Support remote GDB.
 #options    INVARIANTS      # Enable calls of extra sanity checking
 #options    INVARIANT_SUPPORT   # Extra sanity checks of internal 
 structures, required by INVARIANTS
 #options    WITNESS         # Enable checks to detect deadlocks and 
 cycles
 #options    WITNESS_SKIPSPIN    # Don't run witness on spinlocks for 
 speed
 
 I don't know which caused the issue but it seems as though the 
 debugging support caused the kernel crash.
 
State-Changed-From-To: open->closed 
State-Changed-By: jh 
State-Changed-When: Mon Sep 6 14:49:52 UTC 2010 
State-Changed-Why:  
Is this still a problem for you? 


Responsible-Changed-From-To: freebsd-amd64->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Mon Sep 6 14:49:52 UTC 2010 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116159 
State-Changed-From-To: closed->feedback 
State-Changed-By: jh 
State-Changed-When: Mon Sep 6 17:35:30 UTC 2010 
State-Changed-Why:  
Correct the PR state. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116159 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Thu Oct 14 18:52:32 UTC 2010 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116159 
>Unformatted:
