修改kernel输出后,内核CPU锁死

CPU/显卡/打印机/USB设备等硬件问题
回复
maple412
帖子: 45
注册时间: 2017-11-25 22:36

修改kernel输出后,内核CPU锁死

#1

帖子 maple412 » 2021-12-30 22:51

在etc/default/grub中修改 GRUB_CMDLINE_LINUX_DEFAULT
加上 console=ttyS0 console=tty0 ignore_loglevel 这样串口log可以从ttyS0中输出
在插入wifi的ko模块后几十秒的时间后出现cpu被软锁死的现象

19:15:45|[ 597.572298] NMI watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [kworker/4:2:1179]
19:15:46|[ 597.572331] Modules linked in: hawk_usb(OE) cfg80211 binfmt_misc intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm irqbypass crc32_pclmul aesni_intel aes_i586 lrw ablk_helper cryptd snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec hp_wmi snd_hda_core sparse_keymap snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device mei_me snd_timer snd soundcore mei mac_hid serio_raw tpm_infineon acpi_pad parport_pc ppdev lp parport autofs4 i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm e1000e psmouse ptp ahci pps_core libahci wmi fjes video
19:15:46|[ 597.572333] CPU: 4 PID: 1179 Comm: kworker/4:2 Tainted: G OEL 4.9.84 #1
19:15:46|[ 597.572334] Hardware name: HP HP Z240 SFF Workstation/802E, BIOS N51 Ver. 01.76 04/24/2019
19:15:46|[ 597.572337] Workqueue: events netstamp_clear
19:15:46|[ 597.572338] task: e49da100 task.stack: e2d9e000
19:15:46|[ 597.572339] EIP: 0060:[<c80fbc62>] EFLAGS: 00000202 CPU: 4
19:15:46|[ 597.572341] EIP is at smp_call_function_many+0x1d2/0x230
19:15:47|[ 597.572342] EAX: 00000005 EBX: f2bc9dcc ECX: 00000005 EDX: 00000001
19:15:47|[ 597.572342] ESI: f2bb4400 EDI: f2bb4404 EBP: e2d9fe1c ESP: e2d9fdf8
19:15:47|[ 597.572343] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
19:15:47|[ 597.572344] CR0: 80050033 CR2: b610fe3c CR3: 23a1b760 CR4: 003406f0
19:15:47|[ 597.572344] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
19:15:47|[ 597.572345] DR6: fffe0ff0 DR7: 00000400
19:15:47|[ 597.572345] Stack:
19:15:47|[ 597.572360] c806615e 00000001 c8d103c0 0170669a 00000000 c802f7f0 c8706699 c802f7f0
19:15:47|[ 597.572361] 00000000 e2d9fe34 c80fbd1a 00000001 c8706699 e2d9fe67 c870669a e2d9fe54
19:15:47|[ 597.572363] c80308d5 00000005 ccd9fe4c 22628e1e c8706699 c8821824 e2d9fe67 e2d9fe7c
19:15:47|[ 597.572363] Call Trace:
19:15:47|[ 597.572366] [<c806615e>] ? native_set_fixmap+0x4e/0x60
19:15:47|[ 597.572368] [<c802f7f0>] ? arch_unregister_cpu+0x20/0x20
19:15:47|[ 597.572370] [<c8706699>] ? netif_receive_skb_internal+0x19/0x90
19:15:47|[ 597.572371] [<c802f7f0>] ? arch_unregister_cpu+0x20/0x20
19:15:47|[ 597.572372] [<c80fbd1a>] on_each_cpu+0x2a/0x60
19:15:48|[ 597.572373] [<c8706699>] ? netif_receive_skb_internal+0x19/0x90
19:15:48|[ 597.572375] [<c870669a>] ? netif_receive_skb_internal+0x1a/0x90
19:15:48|[ 597.572376] [<c80308d5>] text_poke_bp+0x85/0xd0
19:15:48|[ 597.572377] [<c8706699>] ? netif_receive_skb_internal+0x19/0x90
19:15:48|[ 597.572378] [<c802e033>] arch_jump_label_transform+0x83/0x110
19:15:48|[ 597.572379] [<c870669e>] ? netif_receive_skb_internal+0x1e/0x90
19:15:48|[ 597.572381] [<c818128c>] __jump_label_update+0x6c/0x80
19:15:48|[ 597.572382] [<c8181314>] jump_label_update+0x74/0x80
19:15:48|[ 597.572384] [<c818162b>] __static_key_slow_dec+0x3b/0x90
19:15:48|[ 597.572385] [<c818169d>] static_key_slow_dec+0x1d/0x60
19:15:48|[ 597.572386] [<c8181726>] static_key_disable+0x46/0x50
19:15:48|[ 597.572387] [<c87008c5>] netstamp_clear+0x35/0x40
19:15:48|[ 597.572388] [<c808a4f6>] process_one_work+0x126/0x410
19:15:48|[ 597.572389] [<c808a817>] worker_thread+0x37/0x4e0
19:15:48|[ 597.572390] [<c808fdb7>] kthread+0xb7/0xd0
19:15:49|[ 597.572391] [<c808a7e0>] ? process_one_work+0x410/0x410
19:15:49|[ 597.572392] [<c808fd00>] ? kthread_park+0x50/0x50
19:15:49|[ 597.572394] [<c8819f9c>] ret_from_fork+0x30/0x3c


是因为kernel 从/dev/ttyS0输出后增加了中断频率导致的么?
头像
astolia
论坛版主
帖子: 6514
注册时间: 2008-09-18 13:11

Re: 修改kernel输出后,内核CPU锁死

#2

帖子 astolia » 2021-12-31 10:17

如果锁死发生前,有大量信息输出的话,有可能是串口发送不过来。
因为你没有指定波特率,应该是按默认的9600来运作的。你可以设大点,比如console=ttyS0,115200
maple412
帖子: 45
注册时间: 2017-11-25 22:36

Re: 修改kernel输出后,内核CPU锁死

#3

帖子 maple412 » 2022-01-01 19:52

astolia 写了: 2021-12-31 10:17 如果锁死发生前,有大量信息输出的话,有可能是串口发送不过来。
因为你没有指定波特率,应该是按默认的9600来运作的。你可以设大点,比如console=ttyS0,115200
是的,波特率改成115200提升串口处理后,没有发生CPU 锁死了。CPU锁死是因为串口输出能力不够,大量中断产生导致的?
回复