RE: initialization vs supervision

From: James Powell <>
Date: Thu, 24 Jul 2014 02:08:36 +0000

I doubt we could really benefit from udev being ran in stage-2, but I would like to try it, however this is at the butt-end of my to-do-list.

> Date: Thu, 24 Jul 2014 04:49:48 +0300
> From:
> To:
> Subject: Re: initialization vs supervision
> Hi!
> On Thu, Jul 24, 2014 at 01:42:19AM +0100, Laurent Bercot wrote:
> > > Now granted some things are not able to be supervised such as udev on
> > > my end. But honestly, does udev really require supervision?
> > Yes, it does - why wouldn't it ? Or, if it doesn't, why would any
> > other service ?

To be honest, I'm not sure how it could be supervised since by it's own actions it's a device supervision daemon anyway. Do we need supervision for a supervision daemon? Good question, and I won't answer.

> Any other service needed to keep system running and doing it's work, so I
> didn't wanna wake up in the middle of the night just to start WEB or SQL
> or EMAIL or DNS or CRON services if they've crashed. And I don't wanna lose
> access to server if SSH or GETTY services crash and won't restart
> automatically. But what's the point in bothering so much about udev?

Udev really is a daemon all to itself because it sits quietly managing devices as they enter and leave the system state. To be honest, udev (eudev-1.9 on my end currently) crashes maybe 0.00001% of the time, which for me has been only once in the past 5 years.

> udevd is only service started from /etc/runit/1. And, honestly, I think
> it's much simpler to just kill it at end of /etc/runit/1 and (re-)start it
> as a normal service when /etc/runit/2 will be executed, than try to
> fork/delay parts of /etc/runit/1 - because most of other normal services
> expect all parts of /etc/runit/1 already done before they'll start.

Actually do we need to kill it at all and just execute the recheck mode in stage-2, udevadm?

/bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \
         while read line ; do
                  for subsystem in $line ; do
                            /sbin/udevadm trigger --subsystem-match=$subsystem --action=add

> And I'll implement this right after udevd will crash for the first time.
> Not because I think it's special and don't need supervision, but just
> because I'm usually have other, more important things to do, than forcing
> supervising to all and every service.
> At a glance at pstree output there a lot of other things which isn't run
> under runsv:
> - mount.ntfs-3g
> * this one uses FUSE and it's started by mount command - is it makes
> sense or even possible to supervise it?

FUSE usually is handled by the kernel and udev I think and the checkfs triggers in stage-1.

> - usbhid-ups
> * not sure what's this - I'm running upsmon and upsd services, both
> live under runsv, probably someone of them has forked this process

I have seen scripts for upsmon and upsd, but I'm not certain of their functionality benefits.

> - console-kit-daemon
> - polkitd
> * I didn't run this crap, probably it was automatically started by dbus
> or some GUI apps

Console-kit-daemon is entirely optional as a service. Most desktops can run --with-ck-launch such as startxfce4 and ck-launch-session by startkde.

>- gpg-agent
> - ssh-agent
> * these was run from ~/.xinitrc because I needed to import ENV vars they
> provide - maybe it's possible to turn them into user-specific
> services, not sure
> - dbus-launch
> - dbus-daemon
> - at-spi-bus-launcher
> - at-spi2-registryd
> * I'm running dbus-daemon under runsv, and have no idea about these
> processes - probably they was either forked by supervised dbus-daemon
> or started by GUI apps

I think those are forked, but I might not be sure.

> - gconfd-2
> - xfconfd
> * I've no idea about these, also probably started by GUI apps
Looks to be Xfce4 related.

> - compton
> * that's simple compositor for X11, started from ~/.xinitrc, probably
> can be supervised - but there are actually a lot of similar background
> apps started from ~/.xinitrc but didn't detached from their parent and
> thus didn't noticeable in pstree output - parcellite, xxkb, unclutter,
> conky, even goldendict or pidgin may be treat as "services" and run
> under supervisionů if this makes any sense.
> - pulseaudio
> * crap needed only for latest skype and started by it

I never installed it.

> So, how udevd is more important to supervise than all these apps/services?
> --
> WBR, Alex.
Received on Thu Jul 24 2014 - 02:08:36 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC