Bug 198617

Summary: zswap causing random applications to crash
Product: Memory Management Reporter: kolorafa (kernel_org)
Component: Page AllocatorAssignee: Andrew Morton (akpm)
Status: NEW ---    
Severity: normal CC: dos, kernel_org, taz.007, willem.mobach
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.14.15 Subsystem:
Regression: No Bisected commit-id:

Description kolorafa 2018-01-30 19:01:52 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=104709
https://bugs.kde.org/show_bug.cgi?id=389542

I did have zswap enabled for a long while, and a lot of wine games, plasmashell, xorg, kwin_x11 (and other) did crash randomly when reached 100% of physical ram and swap was like almost never used.

I could esilly open a lot of browser tabs and the browser or xorg would fail every time.

After disabling zswap no crashes at all.

/etc/systemd/swap.conf
zswap_enabled=1
zswap_compressor=lz4      # lzo lz4
zswap_max_pool_percent=25 # 1-99
zswap_zpool=zbud          # zbud z3fold
Comment 1 Sebastian Krzyszkowiak 2018-02-04 20:29:33 UTC
I have just figured out independently that zswap was causing random crashes for me as well (and that's how I found this bug). It had started somewhat recently, as I've been using zswap for quite a long time and crashes started appearing only somewhere in the last two months or so. At one point I've suspected hardware failure, but thankfully, it was still crashing when run on another PC :P

Every day I would find bunch of segfaults reported in dmesg, usually some background services, but occasionally taking down my browser, desktop or even complete X session. Now with zswap disabled it runs for the third day without a single segfault; however, as I have only 8GB RAM, the lack of zswap is somewhat noticeable.
Comment 2 Willem Mobach 2023-02-21 23:20:33 UTC
I'm not using an upstream kernel - but I just want to confirm this still seems to be the case for me. Like kolorafa, browser seems especially sensitive, specifically Firefox.

5.19.0-32-generic / z3fold / compressor lz4 & zstd makes no difference.