Bug 194796 - pmcstat(8) paniced a box
Summary: pmcstat(8) paniced a box
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-04 00:08 UTC by Hiren Panchasara
Modified: 2019-01-18 22:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiren Panchasara freebsd_committer freebsd_triage 2014-11-04 00:08:06 UTC
Did "pmcstat -S instructions -T" on a 10-stable (ish) sandybridge xeon box and it paniced.

Nov  3 13:51:11 <kern.crit> vxs162401 kernel: panic: [pmc,4186] cpu 3 didn't find a sample to collect
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: cpuid = 3
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: KDB: stack backtrace:
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe1
06dd0d840
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe106dd0d8f0
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: vpanic() at vpanic+0x126/frame 0xfffffe106dd0d930
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: kassert_panic() at kassert_panic+0x136/frame 0xfffffe106dd0d9a0
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: pmc_capture_user_callchain() at pmc_capture_user_callchain+0x124/fram
e 0xfffffe106dd0d9f0
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: pmc_hook_handler() at pmc_hook_handler+0x6bf/frame 0xfffffe106dd0dab0
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: outofnmi() at outofnmi+0x23/frame 0xffff5be0
Nov  3 13:51:11 <kern.crit> vxs162401 kernel: Uptime: 4d14h51m21s

From chat:

14:38 <@davide> hiren: I see nothing in the code preventing the thread to be rescheduled into another cpu from a first look
14:38 <@adrian> *burp*
14:38 <@davide> at the end of pmc_capture_user_callchain() you call sched_unpin() but there's no matching sched_pin() call


Need to investigate more.
Comment 1 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-18 22:06:20 UTC
Hiren, is this PR still valid?