Re: zswap explosion when using zsmalloc pool compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2020-12-03 at 12:03 +0100, Mike Galbraith wrote:
> On Thu, 2020-12-03 at 10:48 +0100, Sebastian Andrzej Siewior wrote:
> > On 2020-12-03 10:40:16 [+0100], Mike Galbraith wrote:
> > > In thread "scheduling while atomic in z3fold", I mentioned that of the
> > > three pool methods, only zbud did not explode.  Below is the explosion
> > > encountered when zsmalloc is used in conjunction with runltp -f mm.  As
> > > with the z3fold explosion, this one also seems to be highly repeatable,
> > > this from one of my full distro "my box plays russian dolls [1]" KVMs.
> > 
> > great.
> > 
> > > [ 5763.720268] kernel BUG at kernel/locking/rtmutex.c:1057!
> > …
> > > [ 5763.726016] RAX: 00000000ffffffdd RBX: ffff903f77c68080 RCX: 0000000000000001
> > 
> > That is a deadlock. Does lockdep say anything or does it disable the bug
> > from happening?
> 
> The later, for the first time it did not explode.  However...

Bare metal both moaned and went BUG().  zswap don't like RT much.

[  493.774076] BUG: spinlock bad magic on CPU#1, oom01/9152
[  493.774081]  lock: 0xffff8a33dec69560, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[  493.774084] CPU: 1 PID: 9152 Comm: oom01 Kdump: loaded Tainted: G S          E     5.9.12-rt20-rt #21
[  493.774086] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013
[  493.774087] Call Trace:
[  493.774088]  dump_stack+0x77/0x97
[  493.774094]  do_raw_spin_lock+0x71/0xc0
[  493.774097]  _raw_spin_lock_irqsave+0x45/0x50
[  493.774100]  ? rt_spin_lock_slowlock+0x3a/0x70
[  493.774101]  rt_spin_lock_slowlock+0x3a/0x70
[  493.774104]  rt_spin_lock+0x46/0xc0
[  493.774106]  ? zswap_frontswap_store+0x26e/0xa50
[  493.774109]  zswap_frontswap_store+0x26e/0xa50
[  493.774111]  ? rt_mutex_futex_unlock+0x56/0x80
[  493.774113]  __frontswap_store+0x6e/0x100
[  493.774116]  swap_writepage+0x37/0x70
[  493.774118]  shmem_writepage+0x267/0x400
[  493.774121]  pageout+0xd2/0x400
[  493.774125]  shrink_page_list+0xa6e/0xbd0
[  493.774129]  shrink_inactive_list+0x216/0x620
[  493.774134]  shrink_lruvec+0x39f/0x5e0
[  493.774141]  ? shrink_node+0x237/0x6e0
[  493.774142]  shrink_node+0x237/0x6e0
[  493.774145]  do_try_to_free_pages+0xb9/0x400
[  493.774148]  try_to_free_pages+0xe6/0x3b0
[  493.774152]  __alloc_pages_slowpath.constprop.108+0x3f8/0x1090
[  493.774158]  __alloc_pages_nodemask+0x3f6/0x480
[  493.774161]  alloc_pages_vma+0x135/0x190
[  493.774164]  handle_mm_fault+0x87c/0x16f0
[  493.774168]  ? lockdep_hardirqs_on+0x79/0x100
[  493.774173]  exc_page_fault+0x343/0x720
[  493.774174]  ? asm_exc_page_fault+0x1e/0x30
[  493.774176]  ? asm_exc_page_fault+0x8/0x30
[  493.774178]  asm_exc_page_fault+0x1e/0x30
[  493.774180] RIP: 0033:0x414300
[  493.774181] Code: e8 d5 f5 fe ff 48 83 f8 ff 0f 84 9c 00 00 00 41 83 fd 02 48 89 c5 74 32 41 83 fd 03 74 74 49 63 c4 48 89 ea 66 0f 1f 44 00 00 <c6> 02 07 48 01 c2 48 89 d1 48 29 e9 48 39 cb 7f ef 31 c0 48 83 c4
[  493.774182] RSP: 002b:00007f17eb8ccec0 EFLAGS: 00010206
[  493.774184] RAX: 0000000000001000 RBX: 00000000c0000000 RCX: 000000000f7c5000
[  493.774185] RDX: 00007f12b888e000 RSI: 00000000c0000000 RDI: 0000000000000000
[  493.774185] RBP: 00007f12a90c9000 R08: ffffffffffffffff R09: 0000000000000000
[  493.774186] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000001000
[  493.774187] R13: 0000000000000001 R14: 0000000000000001 R15: 00007fffcfa8d4d0
[  495.792174] ------------[ cut here ]------------
[  495.792176] kernel BUG at kernel/locking/rtmutex.c:1057!
[  495.792181] invalid opcode: 0000 [#1] PREEMPT_RT SMP NOPTI
[  495.792184] CPU: 4 PID: 3466 Comm: kwin_x11 Kdump: loaded Tainted: G S          E     5.9.12-rt20-rt #21
[  495.792185] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013
[  495.792186] RIP: 0010:rt_spin_lock_slowlock_locked+0x29c/0x2b0
[  495.792191] Code: 88 d0 00 01 e8 a5 a5 76 ff e9 ce fe ff ff 48 8b 43 48 48 85 c0 74 06 48 3b 58 38 75 0f 49 39 c4 0f 85 69 ff ff ff 0f 0b 0f 0b <0f> 0b e8 ed 23 77 ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f
[  495.792192] RSP: 0000:ffffa2524328b598 EFLAGS: 00010086
[  495.792194] RAX: 00000000ffffffdd RBX: ffff8a33ded29d20 RCX: 0000000000000000
[  495.792195] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8a33ded29d20
[  495.792196] RBP: ffff8a337a651b40 R08: 0000000000000001 R09: 0000000000000000
[  495.792196] R10: ffffa2524328b4b8 R11: ffff8a33defd5000 R12: ffffa2524328b5e0
[  495.792197] R13: ffff8a337a651b40 R14: ffff8a337a6524d0 R15: 0000000000000282
[  495.792198] FS:  00007fb8d31f3d80(0000) GS:ffff8a33ded00000(0000) knlGS:0000000000000000
[  495.792199] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  495.792200] CR2: 00007efcde0bd020 CR3: 000000010755c005 CR4: 00000000001706e0
[  495.792201] Call Trace:
[  495.792205]  rt_spin_lock_slowlock+0x4b/0x70
[  495.792209]  rt_spin_lock+0x46/0xc0
[  495.792211]  ? zs_map_object+0x10d/0x3d0
[  495.792215]  zs_map_object+0x10d/0x3d0
[  495.792218]  zswap_frontswap_store+0x716/0xa50
[  495.792223]  __frontswap_store+0x6e/0x100
[  495.792225]  swap_writepage+0x37/0x70
[  495.792227]  pageout+0xd2/0x400
[  495.792232]  shrink_page_list+0xa6e/0xbd0
[  495.792237]  shrink_inactive_list+0x216/0x620
[  495.792242]  shrink_lruvec+0x39f/0x5e0
[  495.792249]  ? shrink_node+0x237/0x6e0
[  495.792250]  shrink_node+0x237/0x6e0
[  495.792254]  do_try_to_free_pages+0xb9/0x400
[  495.792256]  try_to_free_pages+0xe6/0x3b0
[  495.792261]  __alloc_pages_slowpath.constprop.108+0x3f8/0x1090
[  495.792263]  ? trace_hardirqs_on+0x35/0x130
[  495.792265]  ? asm_sysvec_call_function_single+0x12/0x20
[  495.792269]  ? trace_hardirqs_on+0x35/0x130
[  495.792271]  ? lock_acquire+0x201/0x420
[  495.792273]  ? _raw_spin_unlock_irqrestore+0x34/0x80
[  495.792275]  ? xas_descend+0x2e/0x120
[  495.792278]  __alloc_pages_nodemask+0x3f6/0x480
[  495.792281]  page_cache_readahead_unbounded+0x8a/0x200
[  495.792286]  filemap_fault+0x770/0xd50
[  495.792289]  ? filemap_map_pages+0x1e5/0x4f0
[  495.792292]  ext4_filemap_fault+0x2f/0x40 [ext4]
[  495.792315]  __do_fault+0x31/0x140
[  495.792318]  handle_mm_fault+0xf37/0x16f0
[  495.792323]  exc_page_fault+0x343/0x720
[  495.792326]  ? asm_exc_page_fault+0x8/0x30
[  495.792328]  ? asm_exc_page_fault+0x8/0x30
[  495.792330]  asm_exc_page_fault+0x1e/0x30
[  495.792331] RIP: 0033:0x7fb8d27439f6
[  495.792333] Code: ff ba ff ff ff ff f2 0f 10 05 ae cd 0a 00 48 39 d0 74 1f 48 8b 7b 28 e8 08 97 ea ff 48 85 c0 78 13 66 0f ef c0 f2 48 0f 2a c0 <f2> 0f 5e 05 72 3b 0c 00 5b c3 48 89 c2 66 0f ef c0 48 d1 ea 83 e0
[  495.792334] RSP: 002b:00007ffc24b74db0 EFLAGS: 00010246
[  495.792335] RAX: 0000000000000000 RBX: 0000564b8f45af90 RCX: 00007ffc24b74eb0
[  495.792336] RDX: 00000000ffffffff RSI: 00007fb8b4009920 RDI: 00007fb8b40020f0
[  495.792337] RBP: 0000564b8f379e90 R08: 0000000000000000 R09: 00007fb8d0a44360
[  495.792338] R10: 0000000000000001 R11: 0000000000000000 R12: 0000564b8f45af90
[  495.792338] R13: 00007ffc24b74e68 R14: 00007ffc24b74e78 R15: 0000000000000006
[  495.792343] Modules linked in: fuse(E) msr(E) xt_comment(E) ebtable_filter(E) ebtables(E) br_netfilter(E) xt_physdev(E) nfnetlink_cthelper(E) nfnetlink(E) af_packet(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) rfkill(E) xt_pkttype(E) xt_tcpudp(E) ip6t_REJECT(E) ipt_REJECT(E) iptable_filter(E) bpfilter(E) ip6table_mangle(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) libcrc32c(E) ip6table_filter(E) ip6_tables(E) x_tables(E) nls_iso8859_1(E) nls_cp437(E) joydev(E) intel_rapl_msr(E) usblp(E) intel_rapl_common(E) at24(E) x86_pkg_temp_thermal(E) iTCO_wdt(E) intel_powerclamp(E) iTCO_vendor_support(E) coretemp(E) mei_hdcp(E) kvm_intel(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) kvm(E) ledtrig_audio(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) ghash_clmulni_intel(E) snd_hda_codec_hdmi(E) aesni_intel(E) crypto_simd(E) cryptd(E) glue_helper(E) snd_hda_intel(E) snd_intel_dspcfg(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E)
[  495.792378]  pcspkr(E) snd_pcm(E) r8169(E) i2c_i801(E) snd_timer(E) i2c_smbus(E) lpc_ich(E) realtek(E) mdio_devres(E) snd(E) mei_me(E) libphy(E) soundcore(E) fan(E) thermal(E) mei(E) intel_smartconnect(E) tiny_power_button(E) sch_fq_codel(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) hid_logitech_hidpp(E) sr_mod(E) cdrom(E) hid_logitech_dj(E) ums_realtek(E) uas(E) usb_storage(E) hid_generic(E) usbhid(E) nouveau(E) wmi(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) ehci_pci(E) fb_sys_fops(E) ehci_hcd(E) cec(E) xhci_pci(E) ahci(E) rc_core(E) libahci(E) xhci_hcd(E) ttm(E) libata(E) drm(E) usbcore(E) video(E) button(E) sd_mod(E) t10_pi(E) vfat(E) fat(E) virtio_blk(E) virtio_mmio(E) virtio_ring(E) virtio(E) ext4(E) crc32c_intel(E) crc16(E) mbcache(E) jbd2(E) loop(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E)
[  495.792420] Dumping ftrace buffer:
[  495.792423]    (ftrace buffer empty)

bad magic
0xffffffff812bcf60 is in zswap_frontswap_store (mm/zswap.c:1087).
1082                    ret = -EINVAL;
1083                    goto freepage;
1084            }
1085
1086            /* compress */
1087            local_lock(&zswap_comp.lock);
1088            dst = *this_cpu_ptr(&zswap_comp.dstmem);
1089            tfm = *this_cpu_ptr(entry->pool->tfm);
1090            src = kmap_atomic(page);
1091            ret = crypto_comp_compress(tfm, src, PAGE_SIZE, dst, &dlen);

BUG()
0xffffffff812f6e90 is in zs_map_object (mm/zsmalloc.c:1401).
1396
1397            get_zspage_mapping(zspage, &class_idx, &fg);
1398            class = pool->size_class[class_idx];
1399            off = (class->size * obj_idx) & ~PAGE_MASK;
1400
1401            local_lock(&zs_map_area.lock);
1402            area = this_cpu_ptr(&zs_map_area);
1403            area->vm_mm = mm;
1404            if (off + class->size <= PAGE_SIZE) {
1405                    /* this object is contained entirely within a page */






[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux