From owner-freebsd-bugs@freebsd.org Sun May 6 04:25:42 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36387FC9F44 for ; Sun, 6 May 2018 04:25:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id BF75383191 for ; Sun, 6 May 2018 04:25:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 7F017FC9F43; Sun, 6 May 2018 04:25:41 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CCB2FC9F42 for ; Sun, 6 May 2018 04:25:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1F1F8318C for ; Sun, 6 May 2018 04:25:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 3006126D28 for ; Sun, 6 May 2018 04:25:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w464PeeD093563 for ; Sun, 6 May 2018 04:25:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w464PeAi093562 for bugs@FreeBSD.org; Sun, 6 May 2018 04:25:40 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 228006] gdb crashing with dumptid = 0 Date: Sun, 06 May 2018 04:25:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eadler@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 04:25:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228006 Bug ID: 228006 Summary: gdb crashing with dumptid =3D 0 Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: eadler@FreeBSD.org CC: jhb@FreeBSD.org vmcore causing the crash is available as well gdb$ bt #0 thr_kill () at thr_kill.S:3 #1 0x00000008035046b4 in __raise (s=3D0x6) at /usr/src/lib/libc/gen/raise.= c:54 #2 0x0000000803504629 in abort () at /usr/src/lib/libc/stdlib/abort.c:67 #3 0x0000000000c805c6 in dump_core () at utils.c:284 #4 0x0000000000c81920 in internal_vproblem (problem=3D0x24bd890 , file=3D0x15c560e "inferior.c", line=3D0x135, fmt=3D0x15780ac "%s: Assertion `%s' failed.", ap=3D0x7fffffffb9e0) at utils.c:493 #5 0x0000000000c806d8 in internal_verror (file=3D0x15c560e "inferior.c", line=3D0x135, fmt=3D0x15780ac "%s: Assertion `%s' failed.", ap=3D0x7fffffffb9e0) at utils.c: 518 #6 0x00000000008363a8 in internal_error (file=3D0x15c560e "inferior.c", line=3D0x135, fmt=3D0x15780ac "%s: Assertion `%s' failed.") at common/errors.c:55 #7 0x0000000000a8397e in find_inferior_pid (pid=3D0x0) at inferior.c:309 #8 0x0000000000a83d54 in find_inferior_ptid (ptid=3D...) at inferior.c:323 #9 0x0000000000c10049 in default_thread_architecture (ops=3D0x2702d90 , ptid=3D...) at target.c:3131 #10 0x0000000000bfec2b in delegate_thread_architecture (self=3D0x2702d90 , arg1=3D...) at ./target-delegates.c:2525 #11 0x0000000000bfec2b in delegate_thread_architecture (self=3D0x26eedd0 , arg1=3D...) at ./target-delegates.c:2525 #12 0x0000000000bfec2b in delegate_thread_architecture (self=3D0x26ec280 , arg1=3D...) at ./target-delegates.c:2525 #13 0x0000000000b53cba in get_thread_regcache (ptid=3D...) at regcache.c:439 #14 0x0000000000b53d5e in get_current_regcache () at regcache.c:448 #15 0x0000000000713077 in kgdb_trgt_open (arg=3D0x80410900e "vmcore.2", from_tty=3D0x1) at fbsd-kvm.c:335 #16 0x0000000000bf3980 in open_target (args=3D0x80410900e "vmcore.2", from_tty=3D0x1, command=3D0x8041c8f40) at target.c:356 #17 0x0000000000722c35 in do_sfunc (c=3D0x8041c8f40, args=3D0x80410900e "vmcore.2", from_tty=3D0x1) at cli/cli-decode.c:122 #18 0x0000000000726b5a in cmd_func (cmd=3D0x8041c8f40, args=3D0x80410900e "vmcore.2", from_tty=3D0x1) at cli/cli-decode.c:1886 #19 0x0000000000c450c7 in execute_command (p=3D0x804109015 "2", from_tty=3D0x1) at top.c:630 #20 0x0000000000acd4a8 in catch_command_errors (command=3D0xc445f0 , arg=3D0x804109000 "target vmcore vmcore.2", from_tty=3D0x1) at main.c:378 #21 0x0000000000accdf2 in captured_main_1 (context=3D0x7fffffffcfe8) at main.c:1124 #22 0x0000000000aca62d in captured_main (data=3D0x7fffffffcfe8) at main.c:1= 146 #23 0x0000000000aca508 in gdb_main (args=3D0x7fffffffcfe8) at main.c:1172 #24 0x000000000050bd5b in main (argc=3D0x3, argv=3D0x7fffffffd558) at kgdb-main.c:410 gdb$ up 7 #7 0x0000000000a8397e in find_inferior_pid (pid=3D0x0) at inferior.c:309 309 gdb_assert (pid !=3D 0); gdb$ frame Stack level 7, frame at 0x7fffffffba50: rip =3D 0xa8397e in find_inferior_pid (inferior.c:309); saved rip =3D 0xa8= 3d54 called by frame at 0x7fffffffba60, caller of frame at 0x7fffffffba20 source language c++. Arglist at 0x7fffffffba40, args: pid=3D0x0 Locals at 0x7fffffffba40, Previous frame's sp is 0x7fffffffba50 Saved registers: rbp at 0x7fffffffba40, rip at 0x7fffffffba48 pid =3D 0x0 inf =3D 0x8415d5 gdb$ list 304 struct inferior *inf; 305 306 /* Looking for inferior pid =3D=3D 0 is always wrong, and indicat= ive of 307 a bug somewhere else. There may be more than one with pid =3D= =3D 0, 308 for instance. */ 309 gdb_assert (pid !=3D 0); 310 311 for (inf =3D inferior_list; inf; inf =3D inf->next) 312 if (inf->pid =3D=3D pid) 313 return inf; gdb$ p pid $1 =3D 0x0 gdb$ p ptid $2 =3D { m_pid =3D 0x0, m_lwp =3D 0x0, m_tid =3D 0x0 } gdb$ up #9 0x0000000000c10049 in default_thread_architecture (ops=3D0x2702d90 , ptid=3D...) at target.c:3131 3131 inferior *inf =3D find_inferior_ptid (ptid); gdb$ list 3126 } 3127 3128 static struct gdbarch * 3129 default_thread_architecture (struct target_ops *ops, ptid_t ptid) 3130 { 3131 inferior *inf =3D find_inferior_ptid (ptid); 3132 gdb_assert (inf !=3D NULL); 3133 return inf->gdbarch; 3134 } 3135 gdb$ p ops $4 =3D (target_ops *) 0x2702d90 gdb$ up #14 0x0000000000b53d5e in get_current_regcache () at regcache.c:448 448 return get_thread_regcache (inferior_ptid); gdb$ list 443 } 444 445 struct regcache * 446 get_current_regcache (void) 447 { 448 return get_thread_regcache (inferior_ptid); 449 } 450 451 /* See common/common-regcache.h. */ 452 gdb$ p inferior_ptid $13 =3D { m_pid =3D 0x0, m_lwp =3D 0x0, m_tid =3D 0x0 } gdb$ up #15 0x0000000000713077 in kgdb_trgt_open (arg=3D0x80410900e "vmcore.2", from_tty=3D0x1) at fbsd-kvm.c:335 335 target_fetch_registers (get_current_regcache (), -1); gdb$ list 330 kt =3D kgdb_thr_next(kt); 331 } 332 if (curkthr !=3D 0) 333 inferior_ptid =3D fbsd_vmcore_ptid(curkthr->tid); 334 335 target_fetch_registers (get_current_regcache (), -1); 336 337 reinit_frame_cache (); 338 print_stack_frame (get_selected_frame (NULL), 0, SRC_AND_LOC, 1); 339 } gdb$ p inferior_ptid $17 =3D { m_pid =3D 0x0, m_lwp =3D 0x0, m_tid =3D 0x0 } gdb$ p curkthr $18 =3D (kthr *) 0x0 gdb$ frame Stack level 15, frame at 0x7fffffffbd90: rip =3D 0x713077 in kgdb_trgt_open (fbsd-kvm.c:335); saved rip =3D 0xbf3980 called by frame at 0x7fffffffbdc0, caller of frame at 0x7fffffffbc40 source language c++. Arglist at 0x7fffffffbd80, args: arg=3D0x80410900e "vmcore.2", from_tty=3D= 0x1 Locals at 0x7fffffffbd80, Previous frame's sp is 0x7fffffffbd90 Saved registers: rbp at 0x7fffffffbd80, rip at 0x7fffffffbd88 arg =3D 0x80410900e "vmcore.2" from_tty =3D 0x1 ops =3D 0x8043ef840 inf =3D 0x80442de80 old_chain =3D 0x804431820 ti =3D 0x7fffffffd550 kt =3D 0x0 nkvm =3D 0x804363800 temp =3D 0x8047f33b0 "/home/eax/crashes/aes_gpault_crash/vmcore.2" kernel =3D 0x8043dec80 "/home/eax/crashes/aes_gpault_crash/kernel/kernel" filename =3D 0x8047f33b0 "/home/eax/crashes/aes_gpault_crash/vmcore.2" ontop =3D 0x0 gdb$ p curkthr $19 =3D (kthr *) 0x0 which is coming from curkthr =3D kgdb_thr_lookup_tid(dumptid); if (curkthr =3D=3D NULL) curkthr =3D first; gdb$ p dumptid $20 =3D 0x0 which is coming from TRY { dumptid =3D parse_and_eval_long("dumptid"); } CATCH(e, RETURN_MASK_ERROR) { dumptid =3D -1; } END_CATCH --=20 You are receiving this mail because: You are the assignee for the bug.=