From owner-freebsd-amd64@freebsd.org Mon Feb 15 19:09:23 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2EFAAA8F42 for ; Mon, 15 Feb 2016 19:09:23 +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 mx1.freebsd.org (Postfix) with ESMTPS id A76EE695 for ; Mon, 15 Feb 2016 19:09:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1FJ9NYC088904 for ; Mon, 15 Feb 2016 19:09:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 207085] pmc assertion failure: pmc %p non-NULL Date: Mon, 15 Feb 2016 19:09:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: joss.upton@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-Mailman-Approved-At: Mon, 15 Feb 2016 19:31:03 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2016 19:09:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207085 --- Comment #3 from joss.upton@yahoo.com --- (In reply to Konstantin Belousov from comment #1) Here's the state of the machine during one of these panics (back trace at t= he bottom). There are four instances of "monitor" and four instances of "target" in the system. Monitor aloocates/attaches pmc's to target and then waits for targ= et to exit. It then reads the pmcs, releases them, and exits. panicstr: [soft,327] PHW pmc 0xfffff800b411ec80 non-NULL cpuid =3D 0 which corresponds to: static int soft_release_pmc(int cpu, int ri, struct pmc *pmc) { ... KASSERT(phw->phw_pmc =3D=3D NULL, ("[soft,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); ... } pmc->owner is "monitor" (pid=3D19085, td_oncpu=3D0) pmc->pm_targets list is empty. pmc->owner->children has one entry "target" (pid=3D19086, td_oncpu=3D0xff, td_lastcpu=3D0). This child is a zombie. Looking at phw->phw_pmc: phw->phw_pmc->pm_phw: owner is "monitor" (pid=3D19087, td_oncpu=3D0xff, td_lastcpu=3D0) phw->phw_pmc->pm_targets =3D "target" (pid=3D19088, td_oncpu=3D0xff, td_las= tcpu=3D1). phw->phw_pmc->pm_owner->children: "target" (pid=3D19088, td_oncpu=3D0xff, td_lastcpu=3D1). panic: [soft,327] PHW pmc 0xfffff800b411ec80 non-NULL cpuid =3D 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0239efe= 650 kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe0239efe700 vpanic() at vpanic+0x126/frame 0xfffffe0239efe740 kassert_panic() at kassert_panic+0x195/frame 0xfffffe0239efe7d0 soft_release_pmc() at soft_release_pmc+0xb9/frame 0xfffffe0239efe800 pmc_release_pmc_descriptor() at pmc_release_pmc_descriptor+0x33b/frame 0xfffffe0239efe850 pmc_syscall_handler() at pmc_syscall_handler+0x158b/frame 0xfffffe0239efeac0 amd64_syscall() at amd64_syscall+0x2b3/frame 0xfffffe0239efebf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0239efebf0 --- syscall (0, FreeBSD ELF64, nosys), rip =3D 0x802699a2a, rsp =3D 0x7ffff= fffe468, rbp =3D 0x7fffffffe480 --- KDB: enter: panic #0 doadump (textdump=3D0) at pcpu.h:220 220 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=3D0) at pcpu.h:220 #1 0xffffffff802f3a0e in db_dump (dummy=3D, dummy2=3D= 0, dummy3=3D0, dummy4=3D0x0) at /vagrant/usr/src/sys/ddb/db_command.c:533 #2 0xffffffff802f34ad in db_command (cmd_table=3D0x0) at /vagrant/usr/src/sys/ddb/db_command.c:440 #3 0xffffffff802f778f in db_script_exec ( scriptname=3D0xfffffe0239efe300 "kdb.enter.panic", warnifnotfound=3D) at /vagrant/usr/src/sys/ddb/db_script.c:302 #4 0xffffffff802f75d3 in db_script_kdbenter (eventname=3D0x0) at /vagrant/usr/src/sys/ddb/db_script.c:324 #5 0xffffffff802f5c9b in db_trap (type=3D, code=3D0) at /vagrant/usr/src/sys/ddb/db_main.c:230 #6 0xffffffff805a0529 in kdb_trap (type=3D3, code=3D0, tf=3D) at /vagrant/usr/src/sys/kern/subr_kdb.c:656 #7 0xffffffff8079709e in trap (frame=3D0xfffffe0239efe630) at /vagrant/usr/src/sys/amd64/amd64/trap.c:564 #8 0xffffffff8077ac72 in calltrap () at /vagrant/usr/src/sys/amd64/amd64/exception.S:236 #9 0xffffffff8059fc8e in kdb_enter (why=3D0xffffffff808949a1 "panic", msg=3D) at cpufunc.h:63 #10 0xffffffff80563326 in vpanic (fmt=3D, ap=3D) at /vagrant/usr/src/sys/kern/kern_shutdown.= c:751 #11 0xffffffff805631d5 in kassert_panic (fmt=3D) at /vagrant/usr/src/sys/kern/kern_shutdown.c:646 #12 0xffffffff8038d9d9 in soft_release_pmc (cpu=3D, ri=3D, pmc=3D0xfffff800b411c180) at /vagrant/usr/src/sys/dev/hwpmc/hwpmc_soft.c:326 #13 0xffffffff8038a4bb in pmc_release_pmc_descriptor (pm=3D0xfffff800b411c1= 80) at /vagrant/usr/src/sys/dev/hwpmc/hwpmc_mod.c:2360 #14 0xffffffff8038853b in pmc_syscall_handler (td=3D, syscall_args=3D) at /vagrant/usr/src/sys/dev/hwpmc/hwpmc_mod.c:3685 #15 0xffffffff80797f83 in amd64_syscall (td=3D0xfffff800b4d3c000, traced=3D= 0) at subr_syscall.c:134 #16 0xffffffff8077af5b in Xfast_syscall () at /vagrant/usr/src/sys/amd64/amd64/exception.S:396 #17 0x0000000802699a2a in ?? () --=20 You are receiving this mail because: You are on the CC list for the bug.=