X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 432F23982068 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1620205851; bh=wbVOQJp+MlivQ+Y5Ie1A96XnqSpMsR8XdmeJ7tB2i3s=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gefR/6LmGRPPy8iIw8mCbXg3SBoXnuN2BvVH6SG1pkLp+lm74kzQ/CmQbJ+Xi1M0D e7YZ00Z4Useissbq74FymWWDAvxR+IxVW6QKCzzE6wEJBnew4zPEZhcH0jxLdYIw98 rcSeR3K52YeNEgpyOL+Ell2vQ/IcV8qtdnnV5AzY= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A491C3851C36 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gKfIH0pfcw4zTlR164wAqlcN7qngNmruRAYHRlyVaiU=; b=fMop/TAkoFNtsYOwUWddjG9vybciWgN/tlHNov9yOJ96pi/67R2AQwHTcTDhMOz4eI XffdjKx7L/JxX+D+WWgRqZbOX/p5Ax2JDTS+m0PR5peVc0LiFoHJRnw1TNYBWj4mhR+7 kfz2cTWizPL0K5vPwAAasXvpr+brlG5G6Cdt2eCfLOzCWUEZV4kubB0sk8COQBtz9yqb /KPneTaixs1tsJ1eqkruytnVgvoH8gmdZTMVExG9M5ydt7Tke2q9t37abOlfWUULsbEO Fy5EatZYP8Yhm6FjCLTWZpy564WS+Y6mp0HFaI2p9QG2/l94lqaGg16x5E/DDAOd+tzL L0Cw== X-Gm-Message-State: AOAM531M0s9rSuikPgZ8jGOutSfN1BVU9LcbwV2wEGeN7kHZ66JoCt85 C0+PeZbDWYnypD0lDrFMdzNHHpjuUd9mdQ== X-Google-Smtp-Source: ABdhPJxZZVAFqnzpKcwAqne9dJdLKRJGSJQ/VSrHC4A2wbHRVmrS9VTye2RMe1PiyIT/U3YYjC2zVA== X-Received: by 2002:a7b:c8ca:: with SMTP id f10mr32289339wml.118.1620205846688; Wed, 05 May 2021 02:10:46 -0700 (PDT) Subject: Re: python > 3.5: Issue with unix domain sockets To: cygwin AT cygwin DOT com References: <1620046759893 DOT 5340 AT bmw DOT de> Message-ID: Date: Wed, 5 May 2021 11:10:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <1620046759893.5340@bmw.de> Content-Language: it X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Marco Atzeri via Cygwin Reply-To: Marco Atzeri Content-Type: text/plain; charset="windows-1252"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 1459Atil018709 On 03.05.2021 14:57, Maximilian.Blenk--- via Cygwin wrote: > Hello everyone, > > I noticed that latest Cygwin release (3.2.0-1) has an issue with python and unix domain sockets, although I’m not a 100% sure about the root cause. My best guess is that something is wrong with the unix domain dockets implementation. I would like to attach the cygcheck.out but it seems to exceed the 180kb limit mentioned on the website (even zipped) > > Simple Reproducer: > I tried to get the example shown at https://pymotw.com/3/socket/uds.html working. It works if I execute it with python3.5 (both client and server), but it doesn’t if I use python3.6 or newer (actually tested 3.6 and 3.7 on Windows 10): > > Correct Behavior: > Server: > $ python3.5 server.py > starting up on ./uds_socket > waiting for a connection > connection from > received b'This is the mess' > sending data back to the client > received b'age. It will be' > sending data back to the client > received b' repeated.' > sending data back to the client > received b'' > no data from > waiting for a connection > … > > Client: > $ python3.5 client.py > connecting to ./uds_socket > sending b'This is the message. It will be repeated.' > received b'This is the mess' > received b'age. It will be' > received b' repeated.' > closing socket > > 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 > 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: 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 > data = sock.recv(16) > ConnectionResetError: [Errno 104] Connection reset by peer > > > Am I missing something? > > BR Max > Hi Max, thanks for the example. Mark Geisert provided me a solution and it passes your test case on python3.8 and it seems to not add other problem at list in my tests. give me some time to update all packages (3.6, 3.7, 3.8) for both architecture in the coming days Regards Marco -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple