ROCm / omnitrace

Omnitrace: Application Profiling, Tracing, and Analysis
https://rocm.docs.amd.com/projects/omnitrace/en/latest/
MIT License
297 stars 27 forks source link

Segfault when OMNITRACE_USE_ROCTX is true #259

Closed gsitaram closed 1 year ago

gsitaram commented 1 year ago

I am using Omnitrace that is built with rocm-5.4.3. Build instructions from omnitrace documentation have been used. Setting OMNITRACE_USE_ROCTX=true in the config file results in a segfault when running a MPI process:

Backtrace (demangled):
[PID=1236084][TID=0][0/8] __restore_rt
[PID=1236084][TID=0][2/8] std::char_traits<char>::length(char const*) +0x37
[PID=1236084][TID=0][3/8] std::basic_string_view<char, std::char_traits<char>>::basic_string_view(char const*) +0x1c
[PID=1236084][TID=0][4/8] omnitrace::roctx_api_callback(unsigned int, unsigned int, void const*, void*) +0x245
[PID=1236084][TID=0][5/8] (anonymous namespace)::TracerCallback(activity_domain_t, unsigned int, void*) +0x4b5
[PID=1236084][TID=0][6/8] (anonymous namespace)::ReportActivity(roctx_api_id_t, char const*, unsigned long) +0x37
[PID=1236084][TID=0][7/8] roctxRangePop +0x12
[PID=1236084][TID=0][8/8] Jacobi_t::Jacobi_t(grid_t&, mesh_t&) +0x6e0

which disappears when I set disable OMNITRACE_USE_ROCTX in the cfg file.

gsitaram commented 1 year ago

Thanks for the fix, @jrmadsen!