ITADN

Is there any risk in calling it from within a signal processing function?

#742Openyangrudan 创建于 2025-11-05
Y
yangrudancommented
# question When I used the backtrace library during model training—specifically, I registered SIGUSR2 and called this function within its handler function—I found that the program got stuck at line 99 after adding logs(in picture one). The printout of rank 68 stopped at line 485 of the second image. <img width="2753" height="1519" alt="Image" src="https://github.com/user-attachments/assets/d3ea9a38-c98a-4fc2-b4e6-1aec05fa8344" /> <img width="2753" height="1519" alt="Image" src="https://github.com/user-attachments/assets/1d28ca8f-c456-4614-901e-2f522b1fd57b" /> I noticed that the `resolve_frame` function implementation uses a lock. Does this mean that the bakctrace library is not asynchronous signal-safe?
2 条评论