Bug 770593 - udev failing to substitute $tempnode for USB devices
Summary: udev failing to substitute $tempnode for USB devices
Alias: None
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
(Show other bugs)
Version: 16
Hardware: x86_64 Unspecified
Target Milestone: ---
Assignee: udev-maint
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-12-27 20:22 UTC by Eric Smith
Modified: 2013-02-14 00:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-14 00:00:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
udev rules file to demonstrate the problem (134 bytes, text/plain)
2011-12-27 20:22 UTC, Eric Smith
no flags Details
syslog output showing empty $tempnode substitution (8.68 KB, text/plain)
2011-12-27 20:23 UTC, Eric Smith
no flags Details
excerpt of output from "udevadm info -e" (595 bytes, text/plain)
2011-12-27 20:25 UTC, Eric Smith
no flags Details

Description Eric Smith 2011-12-27 20:22:39 UTC
Created attachment 549734 [details]
udev rules file to demonstrate the problem

Description of problem:

With a udev rule for a USB device with an ADD/RUN rule, plugging in the device triggers the rule, but the $tempnode substitution is an empty string rather than the correct USB node.

Version-Release number of selected component (if applicable):


How reproducible:  100%

Steps to Reproduce:
1.  Install the attached 99-bug.rules file in /etc/udev/rules.d, changing the values for idVendor and idProduct to match a USB device you can use for testing.  This script has an echo command for debugging; normally the RUN would be for a more useful program such as fxload.
2.  Enable debugging output to syslog: "udevadm control --log-priority=debug"
3.  Plug in the device
Actual results:

In syslog, the echo command is shown, but the $tempnode substitution is empty.  See the attached file udev-syslog.txt for an example.

Expected results:

The $tempnode substitution should be for a proper USB node, rather than empty.

Additional info:

This worked properly for me in Fedora 14.  However, a search did reveal that Terry Barnaby apparently had this problem with Fedora 14:

I am trying to use the same product as Terry, a Xilinx "Platform Cable USB", to program FPGAs, but the problem does not seem to be specific to Xilinx.

Comment 1 Eric Smith 2011-12-27 20:23:49 UTC
Created attachment 549735 [details]
syslog output showing empty $tempnode substitution

Comment 2 Eric Smith 2011-12-27 20:25:44 UTC
Created attachment 549736 [details]
excerpt of output from "udevadm info -e"

Comment 3 Eric Smith 2011-12-27 20:27:22 UTC
Note that this was on a fresh install of Fedora 16, not an upgrade.

Comment 4 Kay Sievers 2011-12-29 13:47:42 UTC
This rule matches on the 'device' and the 'interface'. It runs for at least
2 devices at the same time. Youn need to limit that, only the 'usb_device'
has a device node, not the 'usb_interface'

Comment 5 Eric Smith 2011-12-29 18:48:38 UTC
Thanks for the suggestion, Kay.  Unfortunately I don't understand udev well enough to know how to solve it.

I only have one device with the vendor and device ID given, so I don't see how it "runs for at least 2 devices at the same time".  This worked perfectly on Fedora 14, so I don't understand why it won't work on Fedora 16.

If you could offer a more specific suggestion as to how the rule should be correctly written to avoid the problem you describe, I would greatly appreciate it!

Comment 6 Harald Hoyer 2012-01-05 10:34:13 UTC
I think the rule should contain:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device"

Comment 7 Bradley 2012-02-23 18:23:38 UTC
Any progress on this Bug?  I am having the same problem with a Diligent FPGA-USB cable.

Comment 8 Fedora End Of Life 2013-01-16 20:35:46 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 9 Fedora End Of Life 2013-02-14 00:00:41 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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