From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13208 Path: news.gmane.org!.POSTED!not-for-mail From: "Joseph C. Sible" Newsgroups: gmane.linux.lib.musl.general Subject: Re: Compile-time flag to enable optional EINTR's? Date: Fri, 7 Sep 2018 09:57:21 -0400 Message-ID: References: <20180907021657.GJ1878@brightrain.aerifal.cx> <20180907131508.GK1878@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1536328544 16571 195.159.176.226 (7 Sep 2018 13:55:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2018 13:55:44 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13224-gllmg-musl=m.gmane.org@lists.openwall.com Fri Sep 07 15:55:40 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fyHEZ-0004DM-N5 for gllmg-musl@m.gmane.org; Fri, 07 Sep 2018 15:55:39 +0200 Original-Received: (qmail 7659 invoked by uid 550); 7 Sep 2018 13:57:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7638 invoked from network); 7 Sep 2018 13:57:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=nzPyHaU63Y4MkkNHIIIMWK3Qlwiu4+/+sCZrQNEFBYc=; b=DkQ8nn1+qYVZptmRlQYY1sau8zpK/KeZUtkGHtCxPRZ4jNuqiljkqwTfEAGbKkYHOP Hp+7XrurGkA4X3ykFRlFGpXJMRcV2p6O3NjhPLV+M8MtlNPm6QR7f87AwbDu9t7ESy89 pIQ2oGEKbskByG1Jx9ZRoRC+KUCS9opLlaGiJd6U4fjUyFTsdOPBH6pjVK7ptCBUcgfc F95sPtQ7SpbK+iGm58RFwMyREnkg2YY8yyAwXuqfglSgCwMV7MgVlJDLUYySFFTK8EgT /SlNOYNxv+NHa4hbI9b8uLicn6EDY5zKf1IGt7mrnJi7vfJk2FercWoPJiODzEOATFgk r9cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=nzPyHaU63Y4MkkNHIIIMWK3Qlwiu4+/+sCZrQNEFBYc=; b=YHBW5uqONWiy8fKclNhotVhsgyHA1oETfd5onSHm1T149c9OiDc+PLWMUPxDtiovg7 IAeYXHSokVOmTDtaGUsZtH8hatlJBs1rnEnnUfrs0SN6xF1oeXh6UqTwXp3l9Gu2peax 1X5rnHhNKWiALYHpBsTfnNgN6Fy4/IdDXC/ne/BcNs53TLurFbchNUhHcPg9iwTbKH0e TvYc5JNu/eLM2/91IFf0zsY2gLLJB6HzIezo8uPUGCxMVkbZ/hbKMeZ22E0neHN6zo39 jSF20V6EsmTNsD3FWANLkBRsVbkFPVGJoVlFKcsIkiVxryp6LxItE3MeXHbXOjiPG1xo u5ow== X-Gm-Message-State: APzg51AKgoccr2rXW8Uf9uqniD7inLc8q3ELQJpV3k0HHiDRxVgvt/kQ mWVlcqtrUTOIb/yjYKzT4WSw4YTayuENzP2LXWU9o6Tt X-Google-Smtp-Source: ANB0VdaCYpZu6p/gXmw6U5axBJBi2tcZMiCi76jvPxvBpPn3Jy0WYMxmMZOoxPESy42hBCYcbsmCjJCkd8eq1z4kzaM= X-Received: by 2002:ac8:3169:: with SMTP id h38-v6mr6406811qtb.125.1536328653465; Fri, 07 Sep 2018 06:57:33 -0700 (PDT) In-Reply-To: <20180907131508.GK1878@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13208 Archived-At: On Fri, Sep 7, 2018 at 9:15 AM Rich Felker wrote: > I seem to recall Python's testsuite having a test asserting that POSIX > semaphores respond to interrupting signals, so it sounds like the > underlying problem is that Python is implementing some of its > primitives with a non-portable assumption. I'll take a look or see if > someone else from the community wants to. You're correct. I agree that they're in the wrong here. I opened https://bugs.python.org/issue34004 about it a while ago. I'm not sure what the best way is to fix it though. The only way I know of to get rid of the race condition is pselect/ppoll/etc. (all way heavier than futex), something nonportable like signalfd or eventfd, or having another thread to do all the signal handling and wake up all the futexes (and the associated complexity of making sure they never get the two wakeup cases mixed up). Do you have an opinion as to the best solution that could be done on their end? Joseph C. Sible