Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552920 - >=sys-kernel/gentoo-sources-4.1.0 panics intermittently if BT mouse is connected via intel 7260 Wifi/BT combo
Summary: >=sys-kernel/gentoo-sources-4.1.0 panics intermittently if BT mouse is connec...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-23 09:57 UTC by Anton Gubarkov
Modified: 2018-01-12 13:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bisect log (552920.log,2.55 KB, text/x-log)
2015-07-08 13:25 UTC, Anton Gubarkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Gubarkov 2015-06-23 09:57:37 UTC
when my BT mouse wnt standby, I got the following oops:

Jun 23 12:27:33 r9-008cln kernel: BUG: unable to handle kernel NULL pointer dereference at           (null)
Jun 23 12:27:33 r9-008cln kernel: IP: [<ffffffff817613be>] hidinput_disconnect+0x2e/0xd0
Jun 23 12:27:33 r9-008cln kernel: PGD 0 
Jun 23 12:27:33 r9-008cln kernel: Oops: 0000 [#1] PREEMPT SMP 
Jun 23 12:27:33 r9-008cln kernel: Modules linked in: rndis_host cdc_ether usbnet mii acpi_call(O) ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat snd_hda_co
Jun 23 12:27:33 r9-008cln kernel: CPU: 2 PID: 22431 Comm: kworker/u17:1 Tainted: P           O    4.1.0-gentoo #4
Jun 23 12:27:33 r9-008cln kernel: Hardware name: LENOVO 20BEA008RT/20BEA008RT, BIOS GMET70WW (2.18 ) 03/05/2015
Jun 23 12:27:33 r9-008cln kernel: Workqueue: hci0 hci_rx_work
Jun 23 12:27:33 r9-008cln kernel: task: ffff8802d630be20 ti: ffff8802d54e4000 task.ti: ffff8802d54e4000
Jun 23 12:27:33 r9-008cln kernel: RIP: 0010:[<ffffffff817613be>]  [<ffffffff817613be>] hidinput_disconnect+0x2e/0xd0
Jun 23 12:27:33 r9-008cln kernel: RSP: 0018:ffff8802d54e7a28  EFLAGS: 00010292
Jun 23 12:27:33 r9-008cln kernel: RAX: 0000000000000000 RBX: ffff8803d7d54000 RCX: 0000000180800073
Jun 23 12:27:33 r9-008cln kernel: RDX: 0000000180800074 RSI: 0000000000000001 RDI: ffff88042d803c00
Jun 23 12:27:33 r9-008cln kernel: RBP: ffff8802d54e7a48 R08: 0000000000000000 R09: ffffea0010a7d740
Jun 23 12:27:33 r9-008cln kernel: R10: ffffffff81420000 R11: 0000000000000000 R12: ffff8803d7d558e8
Jun 23 12:27:33 r9-008cln kernel: R13: ffff8803d7d54000 R14: ffff8803d7d54000 R15: ffff8803d7d558d0
Jun 23 12:27:33 r9-008cln kernel: FS:  0000000000000000(0000) GS:ffff88043e280000(0000) knlGS:0000000000000000
Jun 23 12:27:33 r9-008cln kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 23 12:27:33 r9-008cln kernel: CR2: 0000000000000000 CR3: 0000000002cf7000 CR4: 00000000001407e0
Jun 23 12:27:33 r9-008cln kernel: Stack:
Jun 23 12:27:33 r9-008cln kernel:  ffff8803d7d54000 ffff8803d7d558e8 ffff8803d7d54000 ffff8803d7d558b8
Jun 23 12:27:33 r9-008cln kernel:  ffff8802d54e7a68 ffffffff8175e270 00000000fffffffc ffff8803d7d558e8
Jun 23 12:27:33 r9-008cln kernel:  ffff8802d54e7aa8 ffffffff8175e445 ffff8802d54e7aa8 ffff8803d7d558e8
Jun 23 12:27:33 r9-008cln kernel: Call Trace:
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e270>] hid_disconnect+0x80/0x90
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e445>] hid_device_remove+0xc5/0xe0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622de7>] __device_release_driver+0x87/0x120
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622ea3>] device_release_driver+0x23/0x30
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622748>] bus_remove_device+0x108/0x180
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8161ec71>] device_del+0x141/0x270
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e4e7>] hid_destroy_device+0x27/0x60
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8192e9a2>] hidp_session_remove+0x52/0xc0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8190a776>] l2cap_conn_del+0xb6/0x220
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8190a91e>] l2cap_disconn_cfm+0x3e/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818e6f29>] hci_disconn_complete_evt.isra.58+0x189/0x2c0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818ee420>] hci_event_packet+0x1590/0x3630
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff810947f8>] ? cpuacct_charge+0x58/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e4cea>] ? _raw_spin_unlock_irqrestore+0x2a/0x60
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818dbc98>] hci_rx_work+0x1c8/0x400
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106f9b7>] process_one_work+0x147/0x410
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106fceb>] worker_thread+0x6b/0x4a0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106fc80>] ? process_one_work+0x410/0x410
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8107574b>] kthread+0xdb/0x100
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81070000>] ? worker_thread+0x380/0x4a0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81075670>] ? kthread_create_on_node+0x180/0x180
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e5882>] ret_from_fork+0x42/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81075670>] ? kthread_create_on_node+0x180/0x180
Jun 23 12:27:33 r9-008cln kernel: Code: 00 00 55 48 89 e5 41 56 49 89 fe 41 55 41 54 53 48 8b bf 88 1b 00 00 48 85 ff 74 31 e8 bc d7 fb ff 49 8b 86 88 1b 00 0

Jun 23 12:27:33 r9-008cln kernel: RIP  [<ffffffff817613be>] hidinput_disconnect+0x2e/0xd0
Jun 23 12:27:33 r9-008cln kernel:  RSP <ffff8802d54e7a28>
Jun 23 12:27:33 r9-008cln kernel: CR2: 0000000000000000
Jun 23 12:27:33 r9-008cln kernel: ---[ end trace 538104341aa92af7 ]---
Jun 23 12:27:33 r9-008cln kernel: BUG: unable to handle kernel paging request at ffffffffffffffd8
Jun 23 12:27:33 r9-008cln kernel: IP: [<ffffffff81075dc1>] kthread_data+0x11/0x20
Jun 23 12:27:33 r9-008cln kernel: PGD 2cf8067 PUD 2cfa067 PMD 0 
Jun 23 12:27:33 r9-008cln kernel: Oops: 0000 [#2] PREEMPT SMP 
Jun 23 12:27:33 r9-008cln kernel: Modules linked in: rndis_host cdc_ether usbnet mii acpi_call(O) ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat snd_hda_co
Jun 23 12:27:33 r9-008cln kernel: CPU: 6 PID: 22431 Comm: kworker/u17:1 Tainted: P      D    O    4.1.0-gentoo #4
Jun 23 12:27:33 r9-008cln kernel: Hardware name: LENOVO 20BEA008RT/20BEA008RT, BIOS GMET70WW (2.18 ) 03/05/2015
Jun 23 12:27:33 r9-008cln kernel: task: ffff8802d630be20 ti: ffff8802d54e4000 task.ti: ffff8802d54e4000
Jun 23 12:27:33 r9-008cln kernel: RIP: 0010:[<ffffffff81075dc1>]  [<ffffffff81075dc1>] kthread_data+0x11/0x20
Jun 23 12:27:33 r9-008cln kernel: RSP: 0018:ffff8802d54e76d0  EFLAGS: 00210096
Jun 23 12:27:33 r9-008cln kernel: RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000000002
Jun 23 12:27:33 r9-008cln kernel: RDX: 0000000000000001 RSI: 0000000000000006 RDI: ffff8802d630be20
Jun 23 12:27:33 r9-008cln kernel: RBP: ffff8802d54e76e8 R08: ffffffffffffffff R09: 0000000000000000
Jun 23 12:27:33 r9-008cln kernel: R10: 0000000000000176 R11: ffffea0010736800 R12: 0000000000016080
Jun 23 12:27:33 r9-008cln kernel: R13: ffff8802d630be20 R14: 0000000000000006 R15: 0000000000000000
Jun 23 12:27:33 r9-008cln kernel: FS:  0000000000000000(0000) GS:ffff88043e380000(0000) knlGS:0000000000000000
Jun 23 12:27:33 r9-008cln kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 23 12:27:33 r9-008cln kernel: CR2: 0000000000000028 CR3: 0000000002cf7000 CR4: 00000000001407e0
Jun 23 12:27:33 r9-008cln kernel: Stack:
Jun 23 12:27:33 r9-008cln kernel:  ffffffff81070955 ffff8802d54e76e8 ffff88043e396080 ffff8802d54e7748
Jun 23 12:27:33 r9-008cln kernel:  ffffffff819e143c ffff8802d54e7768 ffff8802d630be20 0000000000000000
Jun 23 12:27:33 r9-008cln kernel:  00000000ffffffff ffff8802d630c4b0 ffff8802d54e8000 ffff8802d630c4b0
Jun 23 12:27:33 r9-008cln kernel: Call Trace:
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81070955>] ? wq_worker_sleeping+0x15/0xa0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e143c>] __schedule+0x58c/0xa30
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e1917>] schedule+0x37/0x90
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8105a7e6>] do_exit+0x796/0xae0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff810068cd>] oops_end+0x8d/0xd0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81048aaf>] no_context+0x14f/0x3a0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81048e0d>] __bad_area_nosemaphore+0x10d/0x230
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81048f43>] bad_area_nosemaphore+0x13/0x20
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff810491fe>] __do_page_fault+0xae/0x4c0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8161e25e>] ? device_release+0x3e/0xb0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81420000>] ? kobject_release+0x40/0x1c0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8104961c>] do_page_fault+0xc/0x10
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e70d2>] page_fault+0x22/0x30
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81420000>] ? kobject_release+0x40/0x1c0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff817613be>] ? hidinput_disconnect+0x2e/0xd0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff817613b4>] ? hidinput_disconnect+0x24/0xd0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e270>] hid_disconnect+0x80/0x90
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e445>] hid_device_remove+0xc5/0xe0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622de7>] __device_release_driver+0x87/0x120
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622ea3>] device_release_driver+0x23/0x30
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81622748>] bus_remove_device+0x108/0x180
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8161ec71>] device_del+0x141/0x270
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8175e4e7>] hid_destroy_device+0x27/0x60
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8192e9a2>] hidp_session_remove+0x52/0xc0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8190a776>] l2cap_conn_del+0xb6/0x220
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8190a91e>] l2cap_disconn_cfm+0x3e/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818e6f29>] hci_disconn_complete_evt.isra.58+0x189/0x2c0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818ee420>] hci_event_packet+0x1590/0x3630
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff810947f8>] ? cpuacct_charge+0x58/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e4cea>] ? _raw_spin_unlock_irqrestore+0x2a/0x60
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff818dbc98>] hci_rx_work+0x1c8/0x400
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106f9b7>] process_one_work+0x147/0x410
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106fceb>] worker_thread+0x6b/0x4a0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8106fc80>] ? process_one_work+0x410/0x410
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff8107574b>] kthread+0xdb/0x100
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81070101>] ? worker_thread+0x481/0x4a0
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81075670>] ? kthread_create_on_node+0x180/0x180
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff819e5882>] ret_from_fork+0x42/0x70
Jun 23 12:27:33 r9-008cln kernel:  [<ffffffff81075670>] ? kthread_create_on_node+0x180/0x180
Jun 23 12:27:33 r9-008cln kernel: Code: 48 89 e5 5d 48 8b 40 c8 48 c1 e8 02 83 e0 01 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 87 28 04 00 00 55 4
Jun 23 12:27:33 r9-008cln kernel: RIP  [<ffffffff81075dc1>] kthread_data+0x11/0x20
Comment 1 Cănărău Constantin 2015-06-24 05:19:29 UTC
I can confirm this behaviour. I'm using Logitech MX 5500 combo. When bloototh receiver is removed kernel boot just fine.
Only exception is that I got this kernel panic at boot.
Comment 2 Anton Gubarkov 2015-06-25 09:48:15 UTC
Actually, I continue to experience 1-2 panics per day. I've set up pstore and capture every panic. The BUG:  part can be general protection fault or unable to handle kernel paging request.

