Python regression related to unix sockets
Thu Feb 25 07:41:37 GMT 2021
Following up to myself:
Mark Geisert wrote:
> Hi Fabian,
> Fabian Henze via Cygwin wrote:
>> Hi Cygwin users,
>> I noticed a regression in the recent Python packages: Between version
>> 3.6.10-1 and 3.6.12-2, accessing the SSH agent via the paramiko python
>> package broke. When a ssh agent is used, paramiko tries to connect to
>> it via the unix socket and just freezes. Python 3.8 is also affected,
>> but I don't know which was the last working one.
>> I was able to pinpoint that error to 3.6.12-socketmodule.patch .
>> Reverting/removing the patch fixes the ssh agent access.
>> A few weeks ago there was a discussion regarding "Problems with native
>> Unix domain sockets on Win 10/2019", but it seems unrelated as the
>> cygwin1.dll from  does not work for me.
>> Can you please check if you are able to reproduce that? I uploaded a
>> script  for that.
>> Best regards,
>> Fabian Henze
>>  https://bugs.python.org/file49717/3.6.12-socketmodule.patch
>>  https://cygwin.com/snapshots/x86_64/cygwin1-20210201.dll.xz
>>  https://gist.github.com/henzef/4e553fad2335227b8f6b4550cd3fa543
> Thanks for the report and sorry you've run into this. The patch is a workaround
> that's evidently too draconian. I will debug the situation using your testcase.
> Thank you very much for the testcase.
It's a limitation of the patch. It was meant to allow Python programs on the same
computer to communicate via AF_UNIX sockets, by working around less than perfect
support in the Cygwin DLL. But you've got a Python program trying to communicate
with a non-Python program, and that fails because the patch is only applied on the
Python end of the connection.
If you can continue to run without the problematic patch, that's your best option.
I will learn more about the underlying code in the Cygwin DLL and see if I can
make an improvement there so the Python patch will not be needed in the future.
Thanks again for the report!
More information about the Cygwin