From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03B4B138330 for ; Tue, 27 Sep 2016 16:43:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 800F2E0941; Tue, 27 Sep 2016 16:26:07 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BDB06E0941 for ; Tue, 27 Sep 2016 16:26:06 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id s64so2043645lfs.2 for ; Tue, 27 Sep 2016 09:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OMEhzknYabRMoCt3jo0cG3YYeYxPjppQhVcClr1Odwc=; b=lyEbM7DGk53nbGKwMDdFpCwn6rQfNzH9/UcP4EIruvFN21X2FVaBQMCIoFmwA90xQo iX3338Dm3znqGhJ8dISYo7WUvD2kvCiRmcUz6X9JBHiti8p5vM2u5c/bXO3/3bVuvJ1K i5bwRPxvYAg/eJH0h5tro5RURy10zOAzib1aXURfS1x7Ay/URKQNv3UbLG0cE7RI5Plh Z5EAzULQDZ5Dg1wsiG99QBFg/zxZpT3iq+WgegpKPIgrbcBo/MSsgIee7amcwgu6QLbi w5hPZldbYwlBjU4TeIrYJON7QepdWxJpFOw8As1uybJ9NCUJ7v5n1CuJWSQtqFJWnLrz X0HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OMEhzknYabRMoCt3jo0cG3YYeYxPjppQhVcClr1Odwc=; b=CGWBHA77j13V2zByVwX5KGO+gjXXVl0Cb5mbEC/lY44OTgmWLUQcZAr9B3MkSn3p45 AbcxNsYoLoPjeKLg/tspT//5EcLDs3uH3imUmQ6zVMyx0yxv5bomcXnx9KxBstGX0sCC 3QhQKIZWsSwDwPBB6GjVVGsaUrv9TyQ6EOV5aRlASKNHGfRGuTJxwG3hAUxbuciX2Jvz A5CIzLoUvZO+qfS32JcD95wcDGZGQY2bkW+UGKEp4eW5+XPWn+UU4aRoSM83MKCPRdUr zzq78RPQzNEF8ML9DX0m4Sm1WnQIP6k5T1u7+slD47s+L/ZsUgLrZBH7562FeREPlULp xEJQ== X-Gm-Message-State: AE9vXwP8+GQDfMdKiGetrEpuV7bH7/mKOa0sMhNRVptUvwn6c+y1zSb+7jES39cqOzDlSx31m8fQnacEPP4Gmg== X-Received: by 10.46.32.205 with SMTP id g74mr9238251lji.1.1474993564818; Tue, 27 Sep 2016 09:26:04 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Sender: zmedico@gmail.com Received: by 10.114.185.133 with HTTP; Tue, 27 Sep 2016 09:26:04 -0700 (PDT) In-Reply-To: <20160926235815.4d835f1c8c9da95e85f7a702@plushkava.net> References: <20160926235815.4d835f1c8c9da95e85f7a702@plushkava.net> From: Zac Medico Date: Tue, 27 Sep 2016 09:26:04 -0700 X-Google-Sender-Auth: 6TvIYCczZ-5YUXm5KsOR62u4KJk Message-ID: Subject: Re: [gentoo-portage-dev] [PATCH v2] AbstractEbuildProcess: disable ipc_daemon under Windows Subsystem for Linux To: Kerin Millar Cc: gentoo-portage-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: c4f5b60b-2aa4-473a-91df-2c35566d49c1 X-Archives-Hash: 765d17991cfdf355c45f334b2a80541d On Mon, Sep 26, 2016 at 3:58 PM, Kerin Millar wrote: > On Sun, 25 Sep 2016 22:49:59 -0700 > Zac Medico wrote: > >> On Thu, Sep 22, 2016 at 8:48 PM, Zac Medico wrote: >> > On Thu, Sep 22, 2016 at 8:23 PM, Kerin Millar wrote: >> >> Duly updated to use any instead of ==, as recommended by Brian Dolbec. >> >> >> >> -- >> >> Kerin Millar >> > >> > My first choice would be to use a small test case to detect when ipc >> > is broken, and disable it dynamically. A good example of such a test >> > is the can_poll_device function here: >> > >> > https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/util/_eventloop/EventLoop.py?h=portage-2.3.1#n597 >> > >> > If it's not possible to use a test similar to the above, maybe it's >> > best to use /proc/version or /proc/sys/kernel/osrelease as mentioned >> > in the following issue: >> > >> > https://github.com/Microsoft/BashOnWindows/issues/423 >> > >> > Thanks, >> > Zac >> >> I've started playing around with WSL, and I've discovered that >> portage's ipc actually works if we use fcntl.flock instead of >> fcntl.lockf!!! Simply set _default_lock_fn = fcntl.flock in >> pym/portage/locks.py, and watch the tests succeed: >> >> $ pym/portage/tests/runTests.py pym/portage/tests/ebuild/test_ipc_daemon.py >> testIpcDaemon (portage.tests.ebuild.test_ipc_daemon.IpcDaemonTestCase) ... ok >> >> ---------------------------------------------------------------------- >> Ran 1 test in 1.282s >> >> OK > > How strange! While the ebuild-ipc helper waits for a response, it uses non-blocking lock calls to poll for liveliness, so it's critical that the locking api be usable here. We've seen a similar issue in the past with PyPy, where fcntl.lockf was broken while fcntl.flock worked just fine. Thanks, Zac