Control: retitle -1 dphys-swapfile: "setup" subcommand failure under systemd Control: tag -1 + moreinfo
Hi eHenry, eHenry Berg wrote: > My 32-bit (armhf) worked with dphys-swapfile in version 20100506-3. > My 64-bit (arm64) works with dphys-swapfile in version 20100506-3. > > Swap is not working after upgrde of my 32-bit (armhf) dphys-swapfile > to version 20100506-4. Hrm, I assume that both systems are running systemd. I've tested that package before uploading on Sid/arm64 with systemd, Sid/armhf with sysvinit and Raspbian/stretch with systemd. So the variant where you ran into issues wasn't in my test cases. But then again, I suspect this is no general issue but related to the specific environment. The main question is: What part of the environment did trigger the issue and was it triggered erroneously. > Warning: Journal has been rotated since unit was started. Log output > is incomplete or unavailable. Any chance that you can reproduce this case and check journalctl before the log is rotated away? (Or can you dig up the rotated away log or look up what happened in /var/log/syslog?) > Process: 403 ExecStart=/sbin/dphys-swapfile setup (code=exited, > status=1/FAILURE) > Main PID: 403 (code=exited, status=1/FAILURE) I can imagine that this happens (correctly) under the following circumstances: * A different size of the swapfile is requested and the system is swapping enough so that "swapoff" fails. Since "setup" calls "swapoff" first, if "swapoff" fails, "setup" will fail accordingly. * There's not enough diskspace anymore to create the swapfile. (But this case should actually be fixed 20100506-4.) Was any of this the case on your system when the error happened? > Test2: > # systemctl start dphys-swapfile.service > Job for dphys-swapfile.service failed because the control process > exited with error code. > See "systemctl status dphys-swapfile.service" and "journalctl -xe" for > details. > # systemctl status dphys-swapfile.service // Same error message as above > # cat /proc/swaps > Filename Type Size Used > Priority > # > Swap is not working! // I tried also to erase row > "ExecStart=/sbin/dphys-swapfile swapon" in dphys-swapfile.service, but > same error message as above. Can you post the "journalctl -xe" output from this test. That might contain a hint to the real cause. > Test3: > # /sbin/dphys-swapfile setup > want /var/swap=1024MByte > # /sbin/dphys-swapfile swapon > # cat /proc/swaps > Filename Type Size Used > Priority > /var/swap file 1048572 256 -2 > # > Swap works! // Swap works even without command "/sbin/dphys-swapfile > setup" Interesting. Any idea how long "/sbin/dphys-swapfile setup" ran? According to systemd.service(5), "when Type=oneshot is used, […] the timeout is disabled by default", so it shouldn't be any timeout issue. But maybe I've missed another type of timeout. > Test4: > Solution: > # nano -w /lib/systemd/system/dphys-swapfile.service > ExecStart=-/sbin/dphys-swapfile setup // Old: > ExecStart=/sbin/dphys-swapfile setup > Restart computer! > Swap works! I wouldn't call this a solution since it just ignores the exit code which likely means that an error happened and should be fixed. Other questions: * Did this happen directly after the initial installation or after an upgrade? * Did you change the wanted size of the swapfile recently, i.e. since the last reboot but before the (suspected) upgrade? * Can you reproduce this issue if you do a fresh installation? Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE