Bug 694631 - counter 0 used by nmi_watchdog
Summary: counter 0 used by nmi_watchdog
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: oprofile
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: William Cohen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-07 19:40 UTC by Severin Gehwolf
Modified: 2012-09-21 18:36 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:11:54 UTC
Type: ---


Attachments (Terms of Use)

Description Severin Gehwolf 2011-04-07 19:40:24 UTC
Description of problem:
Starting the oprofile daemon fails, due to nmi_watchdog using counter 0

Version-Release number of selected component (if applicable):
rpm -q oprofile
oprofile-0.9.6-14.fc15.x86_64

How reproducible:
Always on stock F15 (I think)

Steps to Reproduce:
1. opcontrol --no-vmlinux --image=path/to/binary
2. opcontrol --start
  
Actual results:
Error: counter 0 not available nmi_watchdog using this resource ? Try:
opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog

Expected results:
oprofile daemon started


Additional info: It seems inconvenient needing to do both,
opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog

before the oprofile daemon actually starts.

Comment 1 William Cohen 2011-05-16 22:00:04 UTC
The problem is due to changes in how Linux kernel's watchdog timer reserves the performance counter hardware. It use to be that the watchdog timer, perf, and systemtap each used a different software mechanism. The watchdog timer has been merged into the perf framework. The downside of this is perf takes all the performance hardware when any of the performance monitoring hardware is being used by perf. Thus, oprofile, gets no counters when the nmi_watchdog is active.

Comment 2 Severin Gehwolf 2011-05-17 19:34:09 UTC
What would be the drawback of doing:

opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog

before any profiling is done on F15? Or perhaps check if this perf. counter is used by something else, if so offer a better suggestion than just fail?

Comment 3 Andrew Overholt 2011-05-18 15:00:42 UTC
Severin, it might be best if we throw a dialogue saying that the user needs to do that.  Will suggested on IRC that some sysadmins may want to keep the nmi watchdog on so it's probably best to not turn it off under the covers.

Comment 4 Tom Lane 2012-05-20 18:00:36 UTC
I'm running into this on F16 as well.  It's fairly annoying that oprofile is unusable by default because somebody arbitrarily decided they could break it.  I think the use of these hardware resources needs to be renegotiated.

Comment 5 Fedora End Of Life 2012-08-07 19:11:57 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 John Reiser 2012-09-21 18:36:46 UTC
The problem persists in Fedora 18 Alpha. "Perf" should have an interface to [re-]negotiate the use of the 4 HPET timers, and oprofile should use it.

-----syslog (/var/log/messages)
   kernel: [    1.310896] HPET: 4 timers in total, 0 timers will be used for per-cpu timer
   kernel: [    1.317809] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
   kernel: [    1.323076] hpet0: 4 comparators, 64-bit 14.318180 MHz counter
-----


Note You need to log in before you can comment on or make changes to this bug.