Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
746 stars 54 forks source link

Avoid using subprocess.Popen.wait() #748

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

Possiblyt fixes #744 - avoids all subprocess.Popen.wait() calls, which are possibly deadlocking.

Jongy commented 1 year ago

Failure is not related.

Jongy commented 1 year ago

spelling

I'll go over the text again, anything specific though? :sweat_smile:

Jongy commented 1 year ago

While this is a good change, I understand it won't solve the case I described in the ticket, which was a process that has pending output + was killed due signal + wait() is blocking. IIRC PyPerf does not handle SIGTERM - so it is killed immediately, and hence, wait() should not block (if PyPerf was handling SIGTERM then we could say it's trying to exit but blocking on pipe writes).

In any case... it's a good change so I'm merging anyway.