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

Monkeypatch io.read/io.write/open/io.open to track blocking calls in debug mode #1162

Closed
arcivanov opened this Issue Mar 30, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@arcivanov
Contributor

arcivanov commented Mar 30, 2018

This is related to #1070 and provides an safe debug-time alternative.

Without making any of the above methods non-blocking/loop-friendly, it might be useful to provide facilities to mp all blocking IO methods in debug/troubleshooting mode to track blocking IO operations.

Even if the mp'ed code functions correctly in test, it may be only due to circumstances surrounding the environment, i.e. if a method accepts a domain socket and there are no buffer overflows the loop would be responsive simply due to localhost communication even if blocking IO is on a critical path. Same code where unix socket is replaced with a TCP one talking remotely over a slow link will grind the loop to a halt, which in turn is very hard to troubleshoot.

By introducing an ability to optionally mp all blocking IO code without modifying its behavior (other than auditing) would provide insight into missed mp branches.

@arcivanov arcivanov changed the title from Monkeypatch os.read/os.write/open/io.open to track blocking calls in debug mode to Monkeypatch io.read/io.write/open/io.open to track blocking calls in debug mode Mar 30, 2018

@arcivanov

This comment has been minimized.

Contributor

arcivanov commented Apr 3, 2018

I think this is basically a part of a bigger #1021

jamadden added a commit that referenced this issue Apr 3, 2018

jamadden added a commit that referenced this issue Apr 3, 2018

jamadden added a commit that referenced this issue Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment