From dev-return-94730-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Fri May 3 13:23:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5989218064D for ; Fri, 3 May 2019 15:23:05 +0200 (CEST) Received: (qmail 44822 invoked by uid 500); 3 May 2019 13:23:04 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 44811 invoked by uid 99); 3 May 2019 13:23:04 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2019 13:23:04 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6B9D2E02EC for ; Fri, 3 May 2019 13:23:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 16DCC25814 for ; Fri, 3 May 2019 13:23:00 +0000 (UTC) Date: Fri, 3 May 2019 13:23:00 +0000 (UTC) From: "Andrew Stitcher (JIRA)" To: dev@qpid.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PROTON-2039) Python listener.close leaves socket in time_wait MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PROTON-2039?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D168= 32491#comment-16832491 ]=20 Andrew Stitcher commented on PROTON-2039: ----------------------------------------- [~chug] is this reported against the wrong version of the code? 0.27.1 does= not have the code you patched. That is only in 0.28 (snapshot). > Python listener.close leaves socket in time_wait > ------------------------------------------------ > > Key: PROTON-2039 > URL: https://issues.apache.org/jira/browse/PROTON-2039 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding > Affects Versions: proton-c-0.27.1 > Environment: Fedora 29, python 3.7.3 > Fedora 28, python 2.7.15 > Reporter: Chuck Rolke > Priority: Major > Attachments: PROTON-2039.patch > > > To demonstrate: execute python/examples/helloworld_direct.py two times wi= thin a few seconds. The first time works and the second time fails with an = 'Address already in use' error. > The expectation is that this program can be run many times in quick succe= ssion. > =C2=A0 > {code:java} > (M=3D713c3 ?7) chug@unused examples> pwd > /home/chug/git/qpid-proton/python/examples > (M=3D713c3 ?7) chug@unused examples> ./helloworld_direct.py > Hello World! > (M=3D713c3 ?7) chug@unused examples> ./helloworld_direct.py > Traceback (most recent call last): > =C2=A0 File "./helloworld_direct.py", line 48, in > =C2=A0=C2=A0=C2=A0 Container(HelloWorld("localhost:8888/examples")).run() > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py",= line 181, in run > =C2=A0=C2=A0=C2=A0 while self.process(): pass > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py",= line 238, in process > =C2=A0=C2=A0=C2=A0 event.dispatch(handler) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_events.py", = line 138, in dispatch > =C2=A0=C2=A0=C2=A0 self.dispatch(h, type) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_events.py", = line 135, in dispatch > =C2=A0=C2=A0=C2=A0 _dispatch(handler, type.method, self) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_events.py", = line 115, in _dispatch > =C2=A0=C2=A0=C2=A0 m(*args) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_handlers.py"= , line 476, in on_reactor_init > =C2=A0=C2=A0=C2=A0 self.on_start(event) > =C2=A0 File "./helloworld_direct.py", line 32, in on_start > =C2=A0=C2=A0=C2=A0 self.acceptor =3D event.container.listen(self.url) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py",= line 1166, in listen > =C2=A0=C2=A0=C2=A0 acceptor =3D self.acceptor(url.host, url.port) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py",= line 304, in acceptor > =C2=A0=C2=A0=C2=A0 a =3D Acceptor(self, unicode2utf8(host), int(port), im= pl) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py",= line 678, in __init__ > =C2=A0=C2=A0=C2=A0 sock =3D IO.listen(host, port) > =C2=A0 File "/opt/local/lib64/proton/bindings/python/proton/_io.py", line= 46, in listen > =C2=A0=C2=A0=C2=A0 s.bind((host, port)) > OSError: [Errno 98] Address already in use > 1 (M=3D713c3 ?7) chug@unused examples> ss -t -a -n | grep 8888 > TIME-WAIT=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 12= 7.0.0.1:8888=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 127.0.0.1:42648=C2=A0 =C2=A0 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org For additional commands, e-mail: dev-help@qpid.apache.org