You are not logged in.

#1 2018-03-16 02:18:40

Dornith
Member
Registered: 2013-02-19
Posts: 78

"Read-error on swap-device" when exiting out of suspend

This has happened twice now, with almost identical symptoms and error logs.
I suspend my computer for a few hours.  When I come back, X11 has crashed.  I run startx again, check dmesg and get this error in the log:

[238003.651358] PM: suspend exit
[238003.665387] Read-error on swap-device (8:0:1946490879)
[238003.665405] Read-error on swap-device (8:0:1946490887)
[238003.670412] Read-error on swap-device (8:0:1946490079)
[238003.685033] Read-error on swap-device (8:0:1946300343)
[238003.685192] Read-error on swap-device (8:0:1946300175)
[238005.642253] r8168: enp4s0: link up
[238007.825864] ata1: link is slow to respond, please be patient (ready=0)
[238007.868826] ata4: link is slow to respond, please be patient (ready=0)
[238009.792837] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[238009.796323] ata4.00: configured for UDMA/100
[238012.557844] ata1: COMRESET failed (errno=-16)
[238014.424874] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[238014.562306] ata1.00: configured for UDMA/133
[238015.516987] nvidia-modeset: Freed GPU:0 (GPU-384f9c3d-d599-9f59-c9b8-258f27d36f75) @ PCI:0000:01:00.0
[238022.138408] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
[238022.138565] caller _nv001170rm+0xe3/0x1d0 [nvidia] mapping multiple BARs
[238022.436482] nvidia-modeset: Allocated GPU:0 (GPU-384f9c3d-d599-9f59-c9b8-258f27d36f75) @ PCI:0000:01:00.0

I've checked the swap partition and it seems to be running fine:

$ sudo swapoff -a
$ lsblk -f | grep swap
├─sda8 swap                     ae72e5d2-95d4-41e8-b0b1-ba2d3db92041
$ mkswap -c /dev/sda8
0 bad pages
mkswap: /dev/sda8: warning: wiping old swap signature.
Setting up swapspace version 1, size = 4.7 GiB (5000933376 bytes)
no label, UUID=096e2964-e139-4c03-9d3a-37683c059c5e
$ sudo swapon -a

I've looked around a bit but can't find a direct answer for why this is happening.

Offline

#2 2018-03-19 11:36:19

Supersonic
Member
Registered: 2018-03-19
Posts: 1

Re: "Read-error on swap-device" when exiting out of suspend

The same problem has just happened to me for the fourth time in about 3-4 weeks. I have a theory on what might play a role in causing it, but currently no time to test it:
* this might happen more often, but still not always, when there is something in the swap when going to standby (I have not checked precisely how much, but my taskbar always shows about 1% swap usage these days, so that might be enough to increase the likelihood of a crash)
* my swap is encrypted, but that should not be problem since the encrypted disk stays mounted throughout the crash
* once or twice I've also seen a graphics card related XID error (it might have been 79, but don't take my word on it, it was more than a week ago and the error only showed up for a few seconds)
* inconvenient side note: the crash makes systemd restart the whole user session, which explicitly kills all tmux and screen sessions opened from there, even ones for the root user

Some details on my system (in case these are also relevant):
* processor: first generation i7
* ram: 16GB, encrypted swap: 15GB (similar to you, 'mkswap -c' did not find any errors)
* graphics card: Nvidia gtx-750ti
* kernel: 4.15.8-1
* dm/wm: lightdm, herbstluftwm

Offline

#3 2018-04-10 15:17:08

Magnesium
Member
Registered: 2016-11-08
Posts: 19

Re: "Read-error on swap-device" when exiting out of suspend

Finally found someone with this same problem.
After resuming, the session is ended, returning to display manager.
I have to use hybrid sleep so when the fail occurs, there are a copy of it on swap partition...

Here is what dmesg returns:

[36124.946085] PM: suspend exit
[36125.036078] Read-error on swap-device (8:0:67154840)
[36125.041210] Read-error on swap-device (8:0:67154392)
[36126.239944] Corrupted low memory at 00000000a9ddb825 (9ce0 phys) = a000000000000000
[36126.239950] Corrupted low memory at 0000000057dde89c (9ce8 phys) = 0b030038
[36126.547606] r8169 0000:07:01.0 enp7s1: link up
[36129.763797] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[36130.618903] ata3.00: configured for UDMA/133

I have too this problem of "Corrupted low memory". It appeared some months ago but I dont remember if together with this suspend problem.

Offline

#4 2018-04-10 17:58:26

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: "Read-error on swap-device" when exiting out of suspend

You should check the (old) xorg log and will likely find sth. like

[352104.321] (EE) 
[352104.321] (EE) Backtrace:
[352104.340] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x139) [0x5568c747be99]
[352104.341] (EE) 1: /usr/lib/libpthread.so.0 (funlockfile+0x50) [0x7fa8ab029e1f]
[352104.342] (EE) 2: /usr/lib/libpixman-1.so.0 (pixman_composite_glyphs+0x636) [0x7fa8ac09ded6]
[352104.343] (EE) 3: /usr/lib/libpixman-1.so.0 (pixman_image_composite32+0x451) [0x7fa8ac059ca1]
[352104.357] (EE) 4: /usr/lib/xorg/modules/libwfb.so (wfbComposite+0x208) [0x7fa8a4eeda08]
[352104.364] (EE) 5: /usr/lib/libnvidia-glcore.so.390.42 (nvidiaAddDrawableHandler+0x592cf7) [0x7fa8a5eb998e]

