Skip to main content
Topic: ran in to issues with earlyoom & zramen on runit (Read 874 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ran in to issues with earlyoom & zramen on runit

on runit, I came across issues with several services, specifically zramen and earlyoom ...

issue #1
zramen
upon boot, zramen creates a /dev/zram0 device, and after it it hangs, and doesn't give me a login prompt until i hit enter on the keyboard:
youtube #shorts of the issue with zramen

looking at /etc/runit/sv/zramen/run i notice that the run script has exec pause in it
Code: [Select]
#!/bin/sh
[ -r ./conf ] && . ./conf
zramen make
exec pause

and looking at /etc/runit/sv/zramen/finish it has
Code: [Select]
zramen toss

i am not entirely sure if the pause command is causing the issue or not, but running rsm to check my service statuses, i get the following output

Code: [Select]
rsm
> [rsm] - susanoo (/run/runit/service) - 16 services

   SERVICE              STATE   ENABLED   PID      COMMAND           TIME
 ✔ NetworkManager       run     true      926      NetworkManager    10 minutes
 ✔ acpid                run     true      944      acpid             10 minutes
 ✔ agetty-tty1          run     true      917      login -- kronikpi 10 minutes
 ✔ agetty-tty2          run     true      913      agetty            10 minutes
 ✔ agetty-tty3          run     true      914      agetty            10 minutes
 ✔ agetty-tty4          run     true      915      agetty            10 minutes
 ✔ agetty-tty5          run     true      918      agetty            10 minutes
 ✔ agetty-tty6          run     true      916      agetty            10 minutes
 ✔ alsa                 run     true      930      alsa              10 minutes
 ✔ avahi-daemon         run     true      947      avahi-daemon: run 10 minutes
 ✔ cronie               run     true      939      crond             10 minutes
 ✔ dbus                 run     true      928      dbus-daemon       10 minutes
 ✔ elogind              run     true      980      elogind           10 minutes
 ✔ ntpd                 run     true      1017     ntpd              10 minutes
 ✔ udevd                run     true      919      udevd             10 minutes
 ✔ zramen               run     true      945      pause             10 minutes

and i see that the zramen command is listed as pause, as far as im aware, pause waits for user input? can anyone please help me with this?

issue #2
earlyoom
upon installing earlyoom, and enabling it as a service, starting it, while logged in to the system, seems to work fine, but, after a reboot this is what happens: youtube #shorts of the earlyoom issue

the only way to get trough this issue that i have so far figured out, is to switch to a 2nd tty, and disable, stop, and unlink the service from the /run/runit/service dir

further to note, I'v asked about this on Artix Unofficial Matrix channel, and this does not seem to happen to the user who tried to help me out, but he used the xfce iso and used a virtual machine, but i'v used the base iso to install my system, I run my xorg session trough xinit, not trough a login manager, I'v not bothered yet with verifying that I do not have the issue with xfce, or if the issue exists on my base system setup trough a VM, i will try that further down the path of trying to debug this ...

please help, I know for a fact, that this does not happen on Suite66 with my hardware, and identical packages installed, as I use a script to install my system, so werther i use runit or suite66, the difference is only in the service files, and earlyoom and zramen work fine for me with suite66

Re: ran in to issues with earlyoom & zramen on runit

Reply #1
bump, I have modified my original post, to provide better detail on the issue, please help, thanks

Re: ran in to issues with earlyoom & zramen on runit

Reply #2
The zramen runit script seems incorrect. It is mean to simulate a oneshot script and since runit has no way of doing this the conventional hack is to use a pause command on the run script. However, I believe one should use the chpst command one doing this. I think the last line of the zramen script should be:
Code: [Select]
exec chpst -b zramen pause

As for earlyoom, output from services by default are logged onto /dev/tty1. I'm not really sure if it's expected for it to constantly print out the output every second or so. That kind of seems like the service is constantly failing and restarting but I'm not sure. You could always redirect the output somewhere else (like /dev/null if you don't care). As a sidenote, you probably can still login tty1. The console will just have a bunch of spam over it, but you should still be able to type in your username and password.

Re: ran in to issues with earlyoom & zramen on runit

Reply #3
thanks for the reply, new content of my modified zramen run script

Code: [Select]
#!/bin/sh
[ -r ./conf ] && . ./conf
zramen make
exec chpst -b zramen pause

but the content of sudo rsm is now
Code: [Select]
rsm
[sudo] password for kronikpillow:
> [rsm] - susanoo (/run/runit/service) - 17 services

   SERVICE              STATE   ENABLED   PID      COMMAND           TIME
 ✔ NetworkManager       run     true      943      NetworkManager    1 minute
 ✔ acpid                run     true      940      acpid             1 minute
 ✔ agetty-tty1          run     true      916      login -- kronikpi 1 minute
 ✔ agetty-tty2          run     true      917      agetty            1 minute
 ✔ agetty-tty3          run     true      915      agetty            1 minute
 ✔ agetty-tty4          run     true      919      agetty            1 minute
 ✔ agetty-tty5          run     true      918      agetty            1 minute
 ✔ agetty-tty6          run     true      920      agetty            1 minute
 ✔ alsa                 run     true      936      alsa              1 minute
 ✔ avahi-daemon         run     true      935      avahi-daemon: run 1 minute
 ✔ cronie               run     true      951      crond             1 minute
 ✔ dbus                 run     true      937      dbus-daemon       1 minute
 ✔ earlyoom             run     true      946      earlyoom          1 minute
 ✔ elogind              run     true      980      elogind           1 minute
 ✔ ntpd                 run     true      1021     ntpd              1 minute
 ✔ udevd                run     true      928      udevd             1 minute
 ✔ zramen               run     true      948      zramen            1 minute

hence it's command output is not pause anymore, you are correct about this but ... zramen still hangs the login prompt, should it maybe be in the single runlevel?

regarding earlyoom, i did redirect the output to /dev/null and that issue is solved with it, but now due to your post, i'm not even entirely sure, if earlyoom is actually working :-/

 

Re: ran in to issues with earlyoom & zramen on runit

Reply #4
finally got to the bottom of the problem, seems the login waiting for user input to get to login prompt was caused by acpid-runit, and all of the 3 above problems were solved by creating a log folder in the service specific directory