This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 770593

Summary: udev failing to substitute $tempnode for USB devices
Product: [Fedora] Fedora Reporter: Eric Smith <spacewar>
Component: udevAssignee: udev-maint
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: bradley, harald, jonathan, udev-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-13 19:00:29 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
udev rules file to demonstrate the problem
none
syslog output showing empty $tempnode substitution
none
excerpt of output from "udevadm info -e" none

Description Eric Smith 2011-12-27 15:22:39 EST
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):

udev-173-3.fc16.x86_64
kernel-3.1.6-1.fc16.x86_64

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:
    http://lists.fedoraproject.org/pipermail/users/2011-April/395767.html

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 15:23:49 EST
Created attachment 549735 [details]
syslog output showing empty $tempnode substitution
Comment 2 Eric Smith 2011-12-27 15:25:44 EST
Created attachment 549736 [details]
excerpt of output from "udevadm info -e"
Comment 3 Eric Smith 2011-12-27 15:27:22 EST
Note that this was on a fresh install of Fedora 16, not an upgrade.
Comment 4 Kay Sievers 2011-12-29 08:47:42 EST
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 13:48:38 EST
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 05:34:13 EST
I think the rule should contain:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device"
Comment 7 Bradley 2012-02-23 13:23:38 EST
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 15:35:46 EST
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Fedora End Of Life 2013-02-13 19:00:41 EST
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.