4 Replies Latest reply on Mar 24, 2014 11:23 AM by jirmik

    CodeXL GPU application trace command line arguments length



      we are working on a command-line tool which accepts many command-line arguments. In linux, it works OK when executed directly, but when we want to profile it, it gets stuck in first CL call when run under CodeXL remote agent in GPU application trace mode. Can't try locally with CodeXL, because we use our GPUs in headless servers. The backtrace looks like this:

      #0  0x00007f056aa9603a in std::string::find(char const*, unsigned long) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

      #1  0x00007f0565a14eed in FileUtils::GetParametersFromFile(Parameters&) () from /opt/AMD/CodeXL_1.3.3487/bin/x86_64/libCLOccupancyAgent.so

      #2  0x00007f0565a065d1 in clAgent_OnLoad () from /opt/AMD/CodeXL_1.3.3487/bin/x86_64/libCLOccupancyAgent.so

      #3  0x00007f0567b39477 in ?? () from /usr/lib/libamdocl64.so

      #4  0x00007f0567b39a30 in ?? () from /usr/lib/libamdocl64.so

      #5  0x00007f0567b4e557 in ?? () from /usr/lib/libamdocl64.so

      #6  0x00007f0567b1ae73 in clIcdGetPlatformIDsKHR () from /usr/lib/libamdocl64.so

      #7  0x00007f056acfa5b2 in ?? () from /usr/lib/libOpenCL.so.1

      #8  0x00007f056acfc986 in ?? () from /usr/lib/libOpenCL.so.1

      #9  0x00007f056af0c400 in pthread_once () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:104

      #10 0x00007f056acfc747 in ?? () from /usr/lib/libOpenCL.so.1

      #11 0x00007f056acfa7a5 in ?? () from /usr/lib/libOpenCL.so.1

      #12 0x00007f056acfbf20 in clGetPlatformIDs () from /usr/lib/libOpenCL.so.1

      #13 0x00000000004024fe in main ()


      The process uses 100% of one CPU core in this state and does not seem to advance (killed after 30 minutes spent inside FileUtils::GetParametersFromFile). Strange thing is that it works even with CodeXL remote agent if launched with shorter commandline (less arguments). It gets stuck even with only 10 arguments, each only tens of characters long.


      We use Ubuntu linux 12.04, both on servers and development clients. Clients run CodeXL GUI (version 1.2.3487.0) and servers run CodeXLRemoteAgent (same version 1.3.3487.0). Driver version is following:

      [    6.750882] <6>[fglrx] module loaded - fglrx 13.35.5 [Mar 12 2014] with 1 minors


      Any ideas please? Does CodeXL use any limit for command-line size? Is this limit documented if it exists? CodeXL does not seem to complain about command line arguments length - the profiled application just gets stuck.



      Martin Jirman