These panics started at version 4.1.0. I haven't seen anything like this before. Please let me know if you are intersted to see all these data here, or I should raise new bugs for every case
Comment 3 Mike Pagano gentoo-dev 2015-06-25 13:17:04 UTC
Can someone do a bisect between the last working kernel and 4.1.0, please?
Comment 4 Anton Gubarkov 2015-06-28 11:40:02 UTC
It would be a bisect between 4.0.6 and 4.1.0. Feasible? The problem is intermittent, so it usually takes a day to hit this bug - i.e. bad is relatively easy. Good would be 1 week update for me. So expect a long time until the culprit is found.
Comment 5 Anton Gubarkov 2015-06-28 11:42:46 UTC
It would be a bisect between 4.0.6 and 4.1.0. Feasible? The problem is intermittent, so it usually takes a day to hit this bug - i.e. bad is relatively easy. Good would be 1 week uptime for me. So expect a long time until the culprit is found.
Comment 6 Anton Gubarkov 2015-07-03 14:58:33 UTC
I'm bisecting between 4.0.6 and 4.1.0

I use nvidia-drivers and virtualbox on daily basis. I can't build neither nvidia-drivers nor vitualbox-modules against a bisected kernel. 

I can exclude nvidia-drivers from my bisect ok, since I experience kernel oopses even without them in 4.1.0, but I don't want to exclude virtualbox-modules.

