stackimpact / stackimpact-python

DEPRECATED StackImpact Python Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, exceptions, metrics, and more
https://stackimpact.com
BSD 3-Clause "New" or "Revised" License
659 stars 25 forks source link

Signal SIGUSR2 not available on Windows #5

Open Tezar opened 7 years ago

Tezar commented 7 years ago

For development we use some boxes with Windows. Currently trying to include start agent on Windows produces self-explaining error

File "...\stackimpact\agent.py", line 113, in start register_signal(signal.SIGUSR2, _signal_handler) AttributeError: module 'signal' has no attribute 'SIGUSR2'

Is it safe to disable this signaling for Win? Unfortunately I am not sure for what is actually SIGUSR2 used in stackimpact so not providing PR.

dmelikyan commented 7 years ago

The OS check was missing in the allocation profiler. I've just pushed a fix for it. Please get the latest agent.

FYI, SIGUSR2 is transparently used as a way to initiate allocation profiler on the main thread from timer threads.

Tezar commented 7 years ago

Hi, thanksfor fast fix. Unfortunately it's still failing with same error. Problem occurs immediately when starting agent. Tried version 1.1.3 ca08a038a5a28a39b1828f6395877253e6d75dd3

dmelikyan commented 7 years ago

That's right, a few more things were actually necessary. Please try the latest. Thanks.