oprofile doesn't start

Bug #272209 reported by Emmanuel Pacaud
20
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: oprofile

It lloks like oprofile can't start in current intrepid.

Description: Ubuntu intrepid (development branch)
Release: 8.10

oprofile:
  Installé : 0.9.3-1.1ubuntu2
  Candidat : 0.9.3-1.1ubuntu2
 Table de version :
 *** 0.9.3-1.1ubuntu2 0
        500 http://archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

root@lappc-p087:~# opcontrol --no-vmlinux
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
root@lappc-p087:~# opcontrol --start
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

Revision history for this message
Dave Brady (matter-grey) wrote :

I can confirm this. It happens here too.

Revision history for this message
Stefan Sauer (ensonic) wrote :

Me too. Any ideas for workarounds? I am a bit confised as according to http://oprofile.sourceforge.net/faq/, the error would mean that /dev/oprofile/cpu_type is empty.

# more /dev/oprofile/cpu_type
i386/p6
# lsmod | grep oprofile
oprofile 38176 1

Revision history for this message
Stefan Sauer (ensonic) wrote :

Forgort to mention:
# opcontrol --version
opcontrol: oprofile 0.9.4cvs compiled on Feb 14 2008 18:22:33

According to many posts in forums and other distro bug trackers this indicates a mismatch of the kernel version and the user-space tools.

Revision history for this message
Stefan Sauer (ensonic) wrote :

now after removing and reinstalling just
oprofile oprofile-gui

# opcontrol --version
opcontrol: oprofile 0.9.3 compiled on Jan 26 2008 00:51:18

As far as I can tell things match. I really belive the packages are borked.

# uname -a
Linux sterni 2.6.27-7-generic #1 SMP Tue Nov 4 19:33:20 UTC 2008 i686 GNU/Linux

/lib/modules/2.6.27-7-generic/kernel/arch/x86/oprofile/oprofile.ko

I also did a:
opcontrol --deinit
depmod -a
opcontrol --init

but then get the
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

Revision history for this message
Joe Smith (yasumoto7) wrote :

Hm, seems to wfm on 8.10 with the 2.6.27-11-generic kernel and opcontrol: oprofile 0.9.3 compiled on Jan 26 2008 00:51:18

joe@HKD777 $ sudo opcontrol --start
Using default event: CPU_CLK_UNHALTED:100000:0:1:1
Using 2.6+ OProfile kernel interface.
Using log file /var/lib/oprofile/samples/oprofiled.log
Daemon started.
Profiler running.

/var/lib/oprofile/samples/oprofiled.log:
oprofiled started Tue Feb 24 22:28:23 2009
kernel pointer size: 4

Revision history for this message
Martin Olsson (mnemo) wrote :

Seems like Stefan Kost has an old (2.6.27-7-generic) kernel? Stefan, I assume you ran apt-get update etc and you still didn't get the .27-11 kernel?

Revision history for this message
Emmanuel Pacaud (emmanuel-pacaud) wrote :

This issue is still there for me:

~$ sudo opcontrol --start
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

~$ uname -a
Linux lappc-p0 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:35 UTC 2009 i686 GNU/Linux

~$ opcontrol --version
opcontrol: oprofile 0.9.3 compiled on Jan 26 2008 00:51:18

Revision history for this message
Emmanuel Pacaud (emmanuel-pacaud) wrote :

Please also note that with https://bugs.launchpad.net/ubuntu/intrepid/+source/sysprof/+bug/272204 , no system wide profiler is available on mys intrepid installation...

Revision history for this message
Stefan Sauer (ensonic) wrote :

$ apt-get source oprofile
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for oprofile

Whats going on here. I have now build oprofile-0.9.4 from the upstream sources (http://prdownloads.sourceforge.net/oprofile/oprofile-0.9.4.tar.gz), 0.9.3 does not build due to c++ compilation issues.

Also 0.9.4 has a issue:
gedit ./libutil++/file_manip.cpp +47

- int fd = open(destination.c_str(), O_RDWR|O_CREAT);
+ int fd = open(destination.c_str(), O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);

Still no luck :/

# opcontrol --version
opcontrol: oprofile 0.9.4 compiled on Mar 3 2009 11:20:06
root@sterni:~# opcontrol --start
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
Using default event:
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

Revision history for this message
Stefan Sauer (ensonic) wrote :

For the hack to get it to built, there is a bug report already and its fixed in cvs:
http://sourceforge.net/tracker/index.php?func=detail&aid=2216012&group_id=16191&atid=116191

I now slowly suspect some issue with oprofile itself and filed a ticket upstream:
https://sourceforge.net/tracker2/?func=detail&aid=2656745&group_id=16191&atid=116191

Revision history for this message
Stefan Sauer (ensonic) wrote :

I got it up and running for me. See the comments in:
https://sourceforge.net/tracker2/?func=detail&aid=2656745&group_id=16191&atid=116191

Will now test if it actually works :)

