RE: kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610)
> -Original Message- > From: Oleksandr Natalenko [mailto:oleksa...@natalenko.name] > Sent: Friday, February 12, 2021 8:43 PM > To: Song Bao Hua (Barry Song) > Cc: Mikhail Gavrilov ; > sjenn...@linux.vnet.ibm.com; Linux List Kernel Mailing > ; Linux Memory Management List > > Subject: Re: kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610) > > Hello. > > On Thu, Feb 11, 2021 at 10:43:18AM +, Song Bao Hua (Barry Song) wrote: > > Are you using zsmalloc? There is a known bug on the combination > > of zsmalloc and zswap, fixed by patches of tiantao: > > > > mm: set the sleep_mapped to true for zbud and z3fold > > mm/zswap: fix variable 'entry' is uninitialized when used > > mm/zswap: fix potential memory leak > > mm/zswap: add the flag can_sleep_mapped > > > > at Linux-next: > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?q > t=author=tiantao6%40hisilicon.com > > Is this a future stable-5.11 material (and/or, potentially, older stable > branches > as well)? I would believe this should be put into 5.11. I will ask Andrew. > > -- > Oleksandr Natalenko (post-factum) Thanks Barry
Re: kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610)
Hello. On Thu, Feb 11, 2021 at 10:43:18AM +, Song Bao Hua (Barry Song) wrote: > Are you using zsmalloc? There is a known bug on the combination > of zsmalloc and zswap, fixed by patches of tiantao: > > mm: set the sleep_mapped to true for zbud and z3fold > mm/zswap: fix variable 'entry' is uninitialized when used > mm/zswap: fix potential memory leak > mm/zswap: add the flag can_sleep_mapped > > at Linux-next: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?qt=author=tiantao6%40hisilicon.com Is this a future stable-5.11 material (and/or, potentially, older stable branches as well)? -- Oleksandr Natalenko (post-factum)
RE: kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610)
> -Original Message- > From: Mikhail Gavrilov [mailto:mikhail.v.gavri...@gmail.com] > Sent: Thursday, February 11, 2021 9:58 PM > To: sjenn...@linux.vnet.ibm.com; Song Bao Hua (Barry Song) > > Cc: Linux List Kernel Mailing ; Linux Memory > Management List > Subject: kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610) > > Hi folks. > During the 5.11 test cycle I caught a rare but repeatable problem when > after a day uptime happens "BUG at mm/zswap.c:1275!". I am still not > having an idea how to reproduce it, but maybe the authors of this code > could explain what happens here? Are you using zsmalloc? There is a known bug on the combination of zsmalloc and zswap, fixed by patches of tiantao: mm: set the sleep_mapped to true for zbud and z3fold mm/zswap: fix variable 'entry' is uninitialized when used mm/zswap: fix potential memory leak mm/zswap: add the flag can_sleep_mapped at Linux-next: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?qt=author=tiantao6%40hisilicon.com > > $ grep "mm/zswap.c" dmesg*.txt > dmesg101.txt:[127850.513201] kernel BUG at mm/zswap.c:1275! > dmesg11.txt:[52211.962861] kernel BUG at mm/zswap.c:1275! > dmesg8.txt:[46610.641843] kernel BUG at mm/zswap.c:1275! > > [127850.513193] [ cut here ] > [127850.513201] kernel BUG at mm/zswap.c:1275! > [127850.513210] invalid opcode: [#1] SMP NOPTI > [127850.513214] CPU: 6 PID: 485132 Comm: brave Tainted: GW >- --- 5.11.0-0.rc6.20210204git61556703b610.145.fc34.x86_64 > #1 > [127850.513218] Hardware name: System manufacturer System Product > Name/ROG STRIX X570-I GAMING, BIOS 3402 01/13/2021 > [127850.513221] RIP: 0010:zswap_frontswap_load+0x258/0x260 > [127850.513228] Code: ab 83 aa f0 2f 00 00 01 65 ff 0d c3 73 cd 54 eb > 88 48 8d 7b 10 e8 78 b9 9f 00 c7 43 10 00 00 00 00 44 8b 63 70 e9 4a > ff ff ff <0f> 0b 0f 0b 0f 0b 66 90 0f 1f 44 00 00 41 57 31 c0 b9 0c 00 > 00 00 > [127850.513231] RSP: :a92e866c7c48 EFLAGS: 00010282 > [127850.513235] RAX: 0006 RBX: c92e7ca61830 RCX: > 0001 > [127850.513238] RDX: RSI: ab3429fe RDI: > 97f4d0393010 > [127850.513240] RBP: 97ee5544d1c0 R08: 0001 R09: > > [127850.513242] R10: R11: R12: > ffea > [127850.513244] R13: 97ee016800c8 R14: 97ee016800c0 R15: > c0d54020 > [127850.513247] FS: 7fcbe628de40() GS:97f50760() > knlGS: > [127850.513249] CS: 0010 DS: ES: CR0: 80050033 > [127850.513252] CR2: 381208c29250 CR3: 0001c54ea000 CR4: > 00350ee0 > [127850.513254] Call Trace: > [127850.513261] __frontswap_load+0xc3/0x160 > [127850.513265] swap_readpage+0x1ca/0x3a0 > [127850.513270] swapin_readahead+0x2ee/0x4e0 > [127850.513276] do_swap_page+0x4a4/0x900 > [127850.513279] ? lock_release+0x1e9/0x400 > [127850.513283] ? trace_hardirqs_on+0x1b/0xe0 > [127850.513288] handle_mm_fault+0xe7d/0x19d0 > [127850.513294] do_user_addr_fault+0x1c7/0x4c0 > [127850.513299] exc_page_fault+0x67/0x2a0 > [127850.513304] ? asm_exc_page_fault+0x8/0x30 > [127850.513307] asm_exc_page_fault+0x1e/0x30 > [127850.513310] RIP: 0033:0x560297642f44 > [127850.513314] Code: 64 75 07 45 8b 76 03 4d 03 f5 45 8b 56 ff 4d 03 > d5 66 41 81 7a 07 83 00 0f 85 4f 01 00 00 8b 5f 13 49 03 dd 8b 5b 03 > 49 03 dd <8b> 4b ff 49 03 cd 66 81 79 07 a5 00 0f 85 0f 00 00 00 8b 4b > 0f f6 > [127850.513317] RSP: 002b:7ffc04cd4b30 EFLAGS: 00010202 > [127850.513320] RAX: RBX: 381208c29251 RCX: > 560297642f00 > [127850.513322] RDX: 3812080423b1 RSI: 381209b11231 RDI: > 381209b1141d > [127850.513323] RBP: 7ffc04cd4b90 R08: 0043 R09: > 0024 > [127850.513325] R10: 381208042a1d R11: 381209b1141f R12: > 09b1141d > [127850.513327] R13: 3812 R14: 381208b368ed R15: > 3d2fb6b7da10 > [127850.51] Modules linked in: tun snd_seq_dummy snd_hrtimer > uinput rfcomm nft_objref nf_conntrack_netbios_ns > nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib > nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct > nft_chain_nat ip6table_nat ip6table_mangle ip6table_raw > ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 > nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ip_set > nf_tables nfnetlink ip6table_filter ip6_tables iptable_filter cmac > bnep zstd sunrpc vfat fat hid_logitech_hidpp hid_logitech_dj > snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio > snd_hda_codec_hdmi snd_hda_intel snd
kernel BUG at mm/zswap.c:1275! (rc6 - git 61556703b610)
Hi folks. During the 5.11 test cycle I caught a rare but repeatable problem when after a day uptime happens "BUG at mm/zswap.c:1275!". I am still not having an idea how to reproduce it, but maybe the authors of this code could explain what happens here? $ grep "mm/zswap.c" dmesg*.txt dmesg101.txt:[127850.513201] kernel BUG at mm/zswap.c:1275! dmesg11.txt:[52211.962861] kernel BUG at mm/zswap.c:1275! dmesg8.txt:[46610.641843] kernel BUG at mm/zswap.c:1275! [127850.513193] [ cut here ] [127850.513201] kernel BUG at mm/zswap.c:1275! [127850.513210] invalid opcode: [#1] SMP NOPTI [127850.513214] CPU: 6 PID: 485132 Comm: brave Tainted: GW - --- 5.11.0-0.rc6.20210204git61556703b610.145.fc34.x86_64 #1 [127850.513218] Hardware name: System manufacturer System Product Name/ROG STRIX X570-I GAMING, BIOS 3402 01/13/2021 [127850.513221] RIP: 0010:zswap_frontswap_load+0x258/0x260 [127850.513228] Code: ab 83 aa f0 2f 00 00 01 65 ff 0d c3 73 cd 54 eb 88 48 8d 7b 10 e8 78 b9 9f 00 c7 43 10 00 00 00 00 44 8b 63 70 e9 4a ff ff ff <0f> 0b 0f 0b 0f 0b 66 90 0f 1f 44 00 00 41 57 31 c0 b9 0c 00 00 00 [127850.513231] RSP: :a92e866c7c48 EFLAGS: 00010282 [127850.513235] RAX: 0006 RBX: c92e7ca61830 RCX: 0001 [127850.513238] RDX: RSI: ab3429fe RDI: 97f4d0393010 [127850.513240] RBP: 97ee5544d1c0 R08: 0001 R09: [127850.513242] R10: R11: R12: ffea [127850.513244] R13: 97ee016800c8 R14: 97ee016800c0 R15: c0d54020 [127850.513247] FS: 7fcbe628de40() GS:97f50760() knlGS: [127850.513249] CS: 0010 DS: ES: CR0: 80050033 [127850.513252] CR2: 381208c29250 CR3: 0001c54ea000 CR4: 00350ee0 [127850.513254] Call Trace: [127850.513261] __frontswap_load+0xc3/0x160 [127850.513265] swap_readpage+0x1ca/0x3a0 [127850.513270] swapin_readahead+0x2ee/0x4e0 [127850.513276] do_swap_page+0x4a4/0x900 [127850.513279] ? lock_release+0x1e9/0x400 [127850.513283] ? trace_hardirqs_on+0x1b/0xe0 [127850.513288] handle_mm_fault+0xe7d/0x19d0 [127850.513294] do_user_addr_fault+0x1c7/0x4c0 [127850.513299] exc_page_fault+0x67/0x2a0 [127850.513304] ? asm_exc_page_fault+0x8/0x30 [127850.513307] asm_exc_page_fault+0x1e/0x30 [127850.513310] RIP: 0033:0x560297642f44 [127850.513314] Code: 64 75 07 45 8b 76 03 4d 03 f5 45 8b 56 ff 4d 03 d5 66 41 81 7a 07 83 00 0f 85 4f 01 00 00 8b 5f 13 49 03 dd 8b 5b 03 49 03 dd <8b> 4b ff 49 03 cd 66 81 79 07 a5 00 0f 85 0f 00 00 00 8b 4b 0f f6 [127850.513317] RSP: 002b:7ffc04cd4b30 EFLAGS: 00010202 [127850.513320] RAX: RBX: 381208c29251 RCX: 560297642f00 [127850.513322] RDX: 3812080423b1 RSI: 381209b11231 RDI: 381209b1141d [127850.513323] RBP: 7ffc04cd4b90 R08: 0043 R09: 0024 [127850.513325] R10: 381208042a1d R11: 381209b1141f R12: 09b1141d [127850.513327] R13: 3812 R14: 381208b368ed R15: 3d2fb6b7da10 [127850.51] Modules linked in: tun snd_seq_dummy snd_hrtimer uinput rfcomm nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ip_set nf_tables nfnetlink ip6table_filter ip6_tables iptable_filter cmac bnep zstd sunrpc vfat fat hid_logitech_hidpp hid_logitech_dj snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation mt76x2u mt76x2_common snd_soc_core mt76x02_usb snd_compress mt76_usb snd_pcm_dmaengine soundwire_cadence intel_rapl_msr intel_rapl_common iwlmvm snd_hda_codec uvcvideo mt76x02_lib snd_usb_audio videobuf2_vmalloc snd_hda_core mt76 videobuf2_memops videobuf2_v4l2 videobuf2_common [127850.513395] edac_mce_amd snd_usbmidi_lib ac97_bus snd_hwdep videodev mac80211 btusb snd_seq kvm_amd snd_rawmidi btrtl btbcm mc joydev btintel snd_seq_device kvm bluetooth snd_pcm iwlwifi eeepc_wmi snd_timer asus_wmi xpad irqbypass sparse_keymap ecdh_generic snd libarc4 ff_memless sp5100_tco rapl video ecc pcspkr wmi_bmof cfg80211 soundcore i2c_piix4 k10temp rfkill acpi_cpufreq binfmt_misc ip_tables amdgpu drm_ttm_helper ttm iommu_v2 gpu_sched crct10dif_pclmul crc32_pclmul crc32c_intel drm_kms_helper igb cec nvme dca ghash_clmulni_intel drm i2c_algo_bit ccp nvme_core wmi pinctrl_amd fuse [127850.513453] ---[ end trace 9d733ab8d8b8c1f2 ]--- [127850.513456] RIP: 0010:zswap_frontswap_load+0x258/0x260 [127850.513459] Code: ab 83 aa f0 2f 00 00 01 65 ff 0d c3 73 cd 54 eb 88 48 8d 7b 10 e8 78 b9 9f 00 c7 43 10 00 00 00 00 44 8b 63 70 e9 4a ff ff ff <0f> 0b 0f 0b 0f 0b 66 90 0f 1f 44