Comment 28 for bug 1555237

Revision history for this message
Martin Pitt (pitti) wrote :

Mathieu found the culprit, many thanks! This is due to some cleanup code in udevd which wreaks havoc when not running under systemd, as it assumes that it runs in its own cgroup (normally /system.slice/systemd-udevd.service). src/udev/udevd.c on_post() has:

                       } else if (manager->cgroup)
                                /* cleanup possible left-over processes in our cgroup */
                                cg_kill(SYSTEMD_CGROUP_CONTROLLER, manager->cgroup, SIGKILL, false, true, NULL);

But under upstart processes don't run in cgroups, and hence manager->cgroup is (almost surely) "/" and thus it kills all running processes. We need to disarm this to only clean up if the cgroup is not empty.

This can be reproduced fairly easily:

  - Boot a trusty VM (cloud-image/autopkgtest image is fine)
  - Install udisks2
  - Change apt sources to xenial, install udev from xenial
  - apt-get install --reinstall udisks2

The last command triggers udev rules and causes most processes to get killed and restarted, which can be seen nicely in their startup time and in /var/log/syslog.