From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.kgio.general Subject: Re: Concurrency issue in TestKgioUnixConnect? Date: Sun, 1 Sep 2013 19:58:35 +0000 Message-ID: <20130901195835.GB30612@dcvr.yhbt.net> References: <20130901140301.GI1272@loar> <20130901140301.GI1272@loar> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1378065532 17974 80.91.229.3 (1 Sep 2013 19:58:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Sep 2013 19:58:52 +0000 (UTC) To: kgio@librelist.org Original-X-From: kgio@librelist.org Sun Sep 01 21:58:52 2013 Return-path: Envelope-to: gclrkg-kgio@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: kgio@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.kgio.general:198 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VGDnQ-0007U5-55 for gclrkg-kgio@m.gmane.org; Sun, 01 Sep 2013 21:58:52 +0200 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id 6714B74E3C for ; Sun, 1 Sep 2013 20:07:38 +0000 (UTC) Hleb Valoshka <375gnu@gmail.com> wrote: > On 9/1/13, J=C3=A9r=C3=A9my Bobbio wrote: >=20 > > Is there a concurrency issue in TestKgioUnixConnect? > > Looking at the code, I see there's an underlying TOCTOU issue with ho= w > > the temporary socket path name is determined, but I'm not sure if tha= t's > > what we are seeing there=E2=80=A6 > > Any opinions? >=20 > I think you are right. >=20 > I've just pushed trivial patch into team's repository to prevent this i= ssue: > http://anonscm.debian.org/gitweb/?p=3Dpkg-ruby-extras/ruby-kgio.git;a=3D= blob;f=3Ddebian/patches/0002-Change-prefix-of-temporary-sockets-to-preven= t-races.patch Btw, do you want me to take that patch into the upstream repo? It could be improved, too, to use a tmpdir for each test invocation. That would allow multiple instances of the kgio test to run safely at once (e.g. for different versions of ruby/rubinius).