Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2016 19:09:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 207085] pmc assertion failure: pmc %p non-NULL
Message-ID:  <bug-207085-6-3FXItz43t3@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-207085-6@https.bugs.freebsd.org/bugzilla/>
References:  <bug-207085-6@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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<value optimized out>, 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<value optimized out>)
    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<value optimized out>, code=3D0)
    at /vagrant/usr/src/sys/ddb/db_main.c:230
#6  0xffffffff805a0529 in kdb_trap (type=3D3, code=3D0, tf=3D<value optimiz=
ed out>)
    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<value optimized out>) at cpufunc.h:63
#10 0xffffffff80563326 in vpanic (fmt=3D<value optimized out>,
    ap=3D<value optimized out>) at /vagrant/usr/src/sys/kern/kern_shutdown.=
c:751
#11 0xffffffff805631d5 in kassert_panic (fmt=3D<value optimized out>)
    at /vagrant/usr/src/sys/kern/kern_shutdown.c:646
#12 0xffffffff8038d9d9 in soft_release_pmc (cpu=3D<value optimized out>,
    ri=3D<value optimized out>, 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<value optimized out>,
    syscall_args=3D<value optimized out>)
    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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207085-6-3FXItz43t3>