<div dir="ltr">I just upgrade my cpu to Ryzen 3700x, my mainboard is Asus B450-I.  I have updated the latest bios.<div>After upgarde, wireguard constantly cause CPU soft lockup.<br></div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">[   79.397005] wireguard: WireGuard 0.0.20190601 loaded. See <a href="http://www.wireguard.com">www.wireguard.com</a> for information.
</span><br>[   79.397005] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <<a href="mailto:Jason@zx2c4.com">Jason@zx2c4.com</a>>. All Rights Reserved.
<br>[  224.295881] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [kworker/u64:4:304]
<br>[  224.295884] Modules linked in: wireguard(OE) ip6_udp_tunnel udp_tunnel rfcomm pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) xt_nat xt_tcpudp veth ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_n<br>etlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack libcrc32c br_netfilter bridge stp llc aufs overlay cmac bnep snd<br>_hda_codec_hdmi binfmt_misc nls_iso8859_1 edac_mce_amd snd_hda_codec_realtek snd_hda_codec_generic kvm snd_hda_intel arc4 snd_hda_codec irqbypass snd_hda_core crct10dif_pclmul snd_hwdep crc32_pclmul snd_pcm ghash_clmul<br>ni_intel snd_seq_midi r8822be(C) snd_seq_midi_event pcbc snd_rawmidi btusb snd_seq btrtl aesni_intel mac80211 btbcm btintel snd_seq_device snd_timer bluetooth
<br>[  224.295921]  aes_x86_64 eeepc_wmi asus_wmi crypto_simd sparse_keymap snd glue_helper video wmi_bmof joydev input_leds ecdh_generic cryptd cfg80211 soundcore shpchp wmi mac_hid nvidia_uvm(OE) sch_fq_codel msr parport<br>_pc ppdev lp sunrpc parport ip_tables x_tables autofs4 btrfs xor zstd_compress raid6_pq hid_generic usbhid hid nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fop<br>s drm igb ipmi_devintf ipmi_msghandler nvme dca i2c_algo_bit i2c_piix4 ahci ptp nvme_core pps_core libahci gpio_amdpt gpio_generic
<br>[  224.295952] CPU: 2 PID: 304 Comm: kworker/u64:4 Tainted: P         C OE    4.15.0-54-generic #58-Ubuntu
<br>[  224.295953] Hardware name: System manufacturer System Product Name/ROG STRIX B450-I GAMING, BIOS 2501 07/12/2019
<br>[  224.295961] Workqueue: wg-kex-wg0 wg_packet_handshake_send_worker [wireguard]
<br>[  224.295965] RIP: 0010:get_random_u32+0x24/0xe0
<br>[  224.295967] RSP: 0018:ffffa20888307ca8 EFLAGS: 00000203 ORIG_RAX: ffffffffffffff11
<br>[  224.295968] RAX: 00000000ffffffff RBX: ffff921d74985ac8 RCX: 0000000000000000
<br>[  224.295969] RDX: 000000000000000a RSI: 00000000fffffe01 RDI: ffffffffc2386d02
<br>[  224.295970] RBP: ffffa20888307cc0 R08: ffffffffc23a8ca0 R09: ffffa20888307c58
<br>[  224.295971] R10: 0000000000000000 R11: 02d4998003202790 R12: ffff921cb5720000
<br>[  224.295972] R13: ffff921cb5730000 R14: ffff921d74985ad0 R15: ffffa20888307e0c
<br>[  224.295973] FS:  0000000000000000(0000) GS:ffff921e3e280000(0000) knlGS:0000000000000000
<br>[  224.295974] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<br>[  224.295975] CR2: 00007ffbffff3308 CR3: 000000074f19c000 CR4: 0000000000340ee0
<br>[  224.295976] Call Trace:
<br>[  224.295982]  ? wg_index_hashtable_insert+0x71/0x110 [wireguard]
<br>[  224.295985]  wg_index_hashtable_insert+0x62/0x110 [wireguard]
<br>[  224.295988]  wg_noise_handshake_create_initiation+0x2d2/0x2f0 [wireguard]
<br>[  224.295992]  wg_packet_send_handshake_initiation+0x8c/0x130 [wireguard]
<br>[  224.295995]  wg_packet_handshake_send_worker+0x19/0x30 [wireguard]
<br>[  224.295998]  process_one_work+0x1de/0x410
<br>[  224.295999]  worker_thread+0x32/0x410
<br>[  224.296001]  kthread+0x121/0x140
<br>[  224.296003]  ? process_one_work+0x410/0x410
<br>[  224.296005]  ? kthread_create_worker_on_cpu+0x70/0x70
<br>[  224.296008]  ret_from_fork+0x22/0x40
<br>[  224.296009] Code: 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 54 53 48 83 ec 08 0f 1f 44 00 00 ba 0a 00 00 00 eb 05 ba 0a 00 00 00 0f c7 f0 <72> 46 83 ea 01 75 f6 48 8b 75 08 48 c7 c2 b0 52 30 ba 48 c7 c7 <br>
<br></span><div>Kernel version: <span style="color:rgb(0,0,0);font-family:monospace">Linux 5.0.0-20-generic</span></div><div>I also tried <span style="color:rgb(0,0,0);font-family:monospace">WireGuard 0.0.20190702, the same CPU lockup.</span><br></div><div><span style="color:rgb(0,0,0);font-family:monospace">I know this maybe the bug of CPU or kernel itself.</span></div><div><span style="color:rgb(0,0,0);font-family:monospace">But this lockup only occurs in wireguard,  If stop wireguard, the CPU soft lockup disappear.</span></div><div><br></div><div>Could anyone look into this issue?</div><div><br></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><a href="mailto:trulyliu@gmail.com" target="_blank">trulyliu@gmail.com</a><br></div></div></div>