blob: 2da93733db4a340f309f1bffe461c18b8fb401f2 [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>OProfile User Guide - Troubleshooting</title>
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<th style="width: 100%" align="center" colspan="3">Troubleshooting</th>
</tr>
<tr>
<td style="width: 20%" align="left">
<a href="Example-Project.html" title="Example Project">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
<a href="Updating-This-Document.html" title="Updating This Document">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
<td style="width: 20%" align="left" valign="top">Example Project</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
</table><hr class="navigation-separator"/>
<h1 id="Troubleshooting">Troubleshooting</h1>
<p>Various problems and their solutions are described here. If you encounter a problem not described here, please
<a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?assigned_to=ksebasti%40redhat.com&amp;blocked=&amp;bug_file_loc=http%3A%2F%2F&amp;bug_severity=normal&amp;bug_status=NEW&amp;comment=&amp;component=OProfile&amp;contenttypeentry=&amp;contenttypemethod=autodetect&amp;contenttypeselection=text%2Fplain&amp;data=&amp;dependson=&amp;description=&amp;flag_type-1=X&amp;flag_type-2=X&amp;flag_type-4=X&amp;flag_type-6=X&amp;flag_type-7=X&amp;flag_type-8=X&amp;form_name=enter_bug&amp;keywords=&amp;op_sys=Linux&amp;priority=P3&amp;product=Linux%20Tools&amp;qa_contact=&amp;rep_platform=PC&amp;short_desc=">file a bug</a>.
</p>
<h2 id="Install_Script_Errors">Install Script Errors</h2>
<p>This section describes different errors that could occur from running the install scripts (i.e. <code>
<i>install.sh</i></code> or <code>
<i>install-noconsolehelper.sh</i></code>)
</p>
<h3 id="Error:_script_must_be_run_as_the_root_user">Error: script must be run as the root user</h3>
<p>You attempted to run the script as an ordinary, non-root user. You must be the root user to run the install script, as the scripts edit files located in root-owned directories. </p>
<p>Solution: Run the command <code>su -</code> to become the root user, or run the script as the root user with <code>su -c './install.sh'</code>.</p>
<h3 id="Error:_script_must_be_run_with_pwd_in_script_dir">Error: script must be run with pwd in script dir</h3>
<p>Your current working directory must be the <code>
<i>natives/linux/scripts</i></code> subdirectory of the OProfile core plug-in; running the script relative from another location will not work.
</p>
<p>Solution: Simply follow the steps on
<a href="Installation-and-Set-Up.html#Step_1_-_Locate_the_Installation_Scripts">Step 1 - Locate the Installation Scripts</a> to find the <code>
<i>natives/linux/scripts</i></code> subdirectory of the OProfile core plug-in.
</p>
<h3 id="Error:_required_binaries_do_not_exist.2C_OProfile_not_installed.3F">Error: required binaries do not exist, OProfile not installed?</h3>
<p>The OProfile plug-in could not find the <code>
<i>oprofiled</i></code> and <code>
<i>opcontrol</i></code> binaries. This could mean they are not in their default directory (<code>
<i>/usr/bin</i></code>), or they do not exist at all.
</p>
<p>Solution: If the binaries are on your system (and in your <code>PATH</code>) but not in those directories, you can either remove these checks from the install script or create symlinks in the <code>
<i>/usr/bin</i></code> directory. Of course, if the binaries do not exist on your system, then install the <code>
<i>oprofile</i></code> package.
</p>
<h3 id="Error:_.2Fusr.2Fbin.2Fpkexec_does_not_exist">Error: /usr/bin/pkexec does not exist</h3>
<p>You ran the <code>
<i>install.sh</i></code> script, but <code>pkexec</code> which is provided by PolicyKit was not installed on your system.
As described in
<a href="Installation-and-Set-Up.html#Step_2_-_Choose_Which_Installation_Script_To_Run">Step 2 - Choose Which Installation Script To Run</a>, if <code>PolicyKit</code> is not installed, then you can use the <code>
<i>install-noconsolehelper.sh</i></code> script.
</p>
<p>Solution: Run the <code>
<i>install-noconsolehelper.sh</i></code> script instead.
</p>
<h3 id="install.sh:_line_47:_opcontrol:_Permission_denied">install.sh: line 47: opcontrol: Permission denied</h3>
<p>The opcontrol wrapper file could not be created. This can occur if the <code>
<i>natives/linux/scripts</i></code> subdirectory is located on an NFS mount; the NFS server will not allow the local root user to create files in the directory.
</p>
<p>Solution: After seeing the error mentioned run the following commands from the commandline :</p>
<pre>echo '#!/bin/sh' &gt; opcontrol || exit 1
echo 'exec pkexec /usr/bin/opcontrol ${1+"$@"}' &gt;&gt; opcontrol
chmod +x ./opcontrol
</pre>
<h2 id="No_Samples_From_A_Profile">No Samples From A Profile</h2>
<p>It is possible for a profile run of a program to return no samples, resulting in no <code>current</code> session displayed. This is not always indicative of a problem with either OProfile or the profiled program. OProfile is a system-wide profiling tool; hence, other active processes running on your system may overshadow your program. This is particularly true if the profiled program is not CPU intensive. </p>
<p>In addition, the
<i>Event</i> you choose (selected through the
<b>
<i>Events</i>
</b> tab, as described in
<a href="Profiling-Configuration.html#Regular_Mode">Regular Mode</a>) could cause a profile to return no samples; for example the event
<i>BR_CND_MISSP_EXEC</i> will only provide samples if a branch was mispredicted by the processor. Note also that due to the statistical nature of OProfile, profiling is neither deterministic nor consistent; two subsequent runs may output very different results. In some cases, one run can result in no samples, while another run on the same program can result in many samples. The OProfile online documentation has other useful information
<a href="http://oprofile.sourceforge.net/doc/results.html#no-results">here</a>.
</p>
<p>Solution: The following suggestions could help you generate more samples from a profile run:</p>
<ul>
<li>run your program with a larger input</li>
<li>halt or kill as many other non-essential processes as possible </li>
<li>reduce the
<i>Count</i> in the
<a href="Profiling-Configuration.html#Event_Configuration">Event Configuration</a> tab
</li>
<li>launch a profile several times </li>
</ul>
<p>If you are unsure whether your configuration is working correctly, try profiling the sample project in the
<a href="Example-Project.html#Example_Project">Example Project</a> section.
</p>
<h2 id="Log_Reader_Hangs">Log Reader Hangs</h2>
<p>If the OProfile daemon log file is too large, the log reader may hang and possibly cause the OProfile plug-in to crash. This occurs when the
<i>verbosity</i> option is set to <code>all</code>, which results in several hundred MiB of text in the log over several profile runs. If you do require all this data in the log file, do not launch the log reader. Delete or backup the log file before running the log reader again.
</p>
<h2 id="Using_PolicyKit_with_X.2FVNC">Using PolicyKit with X/VNC</h2>
<p>When using an X/VNC viewer, PolicyKit may open the authentication dialog in the wrong display. If using this setup, please make sure to connect your VNC viewer to the main display.</p><hr class="navigation-separator"/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
<a href="Example-Project.html" title="Example Project">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
<a href="User-Guide.html" title="OProfile User Guide">
<img alt="OProfile User Guide" border="0" src="../../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right">
<a href="Updating-This-Document.html" title="Updating This Document">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
<td style="width: 20%" align="left" valign="top">Example Project</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
</table>
</body>
</html>