Re: opcontrol sh: write error: Invalid argument

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 01/26/2015 07:28 AM, Andrew Jones wrote:
> Hi Everyone,
> 
> Recently I cross-compiled Oprofiler for MIPS.
> When  I run --start, I'm getting 'write error'.  Details are below:
> 
> # pwd
> /root
> # export OPROFILE_EVENTS_DIR=/root
> # ./opcontrol --deinit
> dump fail: daemon died during last run ?
> Detected stale lock file. Removing.
> # ./opcontrol --no-vmlinux
> # ./opcontrol --reset
> # ./opcontrol --init
> # ./opcontrol --event=CYCLES:1000:0:1:1
> # ./opcontrol --status
> Daemon not running
> Session-dir: /var/lib/oprofile
> Event 0: CYCLES:1000:0:1:1
> Separate options: none
> vmlinux file: none
> Image filter: none
> Call-graph depth: 0
> # ./opcontrol --start
> sh: write error: Invalid argument
> Using 2.6+ OProfile kernel interface.
> Using log file /var/lib/oprofile/samples/oprofiled.log
> Daemon started.
> Profiler running.
> 
> 
> Unfortunately my sh isn't giving me a line number along with that error.
> Any help would greatly appreciated.

Hi Andrew,

opcontrol is a shell script. One trick that you might do maybe try running opcontrol with the following to find out what commands are being run:

sh -x /usr/bin/opcontrol --start >& opcontrol.log

The ouptput in opcontrol.log might give a better idea where the write error occurred.

> 
> *oprofiled.log:*
> oprofiled started Tue Nov 30 00:46:05 1999
> kernel pointer size: 4
> Failed to exec opjitconv: No such file or directory
> oprofiled: open of /var/lib/oprofile/samples//current/{root}//bin/busybox/{dep}/{root}//bin/busybox/INSTRUCTIONS.100000.0.all.all.all failed: Invalid argument
> ...

Is opjitconv built and installed?  It appears that is missing you might try to build and install it.

-Will



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.