Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22466

"Morphex's Blogologue": Encountering Python crash on numerous client connects to socketserver

$
0
0
On the SMPS package, I've refactored a bit since the last blog post, and I also encountered what looks like a bug in Python.

Python can randomly crash if too many client connections are made to the socketserver, and it crashes in such a way that it is difficult for me as a regular Python programmer to understand what the problem could be.

So although I was tempted to do a bit of C debugging and poke around, I do have limited time and energy, so I did the smart thing and patched it up so that it is easy to reproduce the problem:

https://github.com/morphex/smps/commit/59fbc78ebddcc3a68c6ea...

and then I created an issue in the Python bug tracker:

https://github.com/python/cpython/issues/95204

[Added later:] Aha. So it turns out I was quitting threads, and this gave an unclear error message. Thanks to Jeff Epler for pointing that out.

That got worked on in this commit:

https://github.com/morphex/smps/commit/9b539075627dd2016fca6a98f70913f21671e072

and the parent commit. Now with > 400 test connections I get an SSL handshake timeout, but, that's in ssl.c and probably due to some configuration setting somewhere.

Viewing all articles
Browse latest Browse all 22466

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>