wolfpld / tracy

Frame profiler
https://tracy.nereid.pl/
Other
10.25k stars 692 forks source link

Crash in HandleSymbolCodeQuery if module is unloaded #888

Open jkriegshauser opened 2 months ago

jkriegshauser commented 2 months ago

We have a heavily modularized application. When running with privileges to get sys-tracing, the query backlog can grow quite high.

The shutdown order looks something like:

  1. Unload most modules.
  2. Unload our profiling-tracy module (blocks until tracy::ShutdownProfiler() returns)
  3. Unload the rest of our modules
  4. Exit application

Unfortunately, if a SymbolCodeQuery query is processed for a module that unloaded, we usually end up in the CrashHandler and the application is hung at this point.