From owner-freebsd-hackers@FreeBSD.ORG Fri May 15 19:20:21 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 181AE6D3 for ; Fri, 15 May 2015 19:20:21 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D90E1177F for ; Fri, 15 May 2015 19:20:20 +0000 (UTC) Received: from [192.168.200.214] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id EA670193656; Fri, 15 May 2015 19:20:18 +0000 (UTC) Message-ID: <555646F1.4000405@ignoranthack.me> Date: Fri, 15 May 2015 12:20:17 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ryan Stone CC: "freebsd-hackers@freebsd.org" Subject: Re: How to get anything useful out of kgdb? References: <554E41EE.2010202@ignoranthack.me> <2063489.pgabuk9nPJ@ralph.baldwin.cx> <55561803.9050102@ignoranthack.me> <19618854.y3EeXVtCGX@ralph.baldwin.cx> <55561D9A.30309@ignoranthack.me> <555627EC.2020007@ignoranthack.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 19:20:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/15/15 10:57, Ryan Stone wrote: > On Fri, May 15, 2015 at 1:07 PM, Sean Bruno > wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> Hrm, when I look at them directly in the crashdump, I don't see >> anything useful. >> >> (kgdb) tid 100058 [Switching to thread 54 (Thread 100058)]#0 >> cpustop_handler () at >> /home/sbruno/bsd/em_mq/sys/x86/x86/mp_x86.c:987 987 >> CPU_SET_ATOMIC(cpu, &stopped_cpus); Current language: auto; >> currently minimal (kgdb) whe #0 cpustop_handler () at >> /home/sbruno/bsd/em_mq/sys/x86/x86/mp_x86.c:98 7 #1 >> 0xffffffff80f76f7a in ipi_nmi_handler () at >> /home/sbruno/bsd/em_mq/sys/x86/x86/mp_x86.c:969 #2 >> 0xffffffff80e3657a in trap (frame=0xffffffff817eb910) at >> /home/sbruno/bsd/em_mq/sys/amd64/amd64/trap.c:188 #3 >> 0xffffffff80e1b273 in nmi_calltrap () at >> /home/sbruno/bsd/em_mq/sys/amd64/amd64/exception.S:509 #4 >> 0x0000000800841841 in ?? () Previous frame inner to this frame >> (corrupt stack?) >> > > *Sigh*, kgdb isn't unwinding the trap frame properly. You can try > this to figure out where it was running: > > frame 2 info line *frame->tf_rip I'm guessing that we are just at the limit of what the intree kgdb is capable of doing with out crashdumps. #2 0xffffffff80e3657a in trap (frame=0xffffffff817eb910) at /home/sbruno/bsd/em_mq/sys/amd64/amd64/trap.c:188 188 if (ipi_nmi_handler() == 0) (kgdb) p frame $5 = (struct trapframe *) 0xffffffff817eb910 (kgdb) p *frame $6 = {tf_rdi = 34389196884, tf_rsi = 34389192960, tf_rdx = 0, tf_rcx = 360, tf_r8 = 0, tf_r9 = -8795456263872, tf_rax = 0, tf_rbx = 34393489408, tf_rbp = 140736951475936, tf_r10 = 17232, tf_r11 = 583, tf_r12 = 1882455366, tf_r13 = 34389196880, tf_r14 = 0, tf_r15 = 6358856, tf_trapno = 19, tf_fs = 19, tf_gs = 27, tf_addr = 0, tf_flags = 1, tf_es = 59, tf_ds = 59, tf_err = 0, tf_rip = 34368395329, tf_cs = 67, tf_rflags = 518, tf_rsp = 140736951475912, tf_ss = 59} (kgdb) p *frame->tf_rip Cannot access memory at address 0x800841841 (kgdb) info line *frame->tf_rip No line number information available for address 0x800841841 (kgdb) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVVkbvXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kDCAH+wZCVF2ZVzIJ3KZaKJK3TZhk P0LKwJDqKPiSf0qJtjD5WOomPWTwBjOS83soGwOUylo5QQezCtdisMDR9E5z5V8Y nWP3MLN/leG8KAbFl5XxLwQ3OlQ8SdXaHLoF8M17C8orJOo5vJfe/qEmqSOQJiU1 ZFES+xvtvoeqjirvzdw1cu55ZDJH6I5hmDL8LLShC3MCgS3R81m6YObIL8BAFOTu FCMZJVxDuZZ/nAQDmVDUKFXFO8GSibEDCmmFMWqwSR/qmKV9KNveJ51PNW1yl8E6 QHa66unZ1Y+oMDHpZYopPuuKks4M4akrRhJzFLdbuMTOdCJ0qnoXYgsoIb8Vsy0= =efn3 -----END PGP SIGNATURE-----