WARNING: CPU: 5 PID: 26043 at kernel/events/core.c:4893 perf_mmap_close+0x389/0x390

Found by

perf_fuzzer

First Seen

4.8-rc1

Most recently Seen

4.9-rc5

Reproducible

???

Type

warning

Found On

Haswell, Skylake

Linux-kernel Mailing List Report

17 November 2016 -- perf: perf_fuzzer WARNING: ring_buffer.c:546 __rb_free_aux

Kernel Splat

  1.                 /* this has to be the last one */
                    rb_free_aux(rb);
                    WARN_ON_ONCE(atomic_read(&rb->aux_refcount));
    
    *** perf_fuzzer 0.32-rc0 *** by Vince Weaver
    
            Linux version 4.9.0-rc5+ x86_64
            Processor: Intel 6/94/3
    
            Stopping after 30000
            Watchdog enabled with timeout 60s
            Will auto-exit if signal storm detected
            Seeding RNG from time 1479359036
    
            To reproduce, try:
                    echo 1 > /proc/sys/kernel/nmi_watchdog
                    echo 0 > /proc/sys/kernel/perf_event_paranoid
                    echo 250 > /proc/sys/kernel/perf_event_max_sample_rate
                    ./perf_fuzzer -s 30000 -r 1479359036
    
            Fuzzing the following syscalls: mmap perf_event_open close read write ioctl fork prctl poll 
            Also attempting the following: signal-handler-on-overflow busy-instruction-loop accessing-perf-proc-and-sys-files trashing-the-mmap-page 
    
            Pid=6027, sleeping 1s
    ==================================================
    Starting fuzzing at 2016-11-17 00:03:57
    ==================================================
    Cannot open /sys/kernel/tracing/kprobe_events
    Signal from invalid fd 10 Bad file descriptor
    Iteration 10000 (1666.666667 ops/s)
            Open attempts: 105211  Successful: 890  Currently open: 43
                    EPERM : 6
                    ENOENT : 563
                    E2BIG : 9234
                    EBADF : 8939
                    EBUSY : 10
                    EINVAL : 85480
                    EOPNOTSUPP : 89
                    Trinity Type (Normal 293/26229)(Sampling 35/26272)(Global 517/26621)(Random 45/26089)
                    Type (Hardware 209/14677)(software 323/14352)(tracepoint 71/14078)(Cache 50/13266)(cpu 192/13909)(breakpoint 18/13941)(intel_bts 10/808)(intel_pt 2/846)(msr 5/950)(power 0/880)(uncore_imc 0/832)(uncore_cbox_0 4/799)(uncore_cbox_1 3/804)(uncore_cbox_2 0/849)(uncore_cbox_3 1/808)(uncore_arb 1/819)(cstate_core 0/947)(cstate_pkg 1/827)(#18 0/4)(>19 0/10815)
            Close:  847/847 Successful
            Read:   788/879 Successful
            Write:  0/952 Successful
            Ioctl:  334/863 Successful: (ENABLE 76/76)(DISABLE 77/77)(REFRESH 7/71)(RESET 68/68)(PERIOD 5/83)(SET_OUTPUT 5/81)(SET_FILTER 1/65)(ID 89/89)(SET_BPF 0/86)(PAUSE_OUTPUT 6/91)(#10 0/0)(#11 0/0)(#12 0/0)(#13 0/0)(#14 0/0)(>14 0/76)
            Mmap:   411/1041 Successful: (MMAP 411/1041)(TRASH 93/157)(READ 86/108)(UNMAP 407/931)(AUX 0/92)(AUX_READ 0/0)
            Prctl:  905/905 Successful
            Fork:   435/435 Successful
            Poll:   898/912 Successful
            Access: 98/895 Successful
            Overflows: 19  Recursive: 0
            SIGIOs due to RT signal queue full: 0
    Iteration 20000 (2000.000000 ops/s)
            Open attempts: 102054  Successful: 905  Currently open: 5
                    EPERM : 14
                    ENOENT : 585
                    E2BIG : 9037
                    EBADF : 8402
                    EBUSY : 13
                    EINVAL : 82980
                    EOVERFLOW : 2
                    EOPNOTSUPP : 116
                    Trinity Type (Normal 311/25473)(Sampling 29/25388)(Global 529/25699)(Random 36/25494)
                    Type (Hardware 191/14140)(software 329/13984)(tracepoint 59/13699)(Cache 61/12743)(cpu 212/13708)(breakpoint 21/13644)(intel_bts 20/873)(intel_pt 1/791)(msr 4/878)(power 1/777)(uncore_imc 0/770)(uncore_cbox_0 0/802)(uncore_cbox_1 1/781)(uncore_cbox_2 1/801)(uncore_cbox_3 0/762)(uncore_arb 0/754)(cstate_core 1/874)(cstate_pkg 3/823)(#18 0/11)(>19 0/10439)
            Close:  943/943 Successful
            Read:   854/926 Successful
            Write:  0/855 Successful
            Ioctl:  323/892 Successful: (ENABLE 60/60)(DISABLE 92/92)(REFRESH 5/89)(RESET 67/67)(PERIOD 3/77)(SET_OUTPUT 5/79)(SET_FILTER 0/81)(ID 84/84)(SET_BPF 0/67)(PAUSE_OUTPUT 7/106)(#10 0/0)(#11 0/0)(#12 0/0)(#13 0/0)(#14 0/0)(>14 0/90)
            Mmap:   439/1064 Successful: (MMAP 439/1064)(TRASH 100/164)(READ 86/106)(UNMAP 440/1045)(AUX 0/109)(AUX_READ 0/0)
            Prctl:  858/858 Successful
            Fork:   457/457 Successful
            Poll:   931/952 Successful
            Access: 101/902 Successful
            Overflows: 19  Recursive: 0
            SIGIOs due to RT signal queue full: 0
    [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 ]---
    
  2. WARNING: CPU: 5 PID: 26043 at kernel/events/core.c:4893 perf_mmap_close+0x389/0x390
    [ 1102.269074] Modules linked in: binfmt_misc intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel snd_hda_codec_hdmi aes_x86_64 lrw gf128mul glue_helper snd_hda_codec_realtek snd_hda_codec_generic ablk_helper ppdev iTCO_wdt snd_hda_intel snd_hda_codec snd_hda_core cryptd evdev iTCO_vendor_support snd_hwdep snd_pcm snd_timer snd i915 drm_kms_helper parport_pc wmi parport psmouse tpm_tis tpm_tis_core pcspkr serio_raw sg button i2c_i801 soundcore lpc_ich drm mei_me mfd_core i2c_smbus tpm mei video battery i2c_algo_bit sr_mod sd_mod cdrom ahci libahci xhci_pci libata ehci_pci xhci_hcd ehci_hcd e1000e usbcore ptp crc32c_intel scsi_mod pps_core usb_common fan thermal
    [ 1102.367852] CPU: 5 PID: 26043 Comm: perf_fuzzer Not tainted 4.8.0-rc1+ #187
    [ 1102.377206] Hardware name: LENOVO 10AM000AUS/SHARKBAY, BIOS FBKT72AUS 01/26/2014
    [ 1102.387192]  0000000000000000 ffff880117b2bdd8 ffffffff81437641 0000000000000000
    [ 1102.397466]  0000000000000000 ffff880117b2be18 ffffffff81076bab 0000131d00000282
    [ 1102.407748]  ffff880118211c00 ffff8801173502d8 ffff880117350000 ffff880117d20458
    [ 1102.418074] Call Trace:
    [ 1102.421424]  [] dump_stack+0x63/0x82
    [ 1102.428393]  [] __warn+0xcb/0xf0
    [ 1102.434873]  [] warn_slowpath_null+0x1d/0x20
    [ 1102.442797]  [] perf_mmap_close+0x389/0x390
    [ 1102.450557]  [] ? perf_mmap_close+0x225/0x390
    [ 1102.458569]  [] ? perf_iterate_ctx+0x160/0x160
    [ 1102.466720]  [] remove_vma+0x32/0x70
    [ 1102.473658]  [] do_munmap+0x2b8/0x460
    [ 1102.480721]  [] SyS_munmap+0x53/0x70
    [ 1102.487663]  [] entry_SYSCALL_64_fastpath+0x1e/0xad
    [ 1102.496649] ---[ end trace 7ff7a520eaea4ee0 ]---
    

Back to perf_fuzzer bugs found