Inconsistent "swap exited 128" error 16 July 2021, 19:57:45 I sometimes (but not always) get:Code: [Select]swapon: cannot open /dev/zram0: No such file or directory[don't remember]: swap exited 128whenever I boot my system. swapon doesn't report /dev/zram0 being enabled. After boot is finished, running swapon -a enables /dev/zram0 without complaints.I suspect this might be related to the fact that I enable ZRAM using a modules-load + udev rule, but I don't know how to confirm this (e. g. checking if running the modules service after swap causes the problem).EDIT: using zramen could be an option, but the package doesn't seem to come with a /etc/s6/config/zram.conf. Last Edit: 16 July 2021, 20:09:45 by capezotte
Re: Inconsistent "swap exited 128" error Reply #1 – 16 July 2021, 20:55:19 Perhaps the swap oneshot needs an explicit dependency on udevadm?
Re: Inconsistent "swap exited 128" error Reply #2 – 17 July 2021, 05:20:00 Tried adding udevadm to /etc/s6/sv/swap/dependencies and running /usr/share/libalpm/scripts/s6-rc-db-update-hook, but error still appears.I'll try doing the same for modules and report.
Re: Inconsistent "swap exited 128" error Reply #3 – 17 July 2021, 17:33:01 Making swap depend on either modules by itself or modules and udevadm fixes "cannot open /dev/zram0", but swap still exits 128 due to "/dev/zram0: read swap header failed" sometimes. swapon -a still works after boot is finished, so I'm guessing swap runs before udev applies my "run mkswap" rule.I've seen reports from other s6 users that adding an udevadm dependency is unreliable (probably due to lack of readiness notification), so I guess I'll have to live with that. Or write my own zramen with blackjack and execline.I don't remember this happening back when I used 66, though I can't tell whether this is luck, or if 66 is actually doing something different.
Re: Inconsistent "swap exited 128" error Reply #4 – 17 July 2021, 18:37:30 Actually, try resetting everything to the default (AKA reinstall s6-scripts) and then try this:/etc/s6/sv/mount-filesystems/dependencies:Code: [Select]modulesmount-tmpfsudevadm/etc/s6/sv/modules/dependencies:Code: [Select]mount-procfsudevadmCompile a new database with the hook and give that whirl. 1 Likes
Re: Inconsistent "swap exited 128" error Reply #5 – 17 July 2021, 19:21:13 That seemed to do the trick. Thank you!
Re: Inconsistent "swap exited 128" error Reply #6 – 17 July 2021, 19:26:58 Cool, now I just need to remember why modules currently has remount-root in the dependencies. I can't remember if modprobe actually requires write permissions or not. Hopefully not otherwise that will throw a wrench in things. I'll test that in a bit.
Re: Inconsistent "swap exited 128" error Reply #7 – 17 July 2021, 20:54:33 sudo bwrap --ro-bind / / modprobe loop (for example) works here, so I'm guessing no. (also the fact that my system boots and can load zram).However, I don't know if the fact that I'm "simulating" a readonly filesystem using a mount namespace will change something.
Re: Inconsistent "swap exited 128" error Reply #8 – 17 July 2021, 23:20:48 Seems to be fine so I'll go ahead and push the changes.