scalene icon indicating copy to clipboard operation
scalene copied to clipboard

Asyncio support

Open pietrodn opened this issue 3 years ago • 6 comments

Is Scalene supposed to support asyncio-based applications? I'm trying to profile a complex application using asyncio on macOS 11, Python 3.9.

If the full CPU+memory profiling is enabled, Scalene immediately crashes with a SIGSEGV or a SIGBUS. I added some print statements to my code to see when it crashed, and it seems to do so nondeterministically.

With --cpu-only, it manages to executes the program, but when I terminate the application with a SIGTERM (my program catches the signal to perform a clean shutdown), Scalene crashes and it is unable to write the full HTML report.

Is there anything I may try to help debug this issue?

pietrodn avatar Jun 13 '21 10:06 pietrodn

Just for starters, which version of Scalene are you using? (scalene --version)

emeryberger avatar Jun 13 '21 20:06 emeryberger

I tried 1.3.6 and then the latest master from GitHub.

pietrodn avatar Jun 13 '21 20:06 pietrodn

Great. Any chance you could test it on a Linux platform? That could help isolate the problem.

emeryberger avatar Jun 13 '21 21:06 emeryberger

Just to chime in, I experienced the same issue on macOS (11.4) and using scalene version 1.3.8. Attempting to profile the same code on Linux works.

yosoyjay avatar Jul 10 '21 17:07 yosoyjay

If you can provide a repro case, it'd be most helpful!

emeryberger avatar Jul 13 '21 20:07 emeryberger

I was attempting to profile this Panel based app on my Mac laptop when I ran into the same SIG* issues.

yosoyjay avatar Jul 13 '21 23:07 yosoyjay