linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Cepparo <francesco.cepparo@gmail.com>
To: Seth Jennings <sjenning@redhat.com>,
	Dan Streetman <ddstreet@ieee.org>,
	 Vitaly Wool <vitaly.wool@konsulko.com>
Cc: linux-mm@kvack.org
Subject: Kernel BUG at mm/zswap.c:1313!
Date: Sat, 9 Oct 2021 17:50:53 +0200	[thread overview]
Message-ID: <CACMK0yk3qSLDmCf=msQ-SaeALLQJYFjJS5WitAh-TBuC7t1Uag@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7895 bytes --]

Dear mm/zswap.c maintainers,
yesterday I hit a kernel BUG at mm/zswap.c:1313! which first happened to me
several months ago (May 28, 2021).

I'm using Arch Linux with kernel 5.14.9-arch2-1. The bug first appeared to
me with the zen kernel, version 5.12.7-zen1-1-zen at at mm/zswap.c:1316

I found something was wrong with the system because my shell was hanging
when calling $ keychain --eval id_rsa
Otherwise the system worked fine, except for a Chrome gmail tab that hanged
as well.

When hitting the bug the first two times, I was using a VM. The first time,
after shutting down the VM, the whole system soon crashed. But my music was
still playing and I was able to reboot the system with the magic SysRQ keys.

The second time though, after closing the VM, nothing happened, and the
command
$ keychain --eval id_rsa
started working again.

The third and fourth time I had no VMs running but there was a lot of used
RAM and swap:
               total        used        free      shared  buff/cache
available
Mem:           15788       11898         572        1811        3318
 1751
Swap:          15788       13001        2787

All the Swap is actually zram. This is my /etc/systemd/swap.conf:
zram_enabled=1
zram_size=$(( RAM_SIZE / 1 ))
zram_count=${NCPU}
zram_streams=${NCPU}
zram_alg=zstd
zram_prio=32767

Here is the "cut here" section of dmesg for the last bug occurrence:

