public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Re: python > 3.5: Issue with unix domain sockets
       [not found]     ` <418269b0-1248-008e-25a1-73bf19bbcb10@gmail.com>
@ 2021-05-05  4:25       ` Mark Geisert
  0 siblings, 0 replies; only message in thread
From: Mark Geisert @ 2021-05-05  4:25 UTC (permalink / raw)
  To: Cygwin-Apps

Hi Marco,

Marco Atzeri via Cygwin wrote:
> On 04.05.2021 06:41, Mark Geisert wrote:
>> Ken Brown via Cygwin wrote:
>>> On 5/3/2021 8:57 AM, Maximilian.Blenk--- via Cygwin wrote:
>>>> Incorrect Behavior:
>>>> Server:
>>>> $ python3.7 server.py
>>>> starting up on ./uds_socket
>>>> waiting for a connection
>>>> Traceback (most recent call last):
>>>>    File "server.py", line 27, in <module>
>>>>      connection, client_address = sock.accept()
>>>>    File "/usr/lib/python3.7/socket.py", line 214, in accept
>>>>      sock = socket(self.family, self.type, self.proto, fileno=fd)
>>>>    File "/usr/lib/python3.7/socket.py", line 151, in __init__
>>>>      _socket.socket.__init__(self, family, type, proto, fileno)
>>>> SystemError: <slot wrapper '__init__' of '_socket.socket' objects> returned 
>>>> NULL without setting an error
>>>>
>>>> Client:
>>>> $ python3.7 client.py
>>>> connecting to ./uds_socket
>>>> sending b'This is the message.  It will be repeated.'
>>>> closing socket
>>>> Traceback (most recent call last):
>>>>    File "client.py", line 27, in <module>
>>>>      data = sock.recv(16)
>>>> ConnectionResetError: [Errno 104] Connection reset by peer
>>>
>>> I wonder if this has the same cause as the problem reported here:
>>>
>>>    https://cygwin.com/pipermail/cygwin/2021-February/247884.html
>>>
>>> Mark, can you check that?
>>
>> Hmm, the correlation between failing Python versions and patch placements is 
>> troubling.  I've reproduced the OP's findings and will dig further.
>>
>> ..mark
>>
> 
> 3.5 has not your patch for asyncio, as I am not updating it.
> 
> all the others have it. It will be nice to solve this problem and avoid the freeze 
> that your patch solved.

It turns out a small adjustment to the existing patch fixes this latest issue and 
shouldn't affect the situations reported in the original bug report that provoked 
the patch in the first place.

Line 11 of the patch 3.6.12-socketmodule.patch has:
............return -1;
using dots to denote spaces because this mailer might deformat this email.  If 
that patch line is replaced with:
............/* ignore error returns */;
we have a patch that solves the latest issue as well as the original issue.

That revised patch should also apply to 3.7 and 3.8 without problems.
Thanks & Regards,

..mark

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-05  4:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1620046759893.5340@bmw.de>
     [not found] ` <2cde4128-6a3d-7431-6608-a2184d23964a@cornell.edu>
     [not found]   ` <af597ace-e986-35a0-9983-99256c440791@maxrnd.com>
     [not found]     ` <418269b0-1248-008e-25a1-73bf19bbcb10@gmail.com>
2021-05-05  4:25       ` python > 3.5: Issue with unix domain sockets Mark Geisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).