[OpenWrt-Devel] Bug Report: zram corrupts memory / misbehaves on ar71xx

Martin Tippmann martin.tippmann at gmail.com
Sat Jan 23 14:55:00 EST 2016


Hi, are here any other users of zram? We see some serious issues:

- application segfaults on memory pressure, without zram the OOM
killer is invoked but with zram random SIGSEVs starting to happen.
This happens also with light memory pressure e.g. when using luci.

Unfortunately I'm at loss how to debug this - I've switched on
CONFIG_DEBUG_VM and other memory related knobs unter make
kernel_menuconfig -> Kernel Hacking and changed the cmdline to add
debug but there are no messages that indicate any error.

I'm on trunk as of today on ar71xx (TP-LINK 841Nv8)

To reproduce:

- enable zram
- put a lot of memory pressure on the machine in a short time

While testing around I've discovered that lz4 for zram is broken -
this patch never got upstream and fixes the problem:
https://lkml.org/lkml/2014/7/21/736

Any ideas how to pinpoint this?

Here is a typical result with lots of segfaults (with
kernel.print-fatal-signals=1):

[  223.902219] do_page_fault(): sending SIGSEGV to netifd for invalid
write access to 00000000
[  223.910852] epc = 77398a6c in libc.so[7731c000+92000]
[  223.916159] ra  = 77398a6c in libc.so[7731c000+92000]
[  223.921440]
[  224.281923] potentially unexpected fatal signal 11.
[  224.286990] CPU: 0 PID: 1110 Comm: netifd Not tainted 4.1.15 #2
[  224.293176] task: 81932ef8 ti: 816f6000 task.ti: 816f6000
[  224.298750] $ 0   : 00000000 00000000 00000003 00000000
[  224.304450] $ 4   : 773a88ed ff456461 80808080 fefefeff
[  224.309887] $ 8   : f73abb54 00000000 00004000 8eac4000
[  224.315370] $12   : 0000000a 00000000 0000000e 00023ab1
[  224.320808] $16   : 773a88ed 773abb55 7fbe7048 7fbe6f50
[  224.326257] $20   : 00000000 773abb55 00000062 00400019
[  224.331687] $24   : 00000000 7738d8d0
[  224.337143] $28   : 773c6320 7fbe6ec8 7fbe7048 77398a6c
[  224.342821] Hi    : 0000003a
[  224.345799] Lo    : 00000012
[  224.348782] epc   : 77398a6c 0x77398a6c
[  224.352815] ra    : 77398a6c 0x77398a6c
[  224.356776] Status: 0100f413 USER EXL IE
[  224.360951] Cause : 0080000c
[  224.363953] BadVA : 00000000
[  224.366928] PrId  : 0001974c (MIPS 74Kc)
[  230.081537]
[  230.081537] do_page_fault(): sending SIGSEGV to sh for invalid read
access from 00000000
[  230.090122] epc = 00000000 in busybox[400000+46000]
[  230.095227] ra  = 00000000 in busybox[400000+46000]
[  230.100289]
[  230.791874] potentially unexpected fatal signal 11.
[  230.796942] CPU: 0 PID: 3982 Comm: sh Not tainted 4.1.15 #2
[  230.802763] task: 8071da18 ti: 81cc0000 task.ti: 81cc0000
[  230.808342] $ 0   : 00000000 00000001 00000f8f 00000000
[  230.814067] $ 4   : ffffffff 7fad75fc 00000000 00000000
[  230.819506] $ 8   : 00000000 80064f20 803c9154 803244d8
[  230.824962] $12   : 0000001a 00000013 0000000e 00000007
[  230.830626] $16   : 00000000 00000000 00000000 00000000
[  230.836100] $20   : 00000000 77fba000 7fad84f4 77fbd490
[  230.841529] $24   : 00000001 77f936c0
[  230.847122] $28   : 00000000 7fad75a8 00000000 00000000
[  230.852606] Hi    : 00000000
[  230.855580] Lo    : 00000007
[  230.858556] epc   : 00000000   (null)
[  230.862363] ra    : 00000000   (null)
[  230.866143] Status: 0100f413 USER EXL IE
[  230.870318] Cause : 00800008
[  230.873317] BadVA : 00000000
[  230.876449] PrId  : 0001974c (MIPS 74Kc)
[  244.728483] potentially unexpected fatal signal 11.
[  244.733635] CPU: 0 PID: 3976 Comm: ubusd Not tainted 4.1.15 #2
[  244.739663] task: 8071f430 ti: 81496000 task.ti: 81496000
[  244.745275] $ 0   : 00000000 00000000 2462ffff 779ba020
[  244.750739] $ 4   : 779ba000 00000001 779ba020 00000000
[  244.756405] $ 8   : 00000000 0000f400 00000011 85000014
[  244.761891] $12   : 00077469 00000000 00000000 6d656f75
[  244.767322] $16   : 779b29b0 779ba000 77a590b0 77a57538
[  244.772961] $20   : 77a54000 77a54000 7fdfaaf4 77a57490
[  244.778398] $24   : 00000000 779d0560
[  244.783873] $28   : 779ba020 7fdfaa30 00000000 7799dbf9
[  244.789312] Hi    : 00399e63
[  244.792307] Lo    : 49be433d
[  244.795285] epc   : 7799dce9 0x7799dce9
[  244.799322] ra    : 7799dbf9 0x7799dbf9
[  244.803335] Status: 0100f413 USER EXL IE
[  244.807510] Cause : 00800010
[  244.810485] BadVA : 24630003
[  244.813650] PrId  : 0001974c (MIPS 74Kc)
[  248.265148]
[  248.265148] do_page_fault(): sending SIGSEGV to mac80211.sh for
invalid write access to 2020202c
[  248.274339] epc = 77590968 in libc.so[7756a000+92000]
[  248.279598] ra  = 77591880 in libc.so[7756a000+92000]
[  248.284873]
[  248.301767] potentially unexpected fatal signal 11.
[  248.306897] CPU: 0 PID: 3977 Comm: mac80211.sh Not tainted 4.1.15 #2
[  248.313515] task: 8071e9c0 ti: 804f2000 task.ti: 804f2000
[  248.319086] $ 0   : 00000000 00000000 7760d9c8 20202020
[  248.324578] $ 4   : 7760b008 00000020 00000020 00000000
[  248.330016] $ 8   : fefefeff 80808080 00000008 65726661
[  248.335464] $12   : 65737469 00000000 00000000 6e617469
[  248.341107] $16   : 7760b008 7760b008 7760d9c8 00000020
[  248.346593] $20   : 7760f0b0 7760a000 7760d7c0 7760d7c0
[  248.352068] $24   : 00455454 775908cc
[  248.357651] $28   : 77614320 7ff50a48 775f6b00 77591880
[  248.363368] Hi    : 0000001a
[  248.366349] Lo    : 00000027
[  248.369331] epc   : 77590968 0x77590968
[  248.373331] ra    : 77591880 0x77591880
[  248.377290] Status: 0100f413 USER EXL IE
[  248.381465] Cause : 0080000c
[  248.384461] BadVA : 2020202c
[  248.387616] PrId  : 0001974c (MIPS 74Kc)
[  279.419245] potentially unexpected fatal signal 4.
[  279.424295] CPU: 0 PID: 3995 Comm: sh Not tainted 4.1.15 #2
[  279.430059] task: 81932ef8 ti: 81770000 task.ti: 81770000
[  279.435663] $ 0   : 00000000 7fc6f8e8 00000fa9 00000000
[  279.441099] $ 4   : 00000000 7fc6f8d8 00000000 00000000
[  279.446555] $ 8   : 00000000 00000000 00000002 00000000
[  279.452010] $12   : 7fc6f8e0 77b78320 00000000 00000000
[  279.457468] $16   : 77b730b0 77b71538 77b6e000 77b71538
[  279.462925] $20   : 77b6e000 77b6e000 7fc706d4 77b71490
[  279.468364] $24   : 00000000 77b42500
[  279.473820] $28   : 77b78320 7fc6f968 00000000 77acc010
[  279.479476] Hi    : 00600ddb
[  279.482503] Lo    : e9881a75
[  279.485650] epc   : 77acc018 0x77acc018
[  279.489622] ra    : 77acc010 0x77acc010
[  279.493629] Status: 0100f413 USER EXL IE
[  279.497798] Cause : 00800028
[  279.500775] PrId  : 0001974c (MIPS 74Kc)
[  282.257993] hotplug-call (3989) used greatest stack depth: 4144 bytes left
[  300.273027]
[  300.273027] do_page_fault(): sending SIGSEGV to logd for invalid
read access from 773c7008
[  300.281573] epc = 77442894 in libc.so[773e2000+92000]
[  300.286921] ra  = 77442780 in libc.so[773e2000+92000]
[  300.292201]
[  300.324363] potentially unexpected fatal signal 11.
[  300.329646] CPU: 0 PID: 3990 Comm: logd Not tainted 4.1.15 #2
[  300.335675] task: 818b9f50 ti: 81342000 task.ti: 81342000
[  300.341249] $ 0   : 00000000 00000001 00000001 00000034
[  300.346714] $ 4   : 7fb7961c 004e8041 00000004 00412dd8
[  300.352414] $ 8   : fefefeff 80808080 74657320 6c656674
[  300.358049] $12   : 65737420 00000000 00000000 73746163
[  300.363532] $16   : 773b0f70 0000003c 773c7000 00412ce0
[  300.368970] $20   : 00000001 00000004 0000005f 00412ca0
[  300.374481] $24   : 00411fc8 7742ecb0
[  300.379919] $28   : 7748c320 7fb79590 00000001 77442780
[  300.385395] Hi    : 00000000
[  300.388369] Lo    : 00000007
[  300.391350] epc   : 77442894 0x77442894
[  300.395346] ra    : 77442780 0x77442780
[  300.399311] Status: 0100f413 USER EXL IE
[  300.403530] Cause : 00800008
[  300.406681] BadVA : 773c7008
[  300.409662] PrId  : 0001974c (MIPS 74Kc)
[  314.624298]
[  314.624298] do_page_fault(): sending SIGSEGV to sh for invalid read
access from 00000000
[  314.632778] epc = 00000000 in busybox[400000+46000]
[  314.638146] ra  = 00000000 in busybox[400000+46000]
[  314.643266]
[  314.645284] potentially unexpected fatal signal 11.
[  314.650335] CPU: 0 PID: 4020 Comm: sh Not tainted 4.1.15 #2
[  314.656136] task: 8071da18 ti: 81f44000 task.ti: 81f44000
[  314.661712] $ 0   : 00000000 00000001 00000fb5 00000000
[  314.667168] $ 4   : ffffffff 7ffde66c 00000000 00000000
[  314.672625] $ 8   : 00000000 80064f20 803c9134 803244d8
[  314.678063] $12   : 0000001a 00000013 0000000e 00000007
[  314.683519] $16   : 77d2c410 77d2c410 00000004 77d2c640
[  314.689030] $20   : 77d2c400 77948000 7ffdf564 7794b490
[  314.694523] $24   : 00000001 779216c0
[  314.699961] $28   : 000001b1 7ffde618 00000000 00000000
[  314.705436] Hi    : 00000000
[  314.708411] Lo    : 00000009
[  314.711550] epc   : 00000000   (null)
[  314.715410] ra    : 00000000   (null)
[  314.719191] Status: 0100f413 USER EXL IE
[  314.723402] Cause : 00800008
[  314.726376] BadVA : 00000000
[  314.729353] PrId  : 0001974c (MIPS 74Kc)
[  341.837213]
[  341.837213] do_page_fault(): sending SIGSEGV to netifd for invalid
read access from 222c0a20
[  341.846034] epc = 7719a960 in libc.so[77136000+92000]
[  341.851299] ra  = 7719ae18 in libc.so[77136000+92000]
[  341.856617]
[  341.861891] potentially unexpected fatal signal 11.
[  341.867018] CPU: 0 PID: 4003 Comm: netifd Not tainted 4.1.15 #2
[  341.873159] task: 81a31f50 ti: 806ce000 task.ti: 806ce000
[  341.878732] $ 0   : 00000000 00000000 00000001 222c0a20
[  341.884217] $ 4   : 222c0a21 7fe4ec30 00000002 00000000
[  341.889654] $ 8   : 00000000 8046c636 61785f6d 70647522
[  341.895111] $12   : 2c203520 00000000 00000000 5d2c205b
[  341.900550] $16   : 77134af0 7fe4ec70 00000001 00425500
[  341.906044] $20   : 00000000 00000000 00000000 771a6340
[  341.911481] $24   : 00000000 77152560
[  341.916947] $28   : 771e0320 7fe4ec18 7719add0 7719ae18
[  341.922405] Hi    : 00452245
[  341.925379] Lo    : 1392c6bc
[  341.928359] epc   : 7719a960 0x7719a960
[  341.932345] ra    : 7719ae18 0x7719ae18
[  341.936310] Status: 0100f413 USER EXL IE
[  341.940485] Cause : 00800008
[  341.943483] BadVA : 222c0a20
[  341.946464] PrId  : 0001974c (MIPS 74Kc)

regards
Martin
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list