Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py-spy segfault with --subprocesses #724

Open
singharpit94 opened this issue Nov 5, 2024 · 4 comments
Open

py-spy segfault with --subprocesses #724

singharpit94 opened this issue Nov 5, 2024 · 4 comments

Comments

@singharpit94
Copy link

Hi, I noticed that using py-spy with subprocesses ends up giving a segmentation fault error. Below is a minimal reproducer

from concurrent.futures import ProcessPoolExecutor

def lfilter(filt_b, filt_a, x_t, axis=-1):
    import scipy.signal
    y_t = scipy.signal.lfilter(filt_b, filt_a, x_t, axis=axis)
    return y_t

if __name__ == '__main__':
    for _ in range(100):
        with ProcessPoolExecutor(1) as executor:
            executor.submit(lfilter, [1.0], [1.0], [1.0]).result()

Used the below command to run py-spy

py-spy record -o <> --subprocesses -- <filepath>

Can you please suggest solution for the above issue.

@singharpit94
Copy link
Author

Might we related to #638

@benfred
Copy link
Owner

benfred commented Nov 5, 2024

What operating system, version of python and version of py-spy are you using here?

Fwiw, I just tried out your reproducer using ubuntu 22.04, python 3.12 and py-spy 0.4.0 and it worked fine for me

@peytondmurray
Copy link

I've been trying to reproduce this on Linux 6.6.59-1-lts x86_64 with the python 3.12.4 and the development version of py-spy as well, but haven't been able to. Are you on MacOS?

@singharpit94
Copy link
Author

I was using the 0.3.14 version but seems like using 0.4.0 does not gives the seg fault error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants