From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946AbcHVI3o (ORCPT ); Mon, 22 Aug 2016 04:29:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41774 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753183AbcHVI3h (ORCPT ); Mon, 22 Aug 2016 04:29:37 -0400 Date: Mon, 22 Aug 2016 10:29:32 +0200 From: Jiri Olsa To: Vegard Nossum Cc: Thomas Gleixner , Stephane Eranian , Vince Weaver , Ingo Molnar , David Carrillo-Cisneros , Peter Zijlstra , "H. Peter Anvin" , Kan Liang , Arnaldo Carvalho de Melo , Paul Turner , Linus Torvalds , LKML , Alexander Shishkin , linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/core] perf/core: Check return value of the perf_event_read() IPI Message-ID: <20160822082932.GA13171@krava> References: <1471467307-61171-2-git-send-email-davidcc@google.com> <20160822071737.GF4349@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160822071737.GF4349@krava> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 22 Aug 2016 08:29:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 22, 2016 at 09:17:37AM +0200, Jiri Olsa wrote: > On Sun, Aug 21, 2016 at 02:10:07PM +0200, Vegard Nossum wrote: > > SNIP > > > [] ? __fget+0x47/0x270 > > [] vfs_readv+0x8b/0xc0 > > [] do_readv+0xde/0x230 > > [] ? vfs_readv+0xc0/0xc0 > > [] ? exit_to_usermode_loop+0x190/0x190 > > [] ? check_preemption_disabled+0x37/0x1e0 > > [] SyS_readv+0x27/0x30 > > [] ? do_pwritev+0x1a0/0x1a0 > > [] do_syscall_64+0x1c4/0x4e0 > > [] entry_SYSCALL64_slow_path+0x25/0x25 > > > > I don't think WARN() is the right interface for signalling errors to > > userspace programs? > > any special way to trigger that? nope ;-) perf stat -a -I 10 jirka -- [ 430.168408] ------------[ cut here ]------------ [ 430.173596] WARNING: CPU: 10 PID: 3878 at kernel/events/core.c:3583 perf_event_read+0x1cc/0x1e0 [ 430.183321] Modules linked in: intel_rapl sb_edac edac_core x86_pkg_temp_thermal coretemp iTCO_wdt crct10dif_pclmul iTCO_vendor_support crc32_pclmul ghash_clmulni_intel cdc_ether usbnet mii ioatdma i2c_i801 lpc_ich i2c_smbus wmi xfs libcrc32c mgag200 drm_kms_helper igb ttm ptp pps_core crc32c_intel dca drm i2c_algo_bit megaraid_sas fjes [ 430.217193] CPU: 10 PID: 3878 Comm: perf Not tainted 4.8.0-rc2+ #227 [ 430.224282] Hardware name: IBM System x3650 M4 : -[7915E2G]-/00Y7683, BIOS -[VVE124AUS-1.30]- 11/21/2012 [ 430.234863] 0000000000000286 00000000e92a6a39 ffff880275c7bcd8 ffffffff813ba21e [ 430.243156] 0000000000000000 0000000000000000 ffff880275c7bd18 ffffffff810a16ab [ 430.251446] 00000dff75c7bd78 ffff88047444c000 ffff880275c7bde0 0000000000000003 [ 430.259736] Call Trace: [ 430.262466] [] dump_stack+0x63/0x85 [ 430.268193] [] __warn+0xcb/0xf0 [ 430.273539] [] warn_slowpath_null+0x1d/0x20 [ 430.280048] [] perf_event_read+0x1cc/0x1e0 [ 430.286461] [] perf_event_read_value+0x45/0x130 [ 430.293358] [] perf_read+0x93/0x2c0 [ 430.299093] [] ? file_has_perm+0xa9/0xb0 [ 430.305314] [] __vfs_read+0x37/0x150 [ 430.311137] [] ? security_file_permission+0xa0/0xc0 [ 430.318431] [] vfs_read+0x95/0x140 [ 430.324069] [] SyS_read+0x55/0xc0 [ 430.329610] [] entry_SYSCALL_64_fastpath+0x1a/0xa4 [ 430.336820] ---[ end trace 671c766962c86ad2 ]---