Hi! Some days ago I tried to use zram as a swap space. After big memory consumption I have a crash with message: BUG: unable to handle kernel paging request at fff7e000 I can't attach a kernel log because system was crashed with kernel bug report in text console. I have only photo screenshot and some sar reports. The zram swap device was created by this commands in /etc/rc.local: modprobe -v zram num_devices=1 echo $((2048*1024*1024)) > /sys/block/zram0/disksize echo 1 > /sys/block/zram0/queue/nomerges mkswap /dev/zram0 swapon -p 0 /dev/zram0 I have a 4 GB of RAM and use a 32-bit kernel 3.6.
Created attachment 85571 [details] photo screenshot of crash
Created attachment 85581 [details] dmesg
Created attachment 85591 [details] dmidecode
Created attachment 85601 [details] lspci
Created attachment 85611 [details] SAR report of memory consumption
Created attachment 85621 [details] SAR report of swap consumption
Created attachment 85631 [details] grep zram from syslog
This may already be fixed in v3.7 with this patch: $ git show --format=full c8f2f0db commit c8f2f0db1d0294aaf37e8a85bea9bbc4aaf5c0fe Author: Nitin Gupta <ngupta@vflare.org> Commit: Greg Kroah-Hartman <gregkh@linuxfoundation.org> staging: zram: Fix handling of incompressible pages Please see if incorporating this patch fixes the issue.
Unfortunately this patch was already applied.
I found previous built kernel 3.5.4 and tested it. The crash is not occured in this kernel
Created attachment 86831 [details] Patch to fix a crash in zram Patch to properly handle incompressible page and partial I/O cases. Testing done: - created zram of size 1200m - created ext4 fs on /dev/zram0 - iozone -a -g 1G
I was experiencing very same problem since 3.6.5 - since this version introduced a "fix" for incompressible pages, but the "fix" had problems. I can confirm that the patch from comment #11 resolves the issue entirely. Tested on 3.6.7.
3.6.7. The patch works. Thanks.
The patch from Nitin fixes this critical error but yet it was not accepted to Kernel mainline. What's wrong with the kernel guys? Does anybody know who should I contact from the kernel guys to politely ask him (kick him in the ass) to accept the fix ?? There are people who fix bugs in kernel and the kernel developers simply ignore it, that doesn't seem like a good practice to me.
The patch from comment #11 works for me too (on 3.7.1). Thank you!
The fix has been accepted and will be present in next stable releases.
A patch referencing this bug report has been merged in Linux v3.8-rc4: commit 397c60668aa5ae7130b5ad4e73870d7b8a787085 Author: Nitin Gupta <ngupta@vflare.org> Date: Wed Jan 2 08:53:41 2013 -0800 staging: zram: fix invalid memory references during disk write