From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mario Limonciello Date: Mon, 17 Aug 2009 18:27:56 +0000 Subject: REMOVE_CMD not always populated Message-Id: <4A89A12C.7090000@dell.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------enig19DD85119855BB082A36CF39" List-Id: To: linux-hotplug@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig19DD85119855BB082A36CF39 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi: In testing the hid2hci stuff that landed in udev-146 and the kernel patch that Alan Stern submitted to fix the race condition with uevents, i've been finding that udev doesn't alway populate REMOVE_CMD even when the rule is matching it. I'm not really sure where to start looking to debug. Here's what the udev DB looks like when REMOVE_CMD doesn't get added: $ udevadm info --query=3Dall --path=3D/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 P: /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 N: bus/usb/003/009 S: char/189:264 E: DEVPATH=3D/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 E: MAJOR=3D189 E: MINOR=3D264 E: DEVNAME=3D/dev/bus/usb/003/009 E: DEVTYPE=3Dusb_device E: DRIVER=3Dusb E: PRODUCT=3D413c/8156/456 E: TYPE=3D224/1/1 E: BUSNUM=3D003 E: DEVNUM=3D009 E: ID_VENDOR=3DDell_Computer_Corp E: ID_VENDOR_ENC=3DDell\x20Computer\x20Corp E: ID_VENDOR_ID=3D413c E: ID_MODEL=3DDell_Wireless_370_Bluetooth_Mini-card E: ID_MODEL_ENC=3DDell\x20Wireless\x20370\x20Bluetooth\x20Mini-card E: ID_MODEL_ID=3D8156 E: ID_REVISION=3D0456 E: ID_SERIAL=3DDell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card E: ID_BUS=3Dusb E: ID_USB_INTERFACES=3D:e00101:ffffff:fe0100: E: DEVLINKS=3D/dev/char/189:264 So you can see no REMOVE_CMD. If I run a udevadm test run against the device, the REMOVE_CMD is listed. $udevadm test /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 2>&1 run_command: calling: test udevadm_test: version 146 add_matching_files: unable to open '/usr/etc/udev/rules.d': No such file or directory parse_file: reading '/usr/libexec/rules.d/50-firmware.rules' as rules fil= e parse_file: reading '/usr/libexec/rules.d/50-udev-default.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-cdrom_id.rules' as rules fil= e parse_file: reading '/usr/libexec/rules.d/60-persistent-alsa.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-persistent-input.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-persistent-serial.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-persistent-storage-tape.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-persistent-storage.rules' as rules file parse_file: reading '/usr/libexec/rules.d/60-persistent-v4l.rules' as rules file parse_file: reading '/usr/libexec/rules.d/61-mobile-action.rules' as rules file parse_file: reading '/usr/libexec/rules.d/61-option-modem-modeswitch.rules' as rules file parse_file: reading '/usr/libexec/rules.d/61-persistent-storage-edd.rules' as rules file parse_file: reading '/usr/libexec/rules.d/70-acl.rules' as rules file parse_file: reading '/usr/libexec/rules.d/70-hid2hci.rules' as rules file= parse_file: reading '/usr/libexec/rules.d/75-cd-aliases-generator.rules' as rules file parse_file: reading '/usr/libexec/rules.d/75-net-description.rules' as rules file parse_file: reading '/usr/libexec/rules.d/75-persistent-net-generator.rules' as rules file parse_file: reading '/usr/libexec/rules.d/75-tty-description.rules' as rules file parse_file: reading '/usr/libexec/rules.d/78-sound-card.rules' as rules f= ile parse_file: reading '/usr/libexec/rules.d/79-fstab_import.rules' as rules file parse_file: reading '/usr/libexec/rules.d/80-drivers.rules' as rules file= parse_file: reading '/usr/libexec/rules.d/95-keymap.rules' as rules file parse_file: reading '/usr/libexec/rules.d/95-udev-late.rules' as rules fi= le udev_rules_new: rules use 18744 bytes tokens (1562 * 12 bytes), 11469 bytes buffer udev_rules_new: temporary index used 12360 bytes (618 * 20 bytes) udev_device_new_from_syspath: device 0x862e5d0 has devpath '/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' udev_device_new_from_syspath: device 0x861ba28 has devpath '/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' udev_device_read_db: device 0x861ba28 filled with db file data udev_rules_apply_to_event: LINK 'char/189:264' /usr/libexec/rules.d/50-udev-default.rules:4 udev_rules_apply_to_event: MODE 0664 /usr/libexec/rules.d/50-udev-default.rules:54 udev_rules_apply_to_event: NAME 'bus/usb/003/009' /usr/libexec/rules.d/50-udev-default.rules:54 udev_device_new_from_syspath: device 0x861bcd8 has devpath '/devices/pci0000:00/0000:00:04.0/usb3/3-4' udev_device_new_from_syspath: device 0x861c178 has devpath '/devices/pci0000:00/0000:00:04.0/usb3' udev_device_new_from_syspath: device 0x861c2c0 has devpath '/devices/pci0000:00/0000:00:04.0' udev_device_new_from_syspath: device 0x861c400 has devpath '/devices/pci0000:00' udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' /usr/libexec/rules.d/70-acl.rules:7 util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' started util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_VENDOR=3DDell_Computer_Corp' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_VENDOR_ENC=3DDell\x20Computer\x20Corp' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_VENDOR_ID=3D413c' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_MODEL=3DDell_Wireless_370_Bluetooth_Mini-card' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_MODEL_ENC=3DDell\x20Wireless\x20370\x20Bluetooth\x20Mini-card' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_MODEL_ID=3D8156' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_REVISION=3D0456' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_SERIAL=3DDell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_BUS=3Dusb' util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_USB_INTERFACES=3D:e00101:ffffff:fe0100:' util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' returned with exitcode 0= udev_device_update_db: unable to create db file '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb3\x2f3-4\x= 2f3-4.3': Permission denied udev_node_add: creating device node '/dev/bus/usb/003/009', devnum=3D189:264, mode=3D0664, uid=3D0, gid=3D0 udev_node_mknod: preserve file '/dev/bus/usb/003/009', because it has correct dev_t update_link: '/dev/char/189:264' with target '/dev/bus/usb/003/009' has the highest priority 0, create it node_symlink: preserve already existing symlink '/dev/char/189:264' to '../bus/usb/003/009' udevadm_test: UDEV_LOG=3D6 udevadm_test: DEVPATH=3D/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 udevadm_test: MAJOR=3D189 udevadm_test: MINOR=3D264 udevadm_test: DEVNAME=3D/dev/bus/usb/003/009 udevadm_test: DEVTYPE=3Dusb_device udevadm_test: DRIVER=3Dusb udevadm_test: PRODUCT=3D413c/8156/456 udevadm_test: TYPE=3D224/1/1 udevadm_test: BUSNUM=3D003 udevadm_test: DEVNUM=3D009 udevadm_test: ACTION=3Dadd udevadm_test: SUBSYSTEM=3Dusb udevadm_test: DEVLINKS=3D/dev/char/189:264 udevadm_test: ID_VENDOR=3DDell_Computer_Corp udevadm_test: ID_VENDOR_ENC=3DDell\x20Computer\x20Corp udevadm_test: ID_VENDOR_ID=3D413c udevadm_test: ID_MODEL=3DDell_Wireless_370_Bluetooth_Mini-card udevadm_test: ID_MODEL_ENC=3DDell\x20Wireless\x20370\x20Bluetooth\x20Mini= -card udevadm_test: ID_MODEL_ID=3D8156 udevadm_test: ID_REVISION=3D0456 udevadm_test: ID_SERIAL=3DDell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card udevadm_test: ID_BUS=3Dusb udevadm_test: ID_USB_INTERFACES=3D:e00101:ffffff:fe0100: udevadm_test: REMOVE_CMD=3D/sbin/udevadm trigger --action=3Dchange --subsystem-match=3Dusb --property-match=3DHID2HCI_SWITCH=3D1 This program is for debugging only, it does not run any program, specified by a RUN key. It may show incorrect results, because some values may be different, or not available at a simulation run. --=20 Mario Limonciello *Dell | Linux Engineering* mario_limonciello@dell.com --------------enig19DD85119855BB082A36CF39 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqJoSwACgkQ2CrZjkA73YugaQCgguuF7amFSMzpf5wNiODXkgGT eZkAn31YRVugUbe71Rh2TaVleCLjyD8f =brEW -----END PGP SIGNATURE----- --------------enig19DD85119855BB082A36CF39--