Bug#792398: hald fails to start
Package: hal Version: 0.5.14-8 Severity: normal Dear Maintainer, After upgrading from wheezy to jessie, hald fails to start from systemd, and also when trying to run it manually for debugging purposes. The problem seems to be caused by hald running /sbin/udevadm info -r, which causes udevadm to output a usage message and fail with exit code 2. On wheezy the same command prints /dev and completes without error (on a different machine). ~# systemctl status hal hal.service - Hardware Abstraction Layer Loaded: loaded (/lib/systemd/system/hal.service; enabled) Active: failed (Result: timeout) since Tue 2015-07-14 23:45:51 NZST; 36min ago Process: 16055 ExecStart=/usr/sbin/hald --daemon=no --use-syslog (code=exited, status=0/SUCCESS) Main PID: 16055 (code=exited, status=0/SUCCESS) Jul 14 23:44:21 legend hald[16055]: -e,--export-db export the content of the udev database Jul 14 23:44:21 legend hald[16055]: -c,--cleanup-db cleanup the udev database Jul 14 23:44:21 legend hald[16055]: --versionprint version of the program Jul 14 23:44:21 legend hald[16055]: -h,--help print this message Jul 14 23:44:21 legend hald[16055]: org.freedesktop.Hal.Device.Volume.UnknownFailure Jul 14 23:44:21 legend hald[16055]: Cannot open /media/.hal-mtab Jul 14 23:44:21 legend hald[16055]: in hal-storage-cleanup-all-mountpoints Jul 14 23:45:51 legend systemd[1]: hal.service start operation timed out. Terminating. Jul 14 23:45:51 legend systemd[1]: Failed to start Hardware Abstraction Layer. Jul 14 23:45:51 legend systemd[1]: Unit hal.service entered failed state. ~# /usr/sbin/hald --daemon=no --use-syslog --verbose=yes Runner started - allowed paths are '/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin' Usage: udevadm info [OPTIONS] [DEVPATH|FILE] -q,--query=TYPE query device information: name name of device node symlink pointing to node path sys device path property the device properties all all values -p,--path=SYSPATH sys device path used for query or attribute walk -n,--name=NAME node or symlink name used for query or attribute walk -r,--root prepend dev directory to path names -a,--attribute-walk print all key matches walking along the chain of parent devices -d,--device-id-of-file=FILE print major:minor of device containing this file -x,--export export key/value pairs -P,--export-prefix export the key name with a prefix -e,--export-db export the content of the udev database -c,--cleanup-db cleanup the udev database --versionprint version of the program -h,--help print this message Run started hal-storage-cleanup-all-mountpoints (2) (0) ! full path is '/usr/lib/hal/hal-storage-cleanup-all-mountpoints', program_dir is '/usr/lib/hal' in hal-storage-cleanup-all-mountpoints org.freedesktop.Hal.Device.Volume.UnknownFailure Cannot open /media/.hal-mtab pid 16709: rc=1 signaled=0: /usr/lib/hal/hal-storage-cleanup-all-mountpoints Run started hald-addon-cpufreq (0) (0) ! full path is '/usr/lib/hal/hald-addon-cpufreq', program_dir is '/usr/lib/hal' Run started hald-addon-acpi (0) (0) ! full path is '/usr/lib/hal/hald-addon-acpi', program_dir is '/usr/lib/hal' Relevant line from strace -f: 16494 execve(/sbin/udevadm, [/sbin/udevadm, info, -r], [/* 21 vars */]) = 0 16494 write(2, Usage: udevadm info [OPTIONS] [D..., 1113) = 1113 -- System Information: Debian Release: 8.1 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages hal depends on: ii adduser 3.113+nmu3 ii dbus 1.8.18-0+deb8u1 ii hal-info 20091130-1 ii libblkid1 2.25.2-6 ii libc6 2.19-18 ii libdbus-1-3 1.8.18-0+deb8u1 ii libdbus-glib-1-2 0.102-1 ii libexpat1 2.1.0-6+b3 ii libglib2.0-0 2.42.1-1 ii libhal-storage1 0.5.14-8 ii libhal1 0.5.14-8 ii libusb-0.1-4 2:0.1.12-25 ii lsb-base 4.1+Debian13+nmu1 ii mount 2.25.2-6 ii pciutils 1:3.2.1-3 ii udev 215-17+deb8u1 ii usbutils 1:007-2 Versions of packages hal recommends: ii consolekit 0.4.6-5 ii eject 2.1.5+deb1+cvs20081104-13.1 pn pm-utilsnone hal suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start
Thanks for the quick reply. That's unfortunate, as HAL is still required by the Adobe Flash plugin for playing DRM-protected video. On Wed, Jul 15, 2015 at 12:42 AM, Michael Biebl bi...@debian.org wrote: Am 14.07.2015 um 14:35 schrieb Karsten Sperling: Package: hal Version: 0.5.14-8 Severity: normal Dear Maintainer, After upgrading from wheezy to jessie, hald fails to start from systemd, and also when trying to run it manually for debugging purposes. The problem seems to be caused by hald running /sbin/udevadm info -r, which causes udevadm to output a usage message and fail with exit code 2. On wheezy the same command prints /dev and completes without error (on a different machine). Please uninstall and purge the hal/libhal* package. It's no longer needed and won't see further updates. It has been removed from the Debian archive since Jessie. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start
I don't know what exactly it's actually used for, but it's referenced here for example: https://forums.adobe.com/thread/1039743?start=0tstart=0 Essentially, NPAPI Flash will remain at version 11.x with security updates only, so they won't update it to remove the HAL dependency. Later versions are PPAPI only and shipped with Chrome only. I might try building HAL from source and see if I can work around that udevadm issue. On Wed, Jul 15, 2015 at 1:12 AM, Michael Biebl bi...@debian.org wrote: Am 14.07.2015 um 15:10 schrieb Karsten Sperling: Thanks for the quick reply. That's unfortunate, as HAL is still required by the Adobe Flash plugin for playing DRM-protected video. Wow, why the heck do they need hal for that which has been removed from basically every distro out there? -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Bug#792398: [Pkg-utopia-maintainers] Bug#792398: hald fails to start
Hi Michael, I've put together a patch that gets hald working on Jessie. udevadm info -r is no longer supported in udev = 186 because the /dev directory is hard-coded to /dev from that version onwards. The patch calls udevadm --version to check for this. I also had to update debian/hal.dirs to create /etc/hal/fdi/{preprobe,information} to get hald to start out of the box (plus I installed the hal-info package from wheezy). With these packages installed Flash DRM video plays successfully in Iceweasel via flashplugin-nonfree. This can be tested via an Adobe test page (instructions on https://helpx.adobe.com/flash-player/kb/protected-video-content-play.html) I don't know if it's feasible to add the hal packages back into Jessie for this use-case (I suspect everybody is happy to be rid of it); is it possible to deploy these to some sort of backports / contrib / ugly repository? Now that I've got it running (and my family can watch on demand TV again ;-) I might have a look if I can trace how the flash plugin is interacting with HAL and if it's possible to stub out the relevant calls somehow via either a fake hal service or client library. I've CCed in Bart Martens in case he has any thoughts on this issue? It would be nice if DRM video in flashplugin-nonfree would just work for normal users without having to install a custom HAL build by hand. Cheers, Karsten On Wed, Jul 15, 2015 at 1:43 AM, Karsten Sperling kars...@sperling.co.nz wrote: I don't know what exactly it's actually used for, but it's referenced here for example: https://forums.adobe.com/thread/1039743?start=0tstart=0 Essentially, NPAPI Flash will remain at version 11.x with security updates only, so they won't update it to remove the HAL dependency. Later versions are PPAPI only and shipped with Chrome only. I might try building HAL from source and see if I can work around that udevadm issue. On Wed, Jul 15, 2015 at 1:12 AM, Michael Biebl bi...@debian.org wrote: Am 14.07.2015 um 15:10 schrieb Karsten Sperling: Thanks for the quick reply. That's unfortunate, as HAL is still required by the Adobe Flash plugin for playing DRM-protected video. Wow, why the heck do they need hal for that which has been removed from basically every distro out there? -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? Description: Handle newer versions of udevadm where the /dev root is hard-coded. Author: Karsten Sperling kars...@sperling.co.nz --- a/hald/linux/coldplug.c +++ b/hald/linux/coldplug.c @@ -155,33 +155,56 @@ hal_util_init_sysfs_to_udev_map (void) { char *udevdb_export_argv[] = { /sbin/udevadm, info, -e, NULL }; + char *udevversion_argv[] = { /sbin/udevadm, --version, NULL }; char *udevroot_argv[] = { /sbin/udevadm, info, -r, NULL }; int udevinfo_exitcode; + int udevadm_version; UdevInfo *info = NULL; char *p; int len; sysfs_to_udev_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, udev_info_free); - /* get udevroot */ - if (g_spawn_sync (/, udevroot_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, + /* get udevadm version */ + if (g_spawn_sync (/, udevversion_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, udevinfo_stdout, NULL, udevinfo_exitcode, NULL) != TRUE) { - HAL_ERROR ((Couldn't invoke %s, udevroot_argv[0])); + HAL_ERROR ((Couldn't invoke %s, udevversion_argv[0])); goto error; } if (udevinfo_exitcode != 0) { - HAL_ERROR ((%s returned %d, udevroot_argv[0], udevinfo_exitcode)); + HAL_ERROR ((%s returned %d, udevversion_argv[0], udevinfo_exitcode)); goto error; } - - g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root)); - p = strchr(dev_root, '\n'); - if (p != NULL) - p[0] = '\0'; + udevadm_version = (int) g_ascii_strtoull(udevinfo_stdout, NULL, 10); g_free(udevinfo_stdout); + HAL_INFO ((udevadm version is %d, udevadm_version)); + + /* get udevroot. hard-coded to /dev in udev = 186 */ + if (udevadm_version = 186) { + g_strlcpy(dev_root, /dev, sizeof(dev_root)); + } else { + if (g_spawn_sync (/, udevroot_argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, + udevinfo_stdout, + NULL, + udevinfo_exitcode, + NULL) != TRUE) { + HAL_ERROR ((Couldn't invoke %s, udevroot_argv[0])); + goto error; + } + if (udevinfo_exitcode != 0) { + HAL_ERROR ((%s returned %d, udevroot_argv[0], udevinfo_exitcode)); + goto error; + } + + g_strlcpy(dev_root, udevinfo_stdout, sizeof(dev_root)); + p = strchr(dev_root, '\n'); + if (p != NULL) + p[0] = '\0'; + g_free(udevinfo_stdout); + } HAL_INFO ((dev_root is %s, dev_root)); /* get udevdb export */ hal.dirs Description: Binary data