Revision history for this message
Stefan Sauer (ensonic) wrote :

According https://sourceforge.net/tracker2/?func=detail&aid=2656745&group_id=16191&atid=116191 this is a bug in ubuntu kernel wrongly reporting i368/p6_mobile as i386/p6. A kernel update would be nice.

Emmanuel, could us update the title and reassign.

Revision history for this message
Loïc Minier (lool) wrote :

Stefan, I grepped the upstream kernel sources and the only mention of "p6_mobile" is in arch/x86/oprofile/nmi_int.c and this file is identical to the one in ubuntu/ubuntu-jaunty.git.

The git log of arch/x86/oprofile/nmi_int.c claims the detection was fixed for p6_mobile.

Revision history for this message
Håkon A. Hjortland (post-hakn) wrote :

My system is a Core i7 920. Using Ubuntu 9.04 (jaunty).
$ uname -a
Linux foo 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux
$ opcontrol --version
opcontrol: oprofile 0.9.3 compiled on Feb 25 2009 10:54:56

Getting the same problem here too:
$ sudo opcontrol --init
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

I guess this means the CPU is not supported:
$ cat /dev/oprofile/cpu_type
i386/arch_perfmon
$ ls /usr/share/oprofile/i386/
athlon core core_2 p4 p4-ht p6_mobile pii piii ppro

Workaround (use timer mode):
$ lsmod | grep -i oprofile
oprofile 50016 1
$ sudo opcontrol --deinit
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode
Daemon not running
Unloading oprofile module
$ lsmod | grep -i oprofile
$ sudo modprobe oprofile timer=1
$ sudo opcontrol --init
(No error messages.)

I don't know which impact the fallback to timer mode has on the performance of oprofile.

FYI, from CVS:
$ ls oprofile/events/i386/
arch_perfmon athlon atom core core_2 core_i7 CVS nehalem p4 p4-ht p6_mobile pii piii ppro

Revision history for this message
Jean-Marc Saffroy (saffroy) wrote :

I encountered the same problem with Jaunty/UNR on an Atom CPU. With this CPU, the oprofile kernel module also reports a cpu_type of i386/arch_perfmon, which is not a problem in itself, but requires a patch to oprofile (fix in in oprofile CVS, after the 0.9.4 release).

Linus filed a bug report on Fedora, a separate patch is available:

https://bugzilla.redhat.com/show_bug.cgi?id=497230
http://cvs.fedoraproject.org/viewvc/devel/oprofile/oprofile-iaperf.patch?view=co

The patch works for me when applied to oprofile 0.9.4 from sourceforge.

Revision history for this message
kernel-janitor (kernel-janitor) wrote :

Hi Emmanuel,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/ . Please then run following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 272209

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote : apport-collect data

Architecture: amd64
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=c351140f-10f1-42e4-ab70-0af1449e367e
MachineType: Dell Inc. Latitude D820
Package: linux (not installed)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-4-generic root=UUID=66ba3064-49fc-43d4-ab7c-0bf44de3e3f0 ro quiet splash
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=ro_RO.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-4.23-generic
RelatedPackageVersions: linux-backports-modules-2.6.31-4-generic N/A
Uname: Linux 2.6.31-4-generic x86_64
UserGroups: adm admin audio cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 10/13/2006
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A04
dmi.board.name: 0GF470
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA04:bd10/13/2006:svnDellInc.:pnLatitudeD820:pvr:rvnDellInc.:rn0GF470:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude D820
dmi.sys.vendor: Dell Inc.

Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Revision history for this message
Lucian Adrian Grijincu (lucian.grijincu) wrote :
Changed in linux (Ubuntu):
status: Incomplete → New
tags: added: apport-collected
Brad Figg (brad-figg)
tags: added: b73a1py79
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in supported series, ple
ase file a new bug.

Changed in linux (Ubuntu):
status: New → Won't Fix
Brad Figg (brad-figg)
tags: removed: b73a1py79
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.