Vtune silently exits on linux64 command line

Vtune silently exits on linux64 command line

We have introduced aio to our codebase, but vtune silently exits when encountering this function. Other tools, such as gdb and valgrind runs this code fine.

The version used is update 4. (build 128765)

This is the command line we're running
/opt/intel/vtune_amplifier_xe_2011/bin64/amplxe-cl -user-data-dir ~/vtune -collect hotspots -duration 60 -- Release-Static-Linux-intel64/UniverseManager
Using result path `/home/anderse/vtune/r036hs'
Executing actions 50 % done
Error: Error 0x4000001d (Cannot find raw collector data) -- Cannot re-finalize the result: it has no raw collector data.

[code]
size_t IOFile::Read( void* buffer, uint64 startPos, size_t numBytes )
{
size_t numRead = 0;

fcAssert( buffer );
fcAssert( CanRead() );

if ( m_hFile )
{
aiocb64 request;
request.aio_fildes = fileno(m_hFile);
request.aio_offset = (off64_t)startPos;
request.aio_buf = buffer;
request.aio_nbytes = numBytes;
request.aio_reqprio = 0;
request.aio_sigevent.sigev_notify = SIGEV_NONE;

aiocb64* requestPtr = &request;

if (aio_read64(&request) != 0)
{
SetFailed();
}
else if (aio_suspend64(&requestPtr, 1, NULL) != 0) // vtune exits here
{
SetFailed();
}
else
{
numRead = aio_return64(&request);
}

return numRead;
}
SetFailed();
return 0;
}
[/code]

if we replace the above function with fread/fopen it does not silently exits.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting k4m1...
Error:
Error 0x4000001d (Cannot find raw collector data) -- Cannot re-finalize the result: it has no raw collector data.
...

Another possible interpretation of the error code is as follows:

"Exception status code used by Win32 x86 emulation subsystem"

k4m1,

There are various possible
causes for the error. Before proceeding,
can you attempt with Intel VTune Amplifier XE 2011 update 7? Then, can you verify that the Tachyon sample
code can be analyzed in the same way as your application? This will help narrow the scope of probable
causes. Is the application being ran as
one user while analysis is ran as another user?
If possible, run both as root and see if the behavior changes.

Thanks
Rob

Hey, unfortunatly operations is taking quite a bit upgrading to update 7.

I have created a small testcase to narrov the scope

vtune.cpp

#include

#include

#include 
int main ()

{

  FILE* file;

  file = fopen("vtune.cpp", "r");

  if (file)

  {

    char buffer[1024];

    size_t numBytes = 1024;
    size_t  numRead = 0;
    aiocb64 request;

    request.aio_fildes = fileno(file);

    request.aio_offset = (off64_t)0;

    request.aio_buf = buffer;

    request.aio_nbytes = numBytes;

    request.aio_reqprio = 0;

    request.aio_sigevent.sigev_notify = SIGEV_NONE;
    aiocb64* requestPtr = &request;
    if (aio_read64(&request) != 0)

    {

      return 1;

    }

    else if (aio_suspend64(&requestPtr, 1, NULL) != 0)

    {

     return 1;

    }

    else

    {

      numRead = aio_return64(&request);

    }

    buffer[numRead] = 0;

    std::cout << "Read " << numRead << "bytes: " << std::endl << buffer << std::endl;

  }
  return 0;

}

g++ vtune.cpp -lrt
/opt/intel/vtune_amplifier_xe_2011/bin64/amplxe-cl -user-data-dir ~/vtune -collect hotspots -- ./a.out

This works:
/opt/intel/vtune_amplifier_xe_2011/bin64/amplxe-cl -user-data-dir ~/vtune -collect hotspots -- /usr/sbin/lsof -i

Everything is beeing ran as my user.

k4m1,

I seem to have experienced similar behavior with aio and hotspots analysis. In my test,
the analysis finished. However there
were several warnings including Warning: Failed to stop the sampling timer for
the thread and Warning: Cannot load data file `.log I am not certain of the exact cause. Perhaps others have run into this behavior
using aio and can provide additional information in this thread.

I will bring this behavior to the attention of the
Developers and update this public thread when new information is available. If you have a Premier Support account, you can
if you wish, create a Premier Support
case and the behavior can also be worked / tracked there.

- Rob

k4m1,

I added substantial run time to the example app so now
it runs for more than a short period of time.
With this, the example runs without error in Update 7. The behavior has most likely changed between update
4 and the latest released version. Can
you update to the latest (Currently Update 7) and attempt to replicate with
your application and in your environment?

- Rob

Hey, Finally got upgrade 7 installed, and it indeed fixes the issue. The program no longer silently exists when encountering aio function calls.

Thank you for the thread
update. Good to hear that the latest release
is working for you.

- Rob

Leave a Comment

Please sign in to add a comment. Not a member? Join today