From bad9cdfb527d0db6f7581604fd157456aa035b4ebc82a68df3b682e7b047ef32 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 3 Jan 2012 15:21:55 +0000 Subject: [PATCH] Accepting request 98319 from home:klaussfreire:branches:devel:tools Bug #684751, opcontrol --start fails because of NMI watchdog. The real issue, is the watchdog /proc interface was moved from /proc/blah/nmi_watchdog to /proc/blah/watchdog, a simple search and replace fixed it. I'm actually testing it on my local without issues. I couldn't find anything useful in the openSUSE bug (684751), but I did find a debian bug filled with interesting details (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615964). You will probably have to add the necessary tags to the patches, I couldn't find any examples in any of the existing patches but I did see the warning. Changes from sr#98110: - Added changelog entry OBS-URL: https://build.opensuse.org/request/show/98319 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=23 --- oprofile-0.9.7-watchdog.diff | 17 +++++++++++++++++ oprofile.changes | 6 ++++++ oprofile.spec | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 oprofile-0.9.7-watchdog.diff diff --git a/oprofile-0.9.7-watchdog.diff b/oprofile-0.9.7-watchdog.diff new file mode 100644 index 0000000..d19804f --- /dev/null +++ b/oprofile-0.9.7-watchdog.diff @@ -0,0 +1,17 @@ +diff -wur oprofile-0.9.7/utils/opcontrol oprofile-0.9.7-nu/utils/opcontrol +--- oprofile-0.9.7/utils/opcontrol 2011-07-20 16:36:48.000000000 -0300 ++++ oprofile-0.9.7-nu/utils/opcontrol 2011-12-24 11:36:16.141000284 -0300 +@@ -1211,10 +1211,10 @@ + echo $3 >$MOUNT/$1/$2 + else + echo -n "Error: counter $1 not available" +- if test -e /proc/sys/kernel/nmi_watchdog; then +- echo " nmi_watchdog using this resource ? Try:" ++ if test -e /proc/sys/kernel/watchdog; then ++ echo " watchdog using this resource ? Try:" + echo "opcontrol --deinit" +- echo "echo 0 > /proc/sys/kernel/nmi_watchdog" ++ echo "echo 0 > /proc/sys/kernel/watchdog" + fi + exit 1 + fi diff --git a/oprofile.changes b/oprofile.changes index c3c2466..9d26eae 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 27 14:38:40 UTC 2011 - klaussfreire@gmail.com + +- Fix nmi_watchdog handling, it was renamed as watchdog in recent + kernels [#684751] + ------------------------------------------------------------------- Fri Nov 25 10:42:15 UTC 2011 - coolo@suse.com diff --git a/oprofile.spec b/oprofile.spec index 9610515..d5fc248 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -35,6 +35,7 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: oprofile-0.9.5-buildfixes.diff Patch2: oprofile-0.9.4-fixes.diff +Patch3: oprofile-0.9.7-watchdog.diff %description OProfile is a system-wide profiler for Linux systems, capable of @@ -90,6 +91,7 @@ from supported virtual machines. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 mkdir -p java/include # copy files necessary to build Java agent libraries # libjvmpi_oprofile.so and libjvmti_oprofile.so