Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1295979 - udev_enumerate_scan_devices() broken when used with udev_enumerate_add_match_parent()
Summary: udev_enumerate_scan_devices() broken when used with udev_enumerate_add_match_...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-06 00:15 UTC by Christian Krause
Modified: 2016-01-13 18:56 UTC (History)
8 users (show)

Fixed In Version: systemd-222-12.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-10 19:24:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Small C program which demonstrates the problem. (deleted)
2016-01-06 00:15 UTC, Christian Krause
no flags Details

Description Christian Krause 2016-01-06 00:15:19 UTC
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:
https://github.com/systemd/systemd/commit/9a9c7dc2cbbe3c26cfbbcb02475d95ff3afe507e

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):
systemd-libs-222-10.fc23.x86_64

How reproducible:
100%

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:

https://github.com/systemd/systemd/commit/9a9c7dc2cbbe3c26cfbbcb02475d95ff3afe507e

Please consider to cherry-pick this commit also for Fedora 23.

Comment 1 Fedora Update System 2016-01-08 09:47:48 UTC
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-09 04:27:10 UTC
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 19:23:56 UTC
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.