[30959.209684] ------------[ cut here ]------------
[30959.209688] kernel BUG at mm/zswap.c:1313!
[30959.209695] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[30959.209698] CPU: 1 PID: 47446 Comm: ThreadPoolForeg Tainted: P
OE     5.14.9-arch2-1 #1 3d250f0857a0255dbbcb433ce1895c81c4740764
[30959.209701] Hardware name: Dell Inc. Vostro 5490/0J7GHT, BIOS 1.11.0
08/13/2020
[30959.209702] RIP: 0010:zswap_frontswap_load+0x344/0x360
[30959.209707] Code: ff ff e8 d6 fd d4 ff 45 31 e4 e9 4a ff ff ff 48 8d 7b
10 e8 be 2e 81 00 c7 43 10 00 00 00 00 44 8b 63 30 e9 04 ff ff ff 0f 0b
<0f> 0b 41 bc f4 ff ff ff e9 22 ff ff ff e8 0a 74 80 00 66 2e 0f 1f
[30959.209709] RSP: 0018:ffffb4bda204fc48 EFLAGS: 00010282
[30959.209711] RAX: 0000000000000000 RBX: ffffd4bd7fc6fe38 RCX:
0000000000000000
[30959.209713] RDX: 0000000000000021 RSI: 0000000000000000 RDI:
ffff8dac9ce3b010
[30959.209714] RBP: ffff8daa51c6bf18 R08: ffff8daa64fb7780 R09:
0000000000000000
[30959.209716] R10: 0000000000001000 R11: 0000000000000000 R12:
00000000ffffffea
[30959.209717] R13: ffff8daa65806818 R14: fffff9348638bec0 R15:
ffff8daa65806810
[30959.209719] FS:  00007fc5e3a3c640(0000) GS:ffff8dad9c640000(0000)
knlGS:0000000000000000
[30959.209721] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[30959.209723] CR2: 00002737078d203c CR3: 000000020a976005 CR4:
00000000003706e0
[30959.209724] Call Trace:
[30959.209728]  __frontswap_load+0x76/0xc0
[30959.209731]  swap_readpage+0x1a9/0x2b0
[30959.209735]  do_swap_page+0x823/0x950
[30959.209738]  ? ptep_set_access_flags+0x2f/0x40
[30959.209740]  ? wp_page_reuse+0x61/0x70
[30959.209743]  __handle_mm_fault+0xaf4/0x15c0
[30959.209746]  handle_mm_fault+0xd5/0x2a0
[30959.209748]  do_user_addr_fault+0x1de/0x690
[30959.209752]  exc_page_fault+0x72/0x170
[30959.209755]  ? asm_exc_page_fault+0x8/0x30
[30959.209757]  asm_exc_page_fault+0x1e/0x30
[30959.209759] RIP: 0033:0x563a399ee1f6
[30959.209761] Code: 76 ff 48 39 f1 0f 96 c1 48 39 c6 0f 92 c0 84 c1 0f 85
b6 16 00 00 48 39 d6 75 0f e9 ac 16 00 00 31 c0 31 c9 eb be 31 d2 eb cd
<8b> 06 49 03 45 38 45 84 ff 48 89 85 08 ff ff ff 0f 85 53 10 00 00
[30959.209763] RSP: 002b:00007fc5e3a39e20 EFLAGS: 00010206
[30959.209765] RAX: 000000be0c080001 RBX: 00000000000003e8 RCX:
000000be0c062100
[30959.209766] RDX: 0000000000000000 RSI: 000000be08e06478 RDI:
00007fc5e3a3aff8
[30959.209768] RBP: 00007fc5e3a3b080 R08: 000000aa0080c000 R09:
000000be08e18df0
[30959.209769] R10: 0000000000000000 R11: 0000000000000000 R12:
000000000000001c
[30959.209770] R13: 000000aa0080c000 R14: 000000be08e06479 R15:
000000be0bc70300
[30959.209773] Modules linked in: ppp_deflate bsd_comp ppp_async
ppp_generic slhc snd_seq_dummy snd_hrtimer snd_seq snd_seq_device rfcomm
hid_logitech_hidpp hid_logitech_dj usbhid cmac algif_hash algif_skcipher
af_alg xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4
xt_tcpudp ip6table_mangle ip6table_nat ip6table_filter ip6_tables
iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6
nf_defrag_ipv4 iptable_filter bnep bridge btusb btrtl btbcm stp btintel
snd_ctl_led llc bluetooth ecdh_generic ecc crc16 uvcvideo
snd_soc_skl_hda_dsp videobuf2_vmalloc snd_soc_intel_hda_dsp_common
videobuf2_memops snd_soc_hdac_hdmi videobuf2_v4l2 videobuf2_common videodev
mc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
snd_soc_dmic hid_sensor_custom snd_sof_pci_intel_cnl hid_sensor_hub
snd_sof_intel_hda_common cros_ec_ishtp soundwire_intel cros_ec
soundwire_generic_allocation joydev intel_ishtp_loader soundwire_cadence
snd_sof_intel_hda mousedev snd_sof_pci zram
[30959.209815]  intel_ishtp_hid snd_sof_xtensa_dsp iTCO_wdt
intel_tcc_cooling intel_pmc_bxt dell_laptop hid_multitouch
x86_pkg_temp_thermal iTCO_vendor_support snd_sof mei_hdcp intel_powerclamp
soundwire_bus dell_wmi intel_rapl_msr ledtrig_audio dell_wmi_sysman
dell_smbios coretemp firmware_attributes_class dell_wmi_descriptor wmi_bmof
intel_wmi_thunderbolt snd_soc_skl dcdbas snd_soc_hdac_hda dell_smm_hwmon
snd_hda_ext_core kvm_intel snd_soc_sst_ipc snd_soc_sst_dsp qrtr
snd_soc_acpi_intel_match snd_soc_acpi snd_soc_core ns kvm nvidia_drm(POE)
snd_compress irqbypass crct10dif_pclmul crc32_pclmul ac97_bus
ghash_clmulni_intel snd_pcm_dmaengine aesni_intel crypto_simd cryptd rapl
intel_cstate nvidia_modeset(POE) intel_uncore snd_hda_intel
snd_intel_dspcfg snd_intel_sdw_acpi iwlmvm snd_hda_codec pcspkr psmouse
snd_hda_core intel_spi_pci mac80211 snd_hwdep intel_spi snd_pcm r8169
spi_nor libarc4 snd_timer nvidia(POE) iwlwifi i2c_i801 realtek mtd snd vfat
mdio_devres i2c_smbus soundcore i915 fat
[30959.209860]  libphy cfg80211 mei_me mei intel_lpss_pci intel_lpss
tpm_crb idma64 rfkill i2c_algo_bit ttm drm_kms_helper intel_ish_ipc
intel_ishtp cec processor_thermal_device_pci_legacy
processor_thermal_device processor_thermal_rfim intel_gtt ucsi_acpi
processor_thermal_mbox intel_pch_thermal agpgart processor_thermal_rapl
typec_ucsi intel_rapl_common syscopyarea intel_soc_dts_iosf typec
sysfillrect i2c_hid_acpi sysimgblt fb_sys_fops roles mac_hid i2c_hid
int3403_thermal int340x_thermal_zone tpm_tis tpm_tis_core soc_button_array
video wmi tpm rng_core intel_hid sparse_keymap int3400_thermal
acpi_thermal_rel acpi_pad acpi_tad vboxnetflt(OE) vboxnetadp(OE)
vboxdrv(OE) sg drm crypto_user fuse bpf_preload ip_tables x_tables btrfs
blake2b_generic serio_raw atkbd libcrc32c crc32c_generic libps2 xor
raid6_pq i8042 xhci_pci crc32c_intel xhci_pci_renesas serio
[30959.209907] ---[ end trace 8fdeaaff2135991a ]---
[30959.209908] RIP: 0010:zswap_frontswap_load+0x344/0x360
[30959.209911] Code: ff ff e8 d6 fd d4 ff 45 31 e4 e9 4a ff ff ff 48 8d 7b
10 e8 be 2e 81 00 c7 43 10 00 00 00 00 44 8b 63 30 e9 04 ff ff ff 0f 0b
<0f> 0b 41 bc f4 ff ff ff e9 22 ff ff ff e8 0a 74 80 00 66 2e 0f 1f
[30959.209913] RSP: 0018:ffffb4bda204fc48 EFLAGS: 00010282
[30959.209915] RAX: 0000000000000000 RBX: ffffd4bd7fc6fe38 RCX:
0000000000000000
[30959.209916] RDX: 0000000000000021 RSI: 0000000000000000 RDI:
ffff8dac9ce3b010
[30959.209918] RBP: ffff8daa51c6bf18 R08: ffff8daa64fb7780 R09:
0000000000000000
[30959.209919] R10: 0000000000001000 R11: 0000000000000000 R12:
00000000ffffffea
[30959.209921] R13: ffff8daa65806818 R14: fffff9348638bec0 R15:
ffff8daa65806810
[30959.209922] FS:  00007fc5e3a3c640(0000) GS:ffff8dad9c640000(0000)
knlGS:0000000000000000
[30959.209924] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[30959.209925] CR2: 00002737078d203c CR3: 000000020a976005 CR4:
00000000003706e0

Thank you for your attention.

[-- Attachment #2: Type: text/html, Size: 8326 bytes --]

                 reply	other threads:[~2021-10-09 15:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACMK0yk3qSLDmCf=msQ-SaeALLQJYFjJS5WitAh-TBuC7t1Uag@mail.gmail.com' \
    --to=francesco.cepparo@gmail.com \
    --cc=ddstreet@ieee.org \
    --cc=linux-mm@kvack.org \
    --cc=sjenning@redhat.com \
    --cc=vitaly.wool@konsulko.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).