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

stackimpact python agent is causing threading issues #4

Open
ByReaL opened this issue Aug 30, 2017 · 1 comment
Open

stackimpact python agent is causing threading issues #4

ByReaL opened this issue Aug 30, 2017 · 1 comment

Comments

@ByReaL
Copy link

ByReaL commented Aug 30, 2017

archlinux python 3.6 x64

self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self._socket.connect((address, port))
self._socket.setblocking(1)
..... etc etc

all works fine
as soon as i add right at the top of the script

agent = stackimpact.start(
agent_key = '...............................',
app_name = 'abc.connect')

my app tries to send stuff before it finished receiving and so on and it all goes south.
when my app is supposed to have a serial behavior, send receive send more receive send receive.. no parallel stuff and definitely not send before it finished receiving.

is there any way to run stackimpact in an app that uses socket lib ?

@dmelikyan
Copy link
Member

My assumption is that signals that profilers rely on interfere with blocking operations. Are you handling errors from blocking calls, such as EINTR? To test if that's the case, you can try to start the agent with disabled profilers by setting the flags cpu_profiler_disabled, allocation_profiler_disabled, block_profiler_disabled to False.

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

2 participants