Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1858751ybc; Wed, 13 Nov 2019 05:31:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyN4T5X2usl+KzjArA4cWKNxA8TrQhIJXeWU30EaPVsNdYhrsCOrRgQLUdHChzBXUqQWksu X-Received: by 2002:a17:906:edd2:: with SMTP id sb18mr2787501ejb.112.1573651874594; Wed, 13 Nov 2019 05:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573651874; cv=none; d=google.com; s=arc-20160816; b=mW4mL7Z64TVCZGsyNeReQZhUwW71NfCd6DY1fqDYtACnI/7jYfaG5Qds2uA2at3xrQ 9JSC2ekWhN8Ln2TyFFtZGrHn+soZ1CX/YWSs2fxLkDKuYHVp3RM248tKeylGLHV8kOpM 4b7pp24lBjmzlBwfQZKbxmZm2C8em2zk1BQc52tbVWIhP2RsdQFFvnSi6q2UxJE+IIXn gNahK4NFB3DMkWcdJM83pRw9iGMYMD5sZP+VY2kRTP0/Y9Zx62SS1cFue67Ir9tMwlom p0zwUfhc8v7WuEs8luQzKtrGCakYdczUrhs0GYCuWjfmpFZfG5oIRyXz1hmVLwUw73Ac /2qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GG3NLRv5OfdC4uOJwDiXKD2td6DOel2PDSVVDlug92E=; b=rXf96tIauf70GgIQt+YHi37uEJkkx4nLLGkjHTAykmle4R0DBzhAB2HPpouhnDd4Fx mTWL9FYIWoVe36RL/yUKXh1zT4hFZTZ4apPYGMlgly7FtwxS6PBthPK7cH5RP/i3gjC3 BYxLJhu8RqDbrje7zb0MbWiqR2WpSExN0m5+FiRLItwZQ7Wcv5DIAoaGN5dTifz+Yevf toYm0pcNKyIOvz0qrB/zvrH3yZhdtREPULvC3uoEEcywct3GmtRYRe88ZEu99ssH5QLX V+QPOuhHbEAdxqD4zAMp4jGynqUStSf94rM4uwPOTw0NBDTfRv/c9WZapQZ/Qkv6nxun Zd/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZRGY3pii; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si1084623ejf.231.2019.11.13.05.30.48; Wed, 13 Nov 2019 05:31:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZRGY3pii; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727129AbfKMN3z (ORCPT + 99 others); Wed, 13 Nov 2019 08:29:55 -0500 Received: from mail-oi1-f180.google.com ([209.85.167.180]:37449 "EHLO mail-oi1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbfKMN3z (ORCPT ); Wed, 13 Nov 2019 08:29:55 -0500 Received: by mail-oi1-f180.google.com with SMTP id y194so1762574oie.4 for ; Wed, 13 Nov 2019 05:29:55 -0800 (PST) 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 :cc; bh=GG3NLRv5OfdC4uOJwDiXKD2td6DOel2PDSVVDlug92E=; b=ZRGY3piik7TklMagNEr+qq4ou+cxbVEhizKBBshE3Sd1SN/k+Rsqy2sBY+BVhyj7qE j4PNeAFbgV6oI4vnWNygOotP0vmbRwPodlYwl17EZZKGbBW4TpOXiXLFLjfz+20/OV5x yI2UE903ok7kfWt9+KOunggSENBWZfk2rJA9wSLxqzMOwtZybT3WrJ23Lt/W8dfzFO7r waLebb8awC20ITrvq8Q1P01nl1EZT7BDdUsT3yxUF2ZCIvzXJWhJFr/qQwMNHlCSEPs0 LJkFNS+4kR3p33JLovLQZg6JXnef8DBbVmJ2f3CU3uD9WD5aYah50+DIr9i2NQwfqg8D ixpg== 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:cc; bh=GG3NLRv5OfdC4uOJwDiXKD2td6DOel2PDSVVDlug92E=; b=OkDKP081DQ591ui4ODw7UU150HAs0ck0SqtbvYVE9pPD0ImlNBkI6ANLgNmgef8OEv qi5DVqeq4wSPfRFBX5hsOCQhxPOfXBmdNLUDkB7S7QTSf3q/edmLr3eoEuKLC1Lm3I9H zOaEMNqhWk0b1hk7JI/B1ur0423vS3IeN4ExD94RNE/y58aQD6j1ZcA89725q3WPPalb 7mU/IsEwEECZv6s/77UrM4Ucch1UmbVhsZC3yT0H5mpzDyPmccAL+uAlQBnm6g/OVAW+ w7940xb1Q9XvDs+ZmI5qUvYdd+38vDCiAfrKB381nrjwsPDYmVXWXymxSeHWo14BdQXE hYZw== X-Gm-Message-State: APjAAAUEXpoww0xw8A6reIUGlGebSTEbiCLFL2w2CZf2ph+sIADe5U5U iNmjCff+HjsSDm7UHXKKQfjIMtMNirNr50ZzE2o= X-Received: by 2002:aca:2b15:: with SMTP id i21mr3113491oik.6.1573651794481; Wed, 13 Nov 2019 05:29:54 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Mikael Pettersson Date: Wed, 13 Nov 2019 14:29:44 +0100 Message-ID: Subject: Re: Help requested: futex(..., FUTEX_WAIT_PRIVATE, ...) returns EPERM To: "Harris, Robert" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "peterz@infradead.org" , "dvhart@infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 6:43 PM Harris, Robert wrote: > > I am investigating an issue on 4.9.184 in which futex() returns EPERM > intermittently for > > futex(uaddr, FUTEX_WAIT_PRIVATE, val, &timeout, NULL, 0) > > The failure affects an application in an AWS lambda; traditional > debugging approaches vary from difficult to impossible. I cannot > reproduce the problem at will, instrument the kernel, install a new > kernel or get an application core dump. > > Understanding the circumstances under which EPERM can be returned for > FUTEX_WAIT_PRIVATE would be useful but it is not a documented failure > mode. I have spent some time looking through futex.c but have not > found anything yet. I would be grateful for a hint from someone more > knowledgeable. I just wanted to add that a colleague of mine reported the exact same issue to me two days ago: a highly threaded application (the Erlang VM) running in AWS lambda, futex wait calls occasionally failing with EPERM. I don't have more specifics than that, I've asked for kernel version and the exact parameters in the failed futex call. (Third attempt, really sorry about the noise, gmail's UI sucks.)