Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754621AbcKQTCP (ORCPT ); Thu, 17 Nov 2016 14:02:15 -0500 Received: from mail-yb0-f195.google.com ([209.85.213.195]:36524 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752658AbcKQTCM (ORCPT ); Thu, 17 Nov 2016 14:02:12 -0500 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 17 Nov 2016 14:02:08 -0500 (EST) X-X-Sender: vince@macbook-air To: Alexander Shishkin cc: Vince Weaver , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: perf: perf_fuzzer WARNING: ring_buffer.c:546 __rb_free_aux In-Reply-To: <87a8d7o06b.fsf@ashishki-desk.ger.corp.intel.com> Message-ID: References: <87a8d7o06b.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4681 Lines: 79 On Thu, 10 Nov 2016, Alexander Shishkin wrote: > Yeah, this really shouldn't be happening. How reproducible is this? Any > clues that may help me reproduce it? I hit this again on the skylake machine, but it takes a while (many days of fuzzing). Also maybe related, it hits this WARN_ONCE in perf_mmap_close() first /* this has to be the last one */ rb_free_aux(rb); WARN_ON_ONCE(atomic_read(&rb->aux_refcount)); [122026.776273] ------------[ cut here ]------------ [122026.785852] WARNING: CPU: 0 PID: 6027 at kernel/events/core.c:5004 perf_mmap_close+0x45c/0x470 [122026.974275] CPU: 0 PID: 6027 Comm: perf_fuzzer Tainted: G L 4.9.0-rc5+ #11 [122026.989250] Hardware name: LENOVO 10FY0017US/SKYBAY, BIOS FWKT53A 06/06/2016 [122027.002786] ffff8801e8117d50 ffffffffa9ebe748 0000000000000000 0000000000000000 [122027.017321] ffff8801e8117d98 ffffffffa9ab6ee7 ffff8801f134e040 0000138ce8117de8 [122027.031891] ffff8801dd805200 ffff8801ebe62580 ffff8801eec68610 ffff8801ebe62808 [122027.046386] Call Trace: [122027.051269] [] dump_stack+0x63/0x8b [122027.061116] [] __warn+0x117/0x140 [122027.070598] [] warn_slowpath_null+0x1d/0x20 [122027.081720] [] perf_mmap_close+0x45c/0x470 [122027.092646] [] ? perf_iterate_ctx+0x280/0x280 [122027.307118] [] remove_vma+0x54/0xc0 [122027.516151] [] do_munmap+0x367/0x650 [122027.722320] [] SyS_munmap+0x5f/0x80 [122027.929219] [] ? vm_munmap+0x70/0x70 [122028.136622] [] do_syscall_64+0xe0/0x270 [122028.345615] [] entry_SYSCALL64_slow_path+0x25/0x25 [122028.558691] ---[ end trace 806838d55bf2c098 ]--- followed a while later by [150064.587195] ------------[ cut here ]------------ [150064.594626] WARNING: CPU: 0 PID: 0 at kernel/events/ring_buffer.c:546 __rb_free_aux+0x1cb/0x1d0 [150064.709271] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W L 4.9.0-rc5+ #11 [150064.719631] Hardware name: LENOVO 10FY0017US/SKYBAY, BIOS FWKT53A 06/06/2016 [150064.729680] ffff8801f5a07ce0 ffffffffa9ebe748 0000000000000000 0000000000000000 [150064.740027] ffff8801f5a07d28 ffffffffa9ab6ee7 ffffffffaa812540 00000222de0dca00 [150064.750380] ffff8801e50ed340 ffff8801f5a14740 ffff8801e50ed340 0000000000000000 [150064.760683] Call Trace: [150064.765834] [150064.767909] [] dump_stack+0x63/0x8b [150064.775798] [] __warn+0x117/0x140 [150064.783473] [] warn_slowpath_null+0x1d/0x20 [150064.792064] [] __rb_free_aux+0x1cb/0x1d0 [150064.800362] [] rb_free_aux+0x18/0x20 [150064.808266] [] perf_aux_output_end+0x19a/0x220 [150064.817015] [] bts_event_stop+0x104/0x1d0 [150064.825268] [] bts_event_del+0x13/0x20 [150064.833160] [] event_sched_out.isra.91+0x1c4/0x5d0 [150064.842060] [] ? x86_pmu_disable+0x6c/0x80 [150064.850208] [] group_sched_out+0x6e/0x110 [150064.858221] [] __perf_event_disable+0x140/0x1b0 [150064.866696] [] event_function+0x10f/0x1e0 [150064.874605] [] ? group_sched_out+0x110/0x110 [150064.882767] [] ? cpu_clock_event_read+0x10/0x10 [150064.891144] [] ? perf_cgroup_attach+0x70/0x70 [150064.899332] [] remote_function+0x76/0xa0 [150064.907068] [] flush_smp_call_function_queue+0xb3/0x1d0 [150064.916149] [] generic_smp_call_function_single_interrupt+0x13/0x60 [150064.926282] [] smp_call_function_single_interrupt+0x40/0x50 [150064.935716] [] call_function_single_interrupt+0x82/0x90 [150064.944835] [150064.946918] [] ? sched_idle_set_state+0x2a/0x40 [150064.955373] [] ? cpuidle_enter_state+0x158/0x320 [150064.963900] [] cpuidle_enter+0x17/0x20 [150064.971550] [] call_cpuidle+0x4d/0x80 [150064.979131] [] cpu_startup_entry+0x1b7/0x290 [150064.987287] [] rest_init+0x87/0x90 [150064.994610] [] start_kernel+0x59c/0x5bf [150065.002351] [] ? early_idt_handler_array+0x120/0x120 [150065.011260] [] x86_64_start_reservations+0x24/0x26 [150065.019993] [] x86_64_start_kernel+0x14c/0x16f [150065.028338] ---[ end trace 806838d55bf2c099 ]---