They don't build due to 
Pci-linux.c:890:22: error: ‘IRQF_DISABLED’ undeclared (first use in this function)
                      IRQF_DISABLED, /* keep irqs disabled when calling the acti
     
it's a part of a conditional compile, that should be disabled for kernel versions above 4.1.0. It seems that the kernel version in the git repo I'm bisecting is still @ 4.0.0.

Can I do something about it?
Comment 7 Anton Gubarkov 2015-07-03 17:15:43 UTC
It seems that it's a VirtualBox issue: https://www.virtualbox.org/ticket/13961
Just added nosmap to my boot cmd line. Will report back soon.
Comment 8 Anton Gubarkov 2015-07-04 04:42:39 UTC
nosmap didn't help. I had an oops this night.
I removed vbox modules and testing 4.1.1-r1 w/o them.
Comment 9 Anton Gubarkov 2015-07-04 12:24:04 UTC
I had another panic. this time with invalid opcode. There were no vbox modules loaded. I continue bisecting.

<2>[10761.087650] kernel BUG at mm/slub.c:3413!
<4>[10761.087701] invalid opcode: 0000 [#1] PREEMPT SMP 
<4>[10761.087753] Modules linked in: vfat fat ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l
2_common videodev snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic rtsx_pci_sdmmc mmc_core nvidia(PO) btusb btbcm btintel iwlmvm intel_rapl iosf
_mbi x86_pkg_temp_thermal snd_hda_intel snd_hda_controller snd_hda_codec e1000e snd_hwdep iwlwifi rtsx_pci snd_hda_core ptp snd_pcm snd_timer snd soundcore pp
s_core
<4>[10761.088280] CPU: 4 PID: 5598 Comm: kworker/u17:0 Tainted: P           O    4.1.1-gentoo-r1 #2
<4>[10761.088428] Hardware name: LENOVO 20BEA008RT/20BEA008RT, BIOS GMET70WW (2.18 ) 03/05/2015
<4>[10761.088578] Workqueue: hci0 hci_rx_work
<4>[10761.088652] task: ffff880379e24700 ti: ffff8801354a8000 task.ti: ffff8801354a8000
Oops#1 Part2
<4>[10761.088788] RIP: 0010:[<ffffffff811904db>]  [<ffffffff811904db>] kfree+0x17b/0x180
<4>[10761.088928] RSP: 0018:ffff8801354ab978  EFLAGS: 00010246
<4>[10761.089022] RAX: 0200000000000000 RBX: ffff8802472c5800 RCX: 0000000000000282
<4>[10761.089161] RDX: 000077ff80000000 RSI: ffffffff81622971 RDI: ffff8802472c5800
<4>[10761.089302] RBP: ffff8801354ab998 R08: 0000000000000000 R09: ffffea00091cb140
<4>[10761.089440] R10: ffffffff81420700 R11: 0000000000000000 R12: ffff8802472c5800
<4>[10761.089569] R13: ffffffff81619962 R14: ffff8802472c5810 R15: ffff8800b74558d0
<4>[10761.089700] FS:  0000000000000000(0000) GS:ffff88043e300000(0000) knlGS:0000000000000000
<4>[10761.089847] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4>[10761.089951] CR2: 00007ffcf4b6cfe0 CR3: 0000000002cf4000 CR4: 00000000001407e0
<4>[10761.090079] Stack:
<4>[10761.090117]  ffff8802472c5800 ffff8802472c5800 ffff8802472c5800 ffff8802477ee3c0
<4>[10761.090282]  ffff8801354ab9b8 ffffffff81619962 ffff8801354ab9c8 ffff8802472c5810
<4>[10761.090458]  ffff8801354ab9e8 ffffffff81619796 ffff8801354ab9e8 ffff8802472c5848
<4>[10761.090625] Call Trace:
<4>[10761.090676]  [<ffffffff81619962>] device_create_release+0x22/0x70
<4>[10761.090790]  [<ffffffff81619796>] device_release+0x36/0xb0
<4>[10761.090895]  [<ffffffff814207aa>] kobject_release+0x7a/0x1c0
<4>[10761.091018]  [<ffffffff81420925>] kobject_put+0x35/0x70
<4>[10761.091122]  [<ffffffff8161a310>] device_unregister+0x30/0x80
<4>[10761.091227]  [<ffffffff8161a3dc>] device_destroy+0x3c/0x50
<4>[10761.091328]  [<ffffffff81763386>] hidraw_disconnect+0x46/0xa0
<4>[10761.091432]  [<ffffffff8175a44e>] hid_disconnect+0x4e/0x90
<4>[10761.091533]  [<ffffffff8175a655>] hid_device_remove+0xc5/0xe0
<4>[10761.091638]  [<ffffffff8161e327>] __device_release_driver+0x87/0x120
<4>[10761.091754]  [<ffffffff8161e3e3>] device_release_driver+0x23/0x30
<4>[10761.091862]  [<ffffffff8161dc88>] bus_remove_device+0x108/0x180
<4>[10761.091975]  [<ffffffff8161a1b1>] device_del+0x141/0x270
<4>[10761.092078]  [<ffffffff8175a6f7>] hid_destroy_device+0x27/0x60
<4>[10761.092190]  [<ffffffff8192ce22>] hidp_session_remove+0x52/0xc0
<4>[10761.092304]  [<ffffffff81908b46>] l2cap_conn_del+0xb6/0x220
<4>[10761.092409]  [<ffffffff81908cee>] l2cap_disconn_cfm+0x3e/0x70
<4>[10761.092520]  [<ffffffff818ec549>] hci_event_packet+0x1749/0x3610
<4>[10761.092631]  [<ffffffff810950d8>] ? cpuacct_charge+0x58/0x70
<4>[10761.092732]  [<ffffffff819e55fa>] ? _raw_spin_unlock_irqrestore+0x2a/0x60
<4>[10761.092840]  [<ffffffff818d9a08>] hci_rx_work+0x1c8/0x400
<4>[10761.092938]  [<ffffffff810702b4>] process_one_work+0x144/0x410
<4>[10761.093043]  [<ffffffff810705cb>] worker_thread+0x4b/0x480
<4>[10761.093142]  [<ffffffff81070580>] ? process_one_work+0x410/0x410
<4>[10761.093249]  [<ffffffff81070580>] ? process_one_work+0x410/0x410
<4>[10761.096247]  [<ffffffff81076019>] kthread+0xc9/0xe0
<4>[10761.098501]  [<ffffffff81080000>] ? wake_up_if_idle+0x50/0x110
<4>[10761.100689]  [<ffffffff81075f50>] ? kthread_create_on_node+0x180/0x180
<4>[10761.102830]  [<ffffffff819e61c2>] ret_from_fork+0x42/0x70
<4>[10761.104838]  [<ffffffff81075f50>] ? kthread_create_on_node+0x180/0x180
<4>[10761.106775] Code: 40 74 04 41 8b 71 68 4c 89 cf e8 61 49 fb ff e9 5c ff ff ff 0f 1f 40 00 4c 89 d1 48 89 da 4c 89 ce e8 5a f6 ff ff e9 45 ff ff ff <0f> 0b 0f 1f 00 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 
<1>[10761.110841] RIP  [<ffffffff811904db>] kfree+0x17b/0x180
<4>[10761.112756]  RSP <ffff8801354ab978>
Comment 10 Anton Gubarkov 2015-07-08 13:25:46 UTC
Created attachment 406366 [details]
bisect log

I've completed the bisect. The log is attached.
Comment 11 Anton Gubarkov 2015-07-09 18:51:17 UTC
r9-008cln linux # git bisect log
git bisect start
# good: [a0ce889438e8204b87d1f30f941646636e26837e] Linux 4.0.6
git bisect good a0ce889438e8204b87d1f30f941646636e26837e
# good: [a0ce889438e8204b87d1f30f941646636e26837e] Linux 4.0.6
git bisect good a0ce889438e8204b87d1f30f941646636e26837e
# bad: [b953c0d234bc72e8489d3bf51a276c5c4ec85345] Linux 4.1
git bisect bad b953c0d234bc72e8489d3bf51a276c5c4ec85345
# good: [39a8804455fb23f09157341d3ba7db6d7ae6ee76] Linux 4.0
git bisect good 39a8804455fb23f09157341d3ba7db6d7ae6ee76
# good: [d0a3997c0c3f9351e24029349dee65dd1d9e8d84] Merge tag 'sound-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
git bisect good d0a3997c0c3f9351e24029349dee65dd1d9e8d84
# good: [cf82f52d3619d2e15c83ec9a03c6ce8cdf6c6b58] watchdog: stmp3xxx_rtc_wdt: fix broken email address
git bisect good cf82f52d3619d2e15c83ec9a03c6ce8cdf6c6b58
# bad: [f583381f506dc53b9d3e98cf9d6577323eb3fcd2] Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
git bisect bad f583381f506dc53b9d3e98cf9d6577323eb3fcd2
# good: [1204c464458e9837320a326a9fce550e3c5ef5de] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
git bisect good 1204c464458e9837320a326a9fce550e3c5ef5de
# good: [d56a669ca59c37ed0a7282a251b2f2f22533343a] Merge tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
git bisect good d56a669ca59c37ed0a7282a251b2f2f22533343a
# bad: [c6668726d2c2c581e6c417448c472c994d026f5f] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
git bisect bad c6668726d2c2c581e6c417448c472c994d026f5f
# bad: [d6a4c0e5d3d433ef296f8f417e835329a834a256] Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
git bisect bad d6a4c0e5d3d433ef296f8f417e835329a834a256
# good: [cdde0e61cf2d41123604c6c9d8f09ef5c23464ee] dmaengine: dw: don't prompt for DW_DMAC_CORE
git bisect good cdde0e61cf2d41123604c6c9d8f09ef5c23464ee
# good: [09dd1af2e011a13adce65b74425dfe31e1985e64] md/cluster: Communication Framework: fix semicolon.cocci warnings
git bisect good 09dd1af2e011a13adce65b74425dfe31e1985e64
# good: [7a87f43405e91ca12b8770eb689dd9886f217091] raid5: track overwrite disk count
git bisect good 7a87f43405e91ca12b8770eb689dd9886f217091
# good: [584acdd49cd2472ca0f5a06adbe979db82d0b4af] md/raid5: activate raid6 rmw feature
git bisect good 584acdd49cd2472ca0f5a06adbe979db82d0b4af
# good: [5423399a84ee1d92d29d763029ed40e4905cf50f] md/raid5: change ->inactive_blocked to a bit-flag.
git bisect good 5423399a84ee1d92d29d763029ed40e4905cf50f
# good: [9ffc8f7cb9647b13dfe4d1ad0d5e1427bb8b46d6] md/raid5: don't do chunk aligned read on degraded array.
git bisect good 9ffc8f7cb9647b13dfe4d1ad0d5e1427bb8b46d6
# bad: [474095e46cd14421821da3201a9fd6a4c070996b] Merge tag 'md/4.1' of git://neil.brown.name/md
git bisect bad 474095e46cd14421821da3201a9fd6a4c070996b
# first bad commit: [474095e46cd14421821da3201a9fd6a4c070996b] Merge tag 'md/4.1' of git://neil.brown.name/md
Comment 12 Anton Gubarkov 2015-07-10 19:22:30 UTC
I raised a bug at https://bugzilla.kernel.org/show_bug.cgi?id=101331
Comment 13 Anton Gubarkov 2015-07-12 16:09:58 UTC
At the 1st glance, I couldn't make how a modification to md code could possibly affect my setup, since I don't use md (raid devices). I use bcache heavily, I run my system off bcache device (all key filesystems are on bcache). I started to explore options to disable MD in kernel, but it turns out that bcache depends on it - hence the impact on my setup.
Comment 14 Anton Gubarkov 2015-07-19 19:44:53 UTC
Further testing revealed that >=sys-kernel/gentoo-sources-4.1 are rock solid (8 days uptime) if I don't connect my bluetooth mouse. I restart my bisect with this new observation in mind.
Comment 15 Anton Gubarkov 2015-07-24 09:00:13 UTC
The bisect completed with the commit 1f5014d6a77513fa7cefe30eb7791d5856c04384. However the BT mouse was not working before this commit. Apparently, the offending change was earlier, but masked with the problem fixed by this commit. 

diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index a05b9db..9070dfd 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -1313,7 +1313,8 @@ int hidp_connection_add(struct hidp_connadd_req *req,
                        struct socket *ctrl_sock,
                        struct socket *intr_sock)
 {
-       u32 valid_flags = 0;
+       u32 valid_flags = BIT(HIDP_VIRTUAL_CABLE_UNPLUG) |
+                         BIT(HIDP_BOOT_PROTOCOL_MODE);
        struct hidp_session *session;
        struct l2cap_conn *conn;
        struct l2cap_chan *chan;




I'll patch this commit manually and will relpeat the bisect.
Comment 16 Anton Gubarkov 2015-07-24 13:59:33 UTC
this issue looks very similar to https://bbs.archlinux.org/viewtopic.php?id=199112 but that issue is definitely not applicable since I have a Lenovo T540p with Intel BT/Wifi combo card.
Comment 17 Anton Gubarkov 2015-07-26 16:16:24 UTC
I've completed a bisect and it landed on 297d716f6260cc9421d971b124ca196b957ee458. The update is huge. I will retest this change again to re-confirm.
Comment 18 Anton Gubarkov 2015-07-27 21:13:53 UTC
I repeated my tests. The kernel before 297d716f6260cc9421d971b124ca196b957ee458 is stable - working for 2 days w/o  panics, whatever I do with my BT mouse. 

As soon as I apply 297d716f6260cc9421d971b124ca196b957ee458, I get panic within 30 minutes of the 1st disconnect of my BT mouse in 100% cases. 85% of panics happen withing 5 minutes of my mouse disconnect.
Comment 19 Anton Gubarkov 2015-09-02 08:53:42 UTC
It seems that gentoo-sources-4.2.0 don't have this problem anymore.  I keep testing.
Comment 20 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-02-14 18:30:59 UTC
could you test it with 4.1.38 ?