-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freezing on non-systemd GNU/Linux distributions when activated by udev #210
Comments
Fixed in e55e6e7 |
It turns out the commit e55e6e7 didn't actually fix the problem. I investigated this a bit further and found that the problem may be in one of the functions in https://github.com/libimobiledevice/usbmuxd/blob/master/src/usb.c. I don't remember which one exactly; the corresponding logs will be attached later.
To deal with 1. we need to provide the actual OpenRC service file and implement udev activation via it. I've already done, so wait for the draft PR shortly after the publication of this comment. |
The issue on the Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=910706 |
This commit adds a service script for an OpenRC init system. It intends to mitigate "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to mitigate "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to mitigate "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to mitigate "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to mitigate "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to mitigate a "race" caused by a start of long-living process (that is `usbmuxd` itself) by udev rules, which is highly discouraged by the `udev` manpage: "Starting daemons or other long-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished." There is a bug in `usbmuxd`, which causes the hang, but this is to be handled in a different commit. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a service script for an OpenRC init system. It intends to conform more closely to the way services are started by udev. usbmuxd detaches and daemonises itself correctly, yet the fact that its execution skips an init system results in a rather low level of integration with the running system. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
This commit adds a usbmuxd service script for the OpenRC init system. It intends to conform more closely to the way services are started by udev. Previously, on non-systemd systems, udev would start the `usbmuxd` binary directly. This commits makes udev start `usbmuxd` in a much cleaner way, by using the OpenRC service manager. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
Gentoo GNU/Linux. I suppose it is because of some kind of data race when it gets executed twice in a very short amount of time. Relevant code snippet from udev rule:
The latter follows the former almost immediately, causing some kind of a data race (I guess).
Got it working by applying the next fix (simply removed the run part when device is added):
The text was updated successfully, but these errors were encountered: