bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Interrupting `memray attach` with Ctrl-C segfaults the application it's attached to #609

Closed godlygeek closed 2 months ago

godlygeek commented 4 months ago

Run an application like python -m http.server & then attach to it with memray attach -v $!. The attach call hangs, because it's waiting for an allocation in the HTTP server process which will never come (unless you send it an HTTP request). But, if you Ctrl-C the memray attach call, the HTTP server process dies with a segfault, in at least some cases (I'm having trouble reproducing this, but it reproduced for @sarahmonod consistently).

godlygeek commented 2 months ago

We're no longer able to reproduce this with the latest main.