kernel BUG at kernel/smpboot.c:125!
Since 3.7, we've started seeing reports of this BUG_ON in kernel/smpboot.c being hit..
121 if (kthread_should_park()) {
122 __set_current_state(TASK_RUNNING);
123 preempt_enable();
124 if (ht->park && td->status == HP_THREAD_ACTIVE) {
125 BUG_ON(td->cpu != smp_processor_id());
126 ht->park(td->cpu);
127 td->status = HP_THREAD_PARKED;
128 }
129 kthread_parkme();
130 /* We might have been woken for stop */
131 continue;132 }
In all reports, it seems that it happens when coming back from suspend/hibernate.
Example trace below. More reports at https://bugzilla.redhat.com/show_bug.cgi?id=891088
Quoted 49 lines
kernel BUG at
kernel/smpboot.c:125!
invalid opcode: 0000 [#1] SMPModules linked in: cpufreq_stats des_generic md4 nls_utf8 cifs dns_resolverfscache fuse
ipt_MASQUERADEnf_conntrack_netbios_nsnf_conntrack_broadcastip6table_mangleip6t_REJECTnf_conntrack_ipv6nf_defrag_ipv6iptable_natnf_nat_ipv4nf_natiptable_manglenf_conntrack_ipv4nf_defrag_ipv4xt_conntracknf_conntrackebtable_filterebtablesip6table_filterip6_tablesbnepsnd_hda_codec_hdmisnd_hda_codec_realteksnd_hda_intelarc4snd_hda_codecsnd_hwdepsnd_sequvcvideosnd_seq_deviceiwldvmsnd_pcmvideobuf2_vmallociTCO_wdtvideobuf2_memopsiTCO_vendor_supportvideobuf2_coremac80211 videodevasus_nb_wmiasus_wmimediavhost_netsparse_keymapcoretempsnd_page_allocbtusb tun iwlwifi macvtap macvlan bluetooth microcodesnd_timerkvm_intelsnd joydevserio_rawlpc_ichi2c_i801cfg80211 soundcore kvmmfd_coremei rfkill uinputdm_cryptnouveaucrc32c_inteli915mxm_wmii2c_algo_bitdrm_kms_helperghash_clmulni_intelttm drmi2c_corewmi video
CPU 0
Pid: 22, comm: watchdog/3 Not tainted 3.7.1-1.fc19.x86_64 #1 ASUSTeK COMPUTER INC. UX32VD/UX32VDRIP: 0010:[<ffffffff8108aae3>] [<ffffffff8108aae3>] smpboot_thread_fn+0x193/0x1a0 RSP: 0000:ffff88029fc71e78 EFLAGS: 00010206 RAX: ffffffff810eb4b0 RBX: ffff88029fc35c80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff88029fc35c80 RDI: 0000000000000003 RBP: ffff88029fc71eb8 R08: ffff88029fc70000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: ffff8802a4400940 R13: ffffffff81c3b9a0 R14: ffff88029fc35c80 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8802aee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f825e2b6000 CR3: 000000027a915000 CR4: 00000000001407f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process watchdog/3 (pid: 22, threadinfo ffff88029fc70000, task ffff88029fc35c80) Stack: ffff88029fc71e88 0000000000000000 ffff88029fc71eb8 0000000000000001 ffff8802a00e5d18 ffff8802a4400940 ffffffff8108a950 0000000000000000 ffff88029fc71f48 ffffffff81081d50 0000000000000001 0000000000000005 Call Trace: [<ffffffff8108a950>] ? lg_global_unlock+0x60/0x60 [<ffffffff81081d50>] kthread+0xc0/0xd0 [<ffffffff81010808>] ? perf_trace_xen_mmu_flush_tlb_all+0x88/0xc0 [<ffffffff81081c90>] ? kthread_create_on_node+0x120/0x120 [<ffffffff8163d92c>] ret_from_fork+0x7c/0xb0 [<ffffffff81081c90>] ? kthread_create_on_node+0x120/0x120 Code: bf 77 00 0f a3 3a 19 d2 31 f6 85 d2 40 0f 95 c6 ff d0 4c 89 e7 e8 ce 4f0f 00 48 83 c4 20 31 c0 5b 41 5c 41 5d 41 5e 5d c3 0f 0b <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 c7
RIP [<ffffffff8108aae3>]smpboot_thread_fn+0x193/0x1a0
RSP <ffff88029fc71e78>
Quoted 7 lines · Dave Jones
Since 3.7, we've started seeing reports of this
BUG_ONinkernel/smpboot.cbeing hit..121 if (
kthread_should_park()) {122 __set_current_state(TASK_RUNNING); 123 preempt_enable(); 124 if (ht->park && td->status == HP_THREAD_ACTIVE) {125
BUG_ON(td->cpu != smp_processor_id());
Unsafe to get the current cpu if kthread is not bound to it, would you please take a try for the following diff?
Hillf
---
kernel/kthread.c +1 -0
@@ -306,6 +306,7 @@ struct task_struct *kthread_create_on_cpreturn p;set_bit (KTHREAD_IS_PER_CPU , &to_kthread (p)->flags);to_kthread (p)->cpu = cpu; +__kthread_bind (p, cpu);/* Park the thread to get it out of TASK_UNINTERRUPTIBLE state */ kthread_park (p);return p;
--
Quoted 62 lines
126
ht->park(td->cpu);
127td->status=HP_THREAD_PARKED;128 } 129 kthread_parkme(); 130 /* We might have been woken for stop */ 131 continue;132 }
In all reports, it seems that it happens when coming back from suspend/hibernate.
Example trace below. More reports at https://bugzilla.redhat.com/show_bug.cgi?id=891088
Quoted 49 lines
kernel BUG at
kernel/smpboot.c:125!
invalid opcode: 0000 [#1] SMPModules linked in: cpufreq_stats des_generic md4 nls_utf8 cifs dns_resolverfscache fuse
ipt_MASQUERADEnf_conntrack_netbios_nsnf_conntrack_broadcastip6table_mangleip6t_REJECTnf_conntrack_ipv6nf_defrag_ipv6iptable_natnf_nat_ipv4nf_natiptable_manglenf_conntrack_ipv4nf_defrag_ipv4xt_conntracknf_conntrackebtable_filterebtablesip6table_filterip6_tablesbnepsnd_hda_codec_hdmisnd_hda_codec_realteksnd_hda_intelarc4snd_hda_codecsnd_hwdepsnd_sequvcvideosnd_seq_deviceiwldvmsnd_pcmvideobuf2_vmallociTCO_wdtvideobuf2_memopsiTCO_vendor_supportvideobuf2_coremac80211 videodevasus_nb_wmiasus_wmimediavhost_netsparse_keymapcoretempsnd_page_allocbtusb tun iwlwifi macvtap macvlan bluetooth microcodesnd_timerkvm_intelsnd joydevserio_rawlpc_ichi2c_i801cfg80211 soundcore kvmmfd_coremei rfkill uinputdm_cryptnouveaucrc32c_inteli915mxm_wmii2c_algo_bitdrm_kms_helperghash_clmulni_intelttm drmi2c_corewmi video
CPU 0
Pid: 22, comm: watchdog/3 Not tainted 3.7.1-1.fc19.x86_64 #1 ASUSTeK COMPUTER INC. UX32VD/UX32VDRIP: 0010:[<ffffffff8108aae3>] [<ffffffff8108aae3>] smpboot_thread_fn+0x193/0x1a0 RSP: 0000:ffff88029fc71e78 EFLAGS: 00010206 RAX: ffffffff810eb4b0 RBX: ffff88029fc35c80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff88029fc35c80 RDI: 0000000000000003 RBP: ffff88029fc71eb8 R08: ffff88029fc70000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: ffff8802a4400940 R13: ffffffff81c3b9a0 R14: ffff88029fc35c80 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8802aee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f825e2b6000 CR3: 000000027a915000 CR4: 00000000001407f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process watchdog/3 (pid: 22, threadinfo ffff88029fc70000, task ffff88029fc35c80) Stack: ffff88029fc71e88 0000000000000000 ffff88029fc71eb8 0000000000000001 ffff8802a00e5d18 ffff8802a4400940 ffffffff8108a950 0000000000000000 ffff88029fc71f48 ffffffff81081d50 0000000000000001 0000000000000005 Call Trace: [<ffffffff8108a950>] ? lg_global_unlock+0x60/0x60 [<ffffffff81081d50>] kthread+0xc0/0xd0 [<ffffffff81010808>] ? perf_trace_xen_mmu_flush_tlb_all+0x88/0xc0 [<ffffffff81081c90>] ? kthread_create_on_node+0x120/0x120 [<ffffffff8163d92c>] ret_from_fork+0x7c/0xb0 [<ffffffff81081c90>] ? kthread_create_on_node+0x120/0x120 Code: bf 77 00 0f a3 3a 19 d2 31 f6 85 d2 40 0f 95 c6 ff d0 4c 89 e7 e8 ce 4f0f 00 48 83 c4 20 31 c0 5b 41 5c 41 5d 41 5e 5d c3 0f 0b <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 c7
RIP [<ffffffff8108aae3>]smpboot_thread_fn+0x193/0x1a0
RSP <ffff88029fc71e78>