“BUG:原子时调度:nc/3622/0x00000101”

“BUG:原子时调度:nc/3622/0x00000101”

我注意到下面的堆栈跟踪出现在 中/var/log/kern.log。在内核 3.13.0-32-generic 上运行 Ubuntu 14.04。此问题并不经常发生。

[  410.671752] netfilter: module loaded
[  410.682336] BUG: scheduling while atomic: nc/3622/0x00000101
[  410.682339] Modules linked in: netfilter(OF) ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables x_tables ctr ccm pci_stub vboxpci(OF) vboxnetadp(OF) vboxnetflt(OF) vboxdrv(OF) rfcomm bnep binfmt_misc snd_hda_codec_realtek snd_hda_codec_hdmi dell_wmi sparse_keymap hid_multitouch uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev rts5139(C) dell_laptop dcdbas intel_rapl ath3k x86_pkg_temp_thermal intel_powerclamp btusb coretemp bluetooth kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper arc4 cryptd snd_seq_midi snd_seq_midi_event ath9k radeon joydev serio_raw ath9k_common ath9k_hw lpc_ich snd_rawmidi ath ttm mac80211 snd_hda_intel snd_hda_codec cfg80211 snd_hwdep snd_seq snd_pcm snd_seq_device snd_page_alloc i915 snd_timer snd mei_me mei soundcore drm_kms_helper drm i2c_algo_bit wmi parport_pc mac_hid video ppdev lp parport hid_generic usbhid hid psmouse ahci r8169 libahci mii
[  410.682421] CPU: 2 PID: 3622 Comm: nc Tainted: GF        C O 3.13.0-32-generic #57-Ubuntu
[  410.682424] Hardware name: Dell Inc. Inspiron 5537/0FTDJN, BIOS A07 11/12/2013
[  410.682426]  ffff88025f294440 ffff88025f283a30 ffffffff8171bcb4 ffff88025f283bd0
[  410.682429]  ffff88025f283a40 ffffffff817154c1 ffff88025f283aa0 ffffffff8171ff7e
[  410.682432]  ffff88022fd1c7d0 ffff88022b1f7fd8 0000000000014440 0000000000014440
[  410.682435] Call Trace:
[  410.682436]  <IRQ>  [<ffffffff8171bcb4>] dump_stack+0x45/0x56
[  410.682463]  [<ffffffff817154c1>] __schedule_bug+0x4c/0x5a
[  410.682477]  [<ffffffff8171ff7e>] __schedule+0x69e/0x7d0
[  410.682482]  [<ffffffff817200d9>] schedule+0x29/0x70
[  410.682487]  [<ffffffff8171f329>] schedule_timeout+0x239/0x2d0
[  410.682493]  [<ffffffff8109a7c3>] ? wake_up_process+0x23/0x40
[  410.682499]  [<ffffffff81080d84>] ? wake_up_worker+0x24/0x30
[  410.682503]  [<ffffffff810817fb>] ? insert_work+0x6b/0xb0
[  410.682509]  [<ffffffff8172137e>] wait_for_completion_killable+0xbe/0x1d0
[  410.682513]  [<ffffffff8109a800>] ? wake_up_state+0x20/0x20
[  410.682518]  [<ffffffff8107fe47>] call_usermodehelper_exec+0xe7/0x150
[  410.682523]  [<ffffffff810802a3>] __request_module+0x1b3/0x2a0
[  410.682528]  [<ffffffff8109ec18>] ? __enqueue_entity+0x78/0x80
[  410.682542]  [<ffffffff81385566>] textsearch_prepare+0xf6/0x170
[  410.682552]  [<ffffffff81655f30>] ? inet_del_offload+0x40/0x40
[  410.682557]  [<ffffffffa0998043>] in_hook_func+0x43/0xe0 [netfilter]
[  410.682562]  [<ffffffff81098059>] ? ttwu_do_wakeup+0x19/0xc0
[  410.682567]  [<ffffffff8164faba>] nf_iterate+0x9a/0xb0
[  410.682572]  [<ffffffff81655f30>] ? inet_del_offload+0x40/0x40
[  410.682576]  [<ffffffff8164fb44>] nf_hook_slow+0x74/0x130
[  410.682580]  [<ffffffff81655f30>] ? inet_del_offload+0x40/0x40
[  410.682584]  [<ffffffff81656958>] ip_rcv+0x2f8/0x3d0
[  410.682590]  [<ffffffff81620366>] __netif_receive_skb_core+0x666/0x840
[  410.682594]  [<ffffffff81620558>] __netif_receive_skb+0x18/0x60
[  410.682599]  [<ffffffff8162107e>] process_backlog+0xae/0x1a0
[  410.682613]  [<ffffffff81620942>] net_rx_action+0x152/0x250
[  410.682622]  [<ffffffff8106cafc>] __do_softirq+0xec/0x2c0
[  410.682628]  [<ffffffff8172e09c>] do_softirq_own_stack+0x1c/0x30
[  410.682630]  <EOI>  [<ffffffff8106cd75>] do_softirq+0x55/0x60
[  410.682638]  [<ffffffff8106ce04>] local_bh_enable+0x84/0x90
[  410.682643]  [<ffffffff8165a978>] ip_finish_output+0x1b8/0x3b0
[  410.682647]  [<ffffffff8165bed8>] ip_output+0x58/0x90
[  410.682651]  [<ffffffff8165b635>] ip_local_out+0x25/0x30
[  410.682655]  [<ffffffff8165c9f5>] ip_send_skb+0x15/0x50
[  410.682661]  [<ffffffff816815cf>] udp_send_skb+0x20f/0x2a0
[  410.682671]  [<ffffffff81659a60>] ? ip_copy_metadata+0x180/0x180
[  410.682680]  [<ffffffff81682676>] udp_sendmsg+0x2f6/0xa00
[  410.682686]  [<ffffffff81174f49>] ? __do_fault+0x429/0x530
[  410.682691]  [<ffffffff8168e8f4>] inet_sendmsg+0x64/0xb0
[  410.682698]  [<ffffffff81310657>] ? apparmor_socket_sendmsg+0x17/0x20
[  410.682705]  [<ffffffff81606b9e>] sock_aio_write+0xfe/0x130
[  410.682715]  [<ffffffff811d78bf>] ? touch_atime+0x10f/0x140
[  410.682721]  [<ffffffff811bc3da>] do_sync_write+0x5a/0x90
[  410.682726]  [<ffffffff811bcc5d>] vfs_write+0x1ad/0x1f0
[  410.682733]  [<ffffffff811bd599>] SyS_write+0x49/0xa0
[  410.682739]  [<ffffffff8172c87f>] tracesys+0xe1/0xe6
[  410.682754] NOHZ: local_softirq_pending 202

我遇到的这个是已知的调度错误吗?有可用的补丁吗?

在我的盒子上加载自定义 netfilter 钩子 (.ko) 时会出现此问题,当传入的网络数据包负载较高时,问题每次都无法重现。

答案1

“BUG:原子时调度” ==> IMU 认为此错误可能与内核代码中的原子性问题有关,表明内核中的代码路径sleep在执行原子操作时尝试执行,并且可能处于不可中断状态。这可能导致死锁情况,因此被视为恐慌情况。

相关内容