Bug 1295979 - udev_enumerate_scan_devices() broken when used with udev_enumerate_add_match_parent()
udev_enumerate_scan_devices() broken when used with udev_enumerate_add_match_...
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-01-05 19:15 EST by Christian Krause
Modified: 2016-01-13 13:56 EST (History)
8 users (show)

See Also:
Fixed In Version: systemd-222-12.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-10 14:24:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Small C program which demonstrates the problem. (1.39 KB, text/x-csrc)
2016-01-05 19:15 EST, Christian Krause
no flags Details

  None (edit)
Description Christian Krause 2016-01-05 19:15:19 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[1339]: add usb-003-005
udev-configure-printer[1339]: device devpath is /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.6
udev-configure-printer[1339]: 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):

How reproducible:

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

Actual results:
udev scan_devices returned: -2

Expected results:
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

Additional info:
The bug is already fixed in systemd-228:


Please consider to cherry-pick this commit also for Fedora 23.
Comment 1 Fedora Update System 2016-01-08 04:47:48 EST
systemd-222-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aae4b3b916
Comment 2 Fedora Update System 2016-01-08 23:27:10 EST
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
Comment 3 Fedora Update System 2016-01-10 14:23:56 EST
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.

Note You need to log in before you can comment on or make changes to this bug.