?

Offline

#5 2018-04-11 10:53:28

Magnesium
Member
Registered: 2016-11-08
Posts: 19

Re: "Read-error on swap-device" when exiting out of suspend

seth wrote:

You should check the (old) xorg log and will likely find sth. like

[352104.321] (EE) 
[352104.321] (EE) Backtrace:
[352104.340] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x139) [0x5568c747be99]
[352104.341] (EE) 1: /usr/lib/libpthread.so.0 (funlockfile+0x50) [0x7fa8ab029e1f]
[352104.342] (EE) 2: /usr/lib/libpixman-1.so.0 (pixman_composite_glyphs+0x636) [0x7fa8ac09ded6]
[352104.343] (EE) 3: /usr/lib/libpixman-1.so.0 (pixman_image_composite32+0x451) [0x7fa8ac059ca1]
[352104.357] (EE) 4: /usr/lib/xorg/modules/libwfb.so (wfbComposite+0x208) [0x7fa8a4eeda08]
[352104.364] (EE) 5: /usr/lib/libnvidia-glcore.so.390.42 (nvidiaAddDrawableHandler+0x592cf7) [0x7fa8a5eb998e]

?

next time I will check my Xorg.0.log and Xorg.0.log.old
(at this moment, no EE flag at all)

Offline

#6 2018-04-11 14:18:55

Magnesium
Member
Registered: 2016-11-08
Posts: 19

Re: "Read-error on swap-device" when exiting out of suspend

Again, resuming from suspend killed the session but this time, the error  "Read-error on swap-device" does not appeared. We can see "Corrupted low memory" again.
About BTRFS error: prior to setting btrfs in my disk, I already had the problem - not the guilt one.

(((dmesg output)))

[17427.386136] OOM killer enabled.
[17427.386137] Restarting tasks ... done.
[17427.389247] PM: suspend exit
[17427.392353] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 60, flush 0, corrupt 0, gen 0
[17427.392389] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 61, flush 0, corrupt 0, gen 0
[17427.392401] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 62, flush 0, corrupt 0, gen 0
[17427.393369] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 63, flush 0, corrupt 0, gen 0
[17427.397085] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 64, flush 0, corrupt 0, gen 0
[17427.397129] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 65, flush 0, corrupt 0, gen 0
[17427.397141] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 66, flush 0, corrupt 0, gen 0
[17427.397153] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 67, flush 0, corrupt 0, gen 0
[17427.397163] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 68, flush 0, corrupt 0, gen 0
[17427.397172] BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 69, flush 0, corrupt 0, gen 0
[17428.982578] r8169 0000:07:01.0 enp7s1: link up
[17432.206986] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[17433.087114] ata3.00: configured for UDMA/133
[17449.106589] Corrupted low memory at 000000008ee7978c (9ce0 phys) = a000000000000000
[17449.106595] Corrupted low memory at 00000000d43ed837 (9ce8 phys) = 0b030038
[17520.439791]

Offline

#7 2018-04-24 12:57:09

Magnesium
Member
Registered: 2016-11-08
Posts: 19

Re: "Read-error on swap-device" when exiting out of suspend

increased my swap partition from 6GiB to 8GiB (my ram is 6GiB) as recommended and seems the problem is gone. Two days and suspended/hibernated around 13 times. No more  "Read-error on swap-device" showed up. Hope the system continues flawless as always arch worked for me.

Offline

#8 2018-07-20 14:06:29

sourcejedi
Member
Registered: 2018-04-04
Posts: 8

Re: "Read-error on swap-device" when exiting out of suspend

There is a bug which causes this introduced in upstream kernel v4.14, which was fixed in v4.17 and v4.16.8.  If the Xorg.log shows that the crash is a "bus error" and not a "segmentation fault", it is almost certainly the same problem.

https://git.kernel.org/pub/scm/linux/ke … d4c22bf7b6

The previous arch forum thread on it is here:

https://bbs.archlinux.org/viewtopic.php?id=235027

"Read-error on swap-device" during resume is a *possible* signature for this error (but this error message could be caused by other things, and most of the time this crash was quite silent, at least for me).  For examples where this message happened, see:

https://askubuntu.com/questions/1035208 … ap-device/

https://bugzilla.redhat.com/show_bug.cgi?id=1553979#c29

The "BTRFS error" is consistent with the "EXT4-fs error" which is also noted in the last link.

Last edited by sourcejedi (2018-07-20 14:10:12)

Offline

#9 2018-07-20 14:40:36

sourcejedi
Member
Registered: 2018-04-04
Posts: 8

Re: "Read-error on swap-device" when exiting out of suspend

If you still do not have a new enough kernel, and you don't want to install an older kernel (switch to the linux-lts package mentioned in the Arch thread?), there is a workaround.

Add the option "scsi_mod.scan=sync" to the end of your kernel command line e.g. in GRUB.

Last edited by sourcejedi (2018-07-20 14:52:53)

Offline

Board footer

Powered by FluxBB