Red Hat Bugzilla – Bug 1295979
udev_enumerate_scan_devices() broken when used with udev_enumerate_add_match_parent()
Last modified: 2016-01-13 13:56:23 EST
Created attachment 1111983 [details]
Small C program which demonstrates the problem.
Description of problem:
When I boot my system having the USB printer already attached I see the following error messages in syslog:
udev-configure-printer: add usb-003-005
udev-configure-printer: device devpath is /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6
udev-configure-printer: udev_enumerate_scan_devices failed
The root cause is in systemd's libudev:
At least in version 222, udev_enumerate_scan_devices() does not work properly together with udev_enumerate_add_match_parent().
Version-Release number of selected component (if applicable):
Steps to reproduce:
- either have a supported USB printer attached at bootup or alternatively use the attached test program to check for the API misbehaviour:
1. gcc -Wall -o udev_test udev_test.c -ludev
2. ./udev_test /sys/bus/usb/devices/3-1.6
udev scan_devices returned: -2
Device Path: /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6
Device Path: /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6/3-1.6:1.0
Device Path: /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6/3-1.6:1.0/usbmisc/lp0
The bug is already fixed in systemd-228:
Please consider to cherry-pick this commit also for Fedora 23.
systemd-222-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aae4b3b916
systemd-222-12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-aae4b3b916
systemd-222-12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.