This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients alex, christian.heimes, dstufft, janssen, njs, pitrou, vstinner
Date 2017-12-11.11:12:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512990746.17.0.213398074469.issue32275@psf.upfronthosting.co.za>
In-reply-to
Content
"it seems that OpenSSL socket calls can fail with EINTR: ..."

You are easily test by raising a signal: see Lib/test/test_eintr.py which stress Python functions by sending a signal every 100 ms while Python is blocked in a syscall.

If there is a bug, sure, it must be fixed ;-)

It was very tricky to handle EINTR properly in the socket module. While most Python functions are thin wrapper to syscalls with no timeout, almost every socket functions have a timeout. So I wrote sock_call() to factorize the code. This function calls select() internally to check if the socket is "ready", but also updates the timeout, etc.

A few other Python are retried on EINTR and update a timeout, like select.select(), time.sleep(), threading.Lock.acquire() and signal.sigtimedwait().
History
Date User Action Args
2017-12-11 11:12:26vstinnersetrecipients: + vstinner, janssen, pitrou, christian.heimes, alex, njs, dstufft
2017-12-11 11:12:26vstinnersetmessageid: <1512990746.17.0.213398074469.issue32275@psf.upfronthosting.co.za>
2017-12-11 11:12:26vstinnerlinkissue32275 messages
2017-12-11 11:12:26vstinnercreate