Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17755171ybl; Thu, 2 Jan 2020 11:24:57 -0800 (PST) X-Google-Smtp-Source: APXvYqztubDtGOj8f+1v2JAAlP0e6sN3aYcXnYzeck/iFE1w1zNz+h1654BsV617UJS9ooi+AjXk X-Received: by 2002:a9d:7c8f:: with SMTP id q15mr81388122otn.140.1577993097898; Thu, 02 Jan 2020 11:24:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577993097; cv=none; d=google.com; s=arc-20160816; b=ZU9ZVlz0y9zknsoMzuRYzDYo5eOiL6bvtpWMvVbSMdLrnjY3b9TFbL52yFZujBV4M6 CQ04ckMvZA7QK5nXx02ce8F56C3jNNm8UMZeDGiAp3jGsFsUMQbYjV2ks+pdB108otsm clLwQjSFBgE9JjWRt/4BZXVudn2KG3zMlN+mM7T19gEFSy5Qozdx/FUoao1OoobbGo2g dtUya3OAsIILUi8ZssHOjl/R3NC82xeaIE+FsxyLOJz8Lo2VZAJxdaHY3qDNEWWwAigu aX24RSS0edSG6mMeDOKVIurNJWkfGwavtrYPBQS9nMZlsoB20kVcgBE2gMoVoyvTGlgz IfVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=79zMLHtVC8xs2RALirflwpQq5tYiUVAhO2rVoiGE7aQ=; b=bp08aEEvOWSzunV9+ZF301zEhTmwM+GHE1fdqzRJoGpNaLdOBhSW1AGAYAyD1gAaI+ nEbFtTi4RJz7OZsO5R9TniCaFDsB8kRwHTSv+9JDDSaBpDntmGGb6pioPd/xUHNAfnHf kzp+o7rGvA3EeX7xrMJjyeTrrVdOpsRcafrxLPDG5EFavgcJE9Pt2HnfZLZTRK1ibSQI dDcaF7casxuNVxawb5koW3gEDqLGhyK5CzekSjZX795Scivhrg84TcPZWRoRLwpcC7xr D1daiQyMlxZC6JrdgsjpmwqDp8ccNop6gxfnRT4eTixIcisq4WX0XJr0JsJuHkIxDmIT vcog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maine.edu header.s=google header.b=Fj90E7Xr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si30472103otd.50.2020.01.02.11.24.45; Thu, 02 Jan 2020 11:24:57 -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=@maine.edu header.s=google header.b=Fj90E7Xr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728243AbgABTWy (ORCPT + 99 others); Thu, 2 Jan 2020 14:22:54 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36309 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbgABTWy (ORCPT ); Thu, 2 Jan 2020 14:22:54 -0500 Received: by mail-qk1-f194.google.com with SMTP id a203so32491027qkc.3 for ; Thu, 02 Jan 2020 11:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maine.edu; s=google; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=79zMLHtVC8xs2RALirflwpQq5tYiUVAhO2rVoiGE7aQ=; b=Fj90E7Xrg7UIIOshQt+/7b8UWs93Fl4Ty9jh3sOXmr3Njz5CMuipkdCaDqdycn4S2V grswIkrOntOtjjUwGZuOJlp2QdJyGMANs2uKmgqrfUGD8CROlm5neqQeV7USsAHio35Q zfoVVJTUX1crQojZHf/r9EyfdpHGY9WPByQ1M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=79zMLHtVC8xs2RALirflwpQq5tYiUVAhO2rVoiGE7aQ=; b=FqTfkEAmTEHq4ZzKsMsIxn43o7ObDTmp5qurpcF1z9PRHU3GWwojKRUrsgRt3dAeyd EEgCwXjywzPHmFPaG2Kxn51aYgplfXs2xNbwm4XkDeo78Fsz+GJFf9qbVPv4wr3XXFqm FP7nqxY1iA/1itdG0FCc5o54cAdx1URve2zQ48DAR9l1TDOWv4EDRnYK7n49MTF8Uvyu 3yrnKw7X+Q1W9hpYSdzPEn1KoKzsm+CtKOP+xxagFldzTRWPLnv+L5q8Pw0KwuUlemAh Wa2jYQdTOv/Rk4oLzdjP506e7CxKYySWxEMOCVnNO2VcQ59KAb5us1b8qt2U7OW841Bo mbFg== X-Gm-Message-State: APjAAAVyF8qW2VGv3DTFVCfehSbn5cy9cSVyykpZS8hoMtFPILRjPACg 5oNPxG3ZYj6hsQn8Px/OUrJIDRS82CY= X-Received: by 2002:a05:620a:166a:: with SMTP id d10mr67568449qko.37.1577992973148; Thu, 02 Jan 2020 11:22:53 -0800 (PST) Received: from macbook-air (weaver.eece.maine.edu. [130.111.218.23]) by smtp.gmail.com with ESMTPSA id r66sm15305288qkd.125.2020.01.02.11.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2020 11:22:50 -0800 (PST) From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 2 Jan 2020 14:22:47 -0500 (EST) X-X-Sender: vince@macbook-air To: linux-kernel@vger.kernel.org cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: Re: [perf] perf_event_open() sometimes returning 0 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jan 2020, Vince Weaver wrote: > so I was tracking down some odd behavior in the perf_fuzzer which turns > out to be because perf_even_open() sometimes returns 0 (indicating a file > descriptor of 0) even though as far as I can tell stdin is still open. error is triggered if aux_sample_size has non-zero value. seems to be this line in kernel/events/core.c: if (perf_need_aux_event(event) && !perf_get_aux_event(event, group_leader)) goto err_locked; (note, err is never set) Vince