Re: swap_info_get: Bad swap offset entry 0200f8a7

From: huang ying
Date: Sat Oct 21 2017 - 12:08:05 EST


On Sat, Oct 21, 2017 at 9:07 AM, Christian Kujau <lists@xxxxxxxxxxxxxxx> wrote:
> On Fri, 20 Oct 2017, huang ying wrote:
>> > 4 May < Linux version 4.11.2-1-ARCH
>> > 4 Jun < Linux version 4.11.3-1-ARCH
>> > 7 Jul < Linux version 4.11.9-1-ARCH
>> > 4 Aug < Linux version 4.12.8-2-ARCH
>> > 24 Sep < Linux version 4.12.13-1-ARCH
>> > 158 Oct < Linux version 4.13.5-1-ARCH
>>
>> So you have never seen this before 4.11 like 4.10?
>
> Unfortunately the kernel logs for that machine only go back until May
> 2017 and I cannot tell if that hasn't happened before. I've seen these
> messages appear since then but didn't bother much. But as it now happens
> more frequently, I thought I should mention this to the list.
>
>> Which operations will trigger this error messages?
>
> I'm not able to reproduce it at will, but I suspect that memory pressure
> triggers these messages. The machine in question is an Lenovo Ideapad S10
> notebook running 24x7 and is equipped with 1 GB of RAM. Two Java processes
> are basically using up all the memory, so usually it tooks like this:
>
> ========================================
> $ free -m
> total used free shared buff/cache available
> Mem: 994 866 67 1 60 20
> Swap: 760 437 322
>
> $ zramctl
> NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
> /dev/zram0 lz4 248.7M 247M 92.3M 97.4M 2 [SWAP]
> ========================================
>
> I just assumed the message is triggered when the system is really low on
> memory and maybe zram is too slow to provide the memory requested. But
> that's just my layman's assumption :-) For example, today's message was
> emitted during the night:
>
>
> Oct 20 01:26:18 len kernel: [638973.207849] \
> swap_info_get: Bad swap offset entry 0200f8a7
>
>
> And here are the sysstat numbers for that time frame:
>
>
> $ sar -r -s 00:00 -e 02:00
> Linux 4.13.5-1-ARCH (len) 10/20/2017 _i686_ (2 CPU)
> 12:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty
> 12:10:06 AM 70076 948404 93.12 4 19004 1556176 86.58 376608 379408 220
> 12:20:02 AM 80488 937992 92.10 4 180404 1563952 87.01 380184 327736 5568
> 12:30:03 AM 83296 935184 91.82 4 137260 1569776 87.34 329512 330000 280
> 12:40:03 AM 65188 953292 93.60 4 21156 1571048 87.41 386644 389820 1144
> 12:50:03 AM 67512 950968 93.37 4 33452 1570628 87.38 378936 381580 1304
> 01:00:07 AM 65520 952960 93.57 4 24996 1573180 87.53 385396 386152 904
> 01:10:03 AM 66956 951524 93.43 4 35520 1572696 87.50 379548 379364 172
> 01:20:02 AM 67440 951040 93.38 4 88736 1569864 87.34 381764 370472 7080
> 01:30:03 AM 70048 948432 93.12 4 29212 1572504 87.49 383516 381900 1832
> 01:40:04 AM 71532 946948 92.98 4 29220 1570096 87.35 380120 380284 1000
> 01:50:03 AM 65828 952652 93.54 4 34408 1570604 87.38 381040 381028 1604
> Average: 70353 948127 93.09 4 57579 1569139 87.30 376661 371613 1919
>
>
> == If that is unreadable, here it is again: https://paste.debian.net/991927/
>
>> Is it possible for you to check
>> whether the error exists for normal swap device (not ZRAM)?
>
> I have "normal" (but encrpted) swap configured but with a lower priority:
>
> cat /proc/swaps
> Filename Type Size Used Priority
> /dev/dm-0 partition 524284 194348 0
> /dev/zram0 partition 254616 253536 32767
>
> I shall disable the zram device and disable encryption too and will report
> back if the message appears again.
>
>> 32bit or 64bit kernel do you use?
>
> I'm using an i686 kernel for this Atom N270 processor (with HT enabled).

Thanks for your information! I have reproduced your problem. They
are just false error message. I will fix that and send out the patch
soon.

Best Regards,
Huang, Ying