Re: [RFC][PATCH 0/3] variuos perf fixes
From: Vince Weaver
Date: Sun Sep 13 2015 - 19:02:12 EST
On Thu, 10 Sep 2015, Peter Zijlstra wrote:
> Vince reported some fail here:
>
> lkml.kernel.org/r/alpine.DEB.2.20.1509021227380.32729@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> These patches are the result of me trying to fix it.
>
> Compile tested only, I'll try them after a sleep..
Sorry for the delay testing, your e-mails continue being sent to SPAM by
gmail for some reason.
I patched up a 4.3-rc1 system with the patches, and pretty much my
*entire* perf_event test suite causes kernel oopses.
This is on an AMD a10 system.
[ 1564.442224] BUG: unable to handle kernel NULL pointer dereference at 00000000000001e8
[ 1564.450151] IP: [<ffffffff810daf91>] SYSC_perf_event_open+0x60f/0x985
[ 1564.456655] PGD 8d691067 PUD 8d705067 PMD 0
[ 1564.461013] Oops: 0000 [#1] SMP
[ 1564.464307] Modules linked in: nfsd auth_rpcgss oid_registry nfs_acl nfs lockd grace fscache sunrpc nls_utf8 nls_cp437 vfat fat snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi kvm_amd kvm ghash_clmulni_intel snd_hda_intel ppdev sha256_generic hmac drbg ansi_cprng snd_hda_codec snd_hda_core tpm_infineon evdev snd_hwdep hp_wmi sparse_keymap aesni_intel aes_x86_64 ablk_helper cryptd lrw gf128mul glue_helper snd_pcm radeon ttm drm_kms_helper drm psmouse serio_raw pcspkr i2c_algo_bit efivars pl2303 fb_sys_fops k10temp snd_timer acpi_cpufreq usbserial parport_pc shpchp i2c_piix4 syscopyarea parport wmi sysfillrect i2c_core snd button processor sysimgblt soundcore tpm_tis tpm sg sr_mod cdrom sd_mod ohci_pci xhci_pci ohci_hcd ehci_pci ahci xhci_hcd ehci_hcd tg3 libahci ptp crc32c_intel pps_core
[ 1564.537217] libphy libata usbcore scsi_mod usb_common
[ 1564.541187] CPU: 3 PID: 2077 Comm: branches Tainted: G W 4.3.0-rc1+ #8
[ 1564.548884] Hardware name: Hewlett-Packard HP Compaq Pro 6305 SFF/1850, BIOS K06 v02.57 08/16/2013
[ 1564.557889] task: ffff88009c7c2140 ti: ffff88008d724000 task.ti: ffff88008d724000
[ 1564.565413] RIP: 0010:[<ffffffff810daf91>] [<ffffffff810daf91>] SYSC_perf_event_open+0x60f/0x985
[ 1564.574360] RSP: 0018:ffff88008d727e78 EFLAGS: 00010287
[ 1564.579701] RAX: ffff880224155400 RBX: ffff8802240e5800 RCX: 0000000000000020
[ 1564.586870] RDX: ffff88022de31cc0 RSI: ffff88022654e060 RDI: ffff88009d1e3918
[ 1564.594037] RBP: 0000000000000000 R08: ffffffff81816d80 R09: 0000000000000000
[ 1564.601204] R10: 0000000000000000 R11: 0000000000000002 R12: ffff88022620bc00
[ 1564.608373] R13: 0000000000000000 R14: 000000002620bc00 R15: ffff88009c7c2140
[ 1564.615542] FS: 00007f5177613700(0000) GS:ffff88022ed80000(0000) knlGS:0000000000000000
[ 1564.623678] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1564.629455] CR2: 00000000000001e8 CR3: 000000008d556000 CR4: 00000000000406e0
[ 1564.636623] Stack:
[ 1564.638647] ffff880200000002 ffff880224155400 0000000000000000 ffffffff81816d80
[ 1564.646150] 0100000000000003 0000000000000000 ffffffff00000000 0000007000000000
[ 1564.653648] 0000000000000004 0000000000000000 0000000000000000 0000000000000000
[ 1564.661157] Call Trace:
[ 1564.663629] [<ffffffff8141c01b>] ? entry_SYSCALL_64_fastpath+0x16/0x6e
[ 1564.670280] Code: 48 89 44 24 08 76 24 44 8b 74 24 08 e9 df 00 00 00 48 8b 74 24 10 48 89 df e8 60 bf ff ff 85 c0 41 89 c6 0f 85 c7 00 00 00 eb b6 <48> 8b 85 e8 01 00 00 45 85 ed 4d 8d 7c 24 10 48 89 04 24 74 1f
[ 1564.690602] RIP [<ffffffff810daf91>] SYSC_perf_event_open+0x60f/0x985
[ 1564.697183] RSP <ffff88008d727e78>
[ 1564.700695] CR2: 00000000000001e8
[ 1564.710184] ---[ end trace 5b268a35cc2e53a3 ]---
addr2line -e ./vmlinux 0xffffffff810daf91
/home/vince/research/linux-kernel/linux.git/kernel/events/core.c:8323
if (IS_ERR(event_file)) {
err = PTR_ERR(event_file);
goto err_context;
}
gctx = group_leader->ctx;
^^^^^ = line 8323
if (move_group)
mutex_lock_double(&gctx->mutex, &ctx->mutex);
else
mutex_lock(&ctx->mutex);
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/