Repository navigation
Conversation
RemoteUnwinderRemoteUnwinder
| """ | ||
| with _managed_subprocess([sys.executable, "-c", script]) as process: | ||
| # On Linux, wait until execve() replaced the forked process image. | ||
| if sys.platform == "linux": |
There was a problem hiding this comment.
It would be nice if we could find a portable solution to fix also the issue on other platforms.
There was a problem hiding this comment.
Thanks! I think the portable solution is the earlier socket-communication version in this PR. The child sends a b"ready" signal, which can only happen after execve(). It works on Linux/macOS/Windows. I'm happy to switch back to that version if you prefer portability.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
@tanloong @vstinner Can we try with self._target_process(script) as (process, _, _):
unwinder = RemoteUnwinder(
process.pid, native=True, gc=False, cache_frames=False,
)Also, getting rid of the whole cc @pablogsal |
|
@maurycy That's much cleaner! I'd like to switch to |
Explained in #162251 (comment).
Adds socket communication following the pattern used by other tests in
test_external_inspection.py. I confirmed the timeout error appears onmainand disappears with the change.