Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
On 2015-03-30 22:21, Stefan Lippers-Hollmann wrote: On 2015-03-30, David Härdeman wrote: On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote: > This is a follow-up for: >http://lkml.kernel.org/r/<201412181916.18051.s@gmx.de> >http://lkml.kernel.org/r/<201412302211.40801.s@gmx.de> I can't swear that it's the case but I'm guessing this might be fixed by the patches I posted earlier (in particular the one that converted rc-core to use the IDA infrastructure for keeping track of registered minor device numbers). Do you have a pointer to that patch (-queue) or a tree containing it? So far I've only found https://patchwork.linuxtv.org/patch/23370/ with those keywords, respectively the thread at http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/76514 which seems to be partially applied, anything I could test (reproducing the problem takes its time, probably 4-10 weeks to be really sure, but I'd be happy to try or forward port the required parts). Hi, I can try providing you with an updated version of the patch when I have time...otherwise I think you've found all that can be found :) //David -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
Hi On 2015-03-30, David Härdeman wrote: > On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote: > > Hi > > > > This is a follow-up for: > > http://lkml.kernel.org/r/<201412181916.18051.s@gmx.de> > > http://lkml.kernel.org/r/<201412302211.40801.s@gmx.de> > > I can't swear that it's the case but I'm guessing this might be fixed by > the patches I posted earlier (in particular the one that converted > rc-core to use the IDA infrastructure for keeping track of registered > minor device numbers). Do you have a pointer to that patch (-queue) or a tree containing it? So far I've only found https://patchwork.linuxtv.org/patch/23370/ with those keywords, respectively the thread at http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/76514 which seems to be partially applied, anything I could test (reproducing the problem takes its time, probably 4-10 weeks to be really sure, but I'd be happy to try or forward port the required parts). Thanks a lot Stefan Lippers-Hollmann -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
On 2015-03-30 17:30, Stefan Lippers-Hollmann wrote: Hi This is a follow-up for: http://lkml.kernel.org/r/<201412181916.18051.s@gmx.de> http://lkml.kernel.org/r/<201412302211.40801.s@gmx.de> I can't swear that it's the case but I'm guessing this might be fixed by the patches I posted earlier (in particular the one that converted rc-core to use the IDA infrastructure for keeping track of registered minor device numbers). //D -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
Hi This is a follow-up for: http://lkml.kernel.org/r/<201412181916.18051.s@gmx.de> http://lkml.kernel.org/r/<201412302211.40801.s@gmx.de> On 2014-12-30, Stefan Lippers-Hollmann wrote: > On Thursday 18 December 2014, Stefan Lippers-Hollmann wrote: > > Occassionally, but not readily reproducably, I hit a race condition > > between mceusb and other connected RC_CORE devices when mceusb tries > > to create /class/rc/rc0, which is -by then- already taken by another > > RC_CORE device. The other involved IR devices (physically only one) > > are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't > > actually supposed to receive IR signals (IR receiver not connected): > > > > mceusb device transceiver: > > Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared > > Receiver > > > > DVB-T receiver (no RC_CORE device) > > Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE > > (Version 2, AF9015) > > > > twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR > > receiver (NEC protocol), logically recognized as two RC_CORE devices): > [...] > > Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 > > Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 > Today I got a new, similar, trace with kernel 3.18.1, but this is not a > regression and randomly happens with older kernels as well. The > frequency of this occuring differs vastly, this time it was 12 days > with probably 20 (re-)boots, before that it didn't happen for multiple > weeks. I can not totally rule out if it ever happened in the reverse > detection/ initialisation order, as I wouldn't notice the consequences > of dvb_usb_dw2102's RC_CORE devices failing to initialise, but I think > the problem might be seated in the common core of rc-main.c. This remains to be a re-occuring issue with kernel 3.19 and 4.0-rc6, not happening on every boot, but every few weeks. [1.837215] Registered IR keymap rc-rc6-mce [1.837225] [ cut here ] [1.837229] WARNING: CPU: 3 PID: 277 at /tmp/buildd/linux-aptosid-4.0~rc6/fs/sysfs/dir.c:31 sysfs_warn_dup+0x55/0x70() [1.837230] sysfs: cannot create duplicate filename '/class/rc/rc0' [1.837231] Modules linked in: rt2800usb(+) rt2x00usb rt2800lib rt2x00lib mac80211 cfg80211 rc_rc6_mce crc_ccitt mceusb(+) rc_tevii_nec ds3000 btusb dvb_usb_af9015 dvb_usb_v2 bluetooth nls_utf8 nls_cp437 vfat fat snd_hda_codec_hdmi iTCO_wdt eeepc_wmi iTCO_vendor_support asus_wmi sparse_keymap intel_rapl rfkill iosf_mbi x86_pkg_temp_thermal intel_powerclamp evdev coretemp snd_hda_codec_realtek snd_hda_codec_generic kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel dvb_usb_dw2102 dvb_usb aesni_intel aes_x86_64 lrw dvb_core gf128mul rc_core snd_hda_intel glue_helper i915 ablk_helper snd_hda_controller cryptd snd_hda_codec i2c_algo_bit psmouse snd_hwdep drm_kms_helper snd_pcm serio_raw pcspkr i2c_i801 drm snd_timer lpc_ich snd i2c_core mfd_core soundcore intel_gtt mei_me battery ie31200_edac [1.837253] mei 8250_fintek edac_core tpm_infineon video wmi processor button nct6775 hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache dm_mod sg sd_mod ohci_pci crc32c_intel ahci libahci libata xhci_pci scsi_mod ohci_hcd ehci_pci xhci_hcd ehci_hcd r8169 mii usbcore usb_common fan thermal [1.837267] CPU: 3 PID: 277 Comm: systemd-udevd Not tainted 4.0.0-rc6-aptosid-amd64 #1 aptosid 4.0~rc6-1~git0.slh.1 [1.837268] Hardware name: System manufacturer System Product Name/P8H77-M PRO, BIOS 1503 03/17/2014 [1.837269] 816236d0 54e7a09b 816236d0 814fb0ee [1.837271] 8807fb643880 81060627 8807fbe5c000 8807fbe2ee78 [1.837272] 8807f93a07f8 8807f93a07f8 ffef 810606b8 [1.837273] Call Trace: [1.837277] [] ? dump_stack+0x47/0x67 [1.837279] [] ? warn_slowpath_common+0x77/0xb0 [1.837280] [] ? warn_slowpath_fmt+0x58/0x80 [1.837282] [] ? kernfs_path+0x42/0x50 [1.837284] [] ? sysfs_warn_dup+0x55/0x70 [1.837286] [] ? sysfs_do_create_link_sd.isra.2+0xbe/0xd0 [1.837287] [] ? device_add+0x264/0x640 [1.837291] [] ? rc_register_device+0x1bc/0x610 [rc_core] [1.837293] [] ? mceusb_dev_probe+0x405/0xadd [mceusb] [1.837296] [] ? ida_get_new_above+0x1f8/0x220 [1.837298] [] ? ida_simple_get+0x99/0x120 [1.837304] [] ? usb_probe_interface+0x193/0x290 [usbcore] [1.837306] [] ? driver_probe_device+0x87/0x260 [1.837309] [] ? __driver_attach+0x7b/0x80 [1.837311] [] ? __device_attach+0x50/0x50 [1.837312] [] ? bus_for_each_dev+0x6b/0xc0 [1.837313] [] ? bus_add_driver+0x178/0x230 [1.837315] [] ? driver_register+0x5e/0xf0 [1.837319] [] ? usb_register_driver+0x7b/0x160 [usbcore] [1.837321] [] ? 0xa0865000 [1.837323] [] ? 0xa0865000 [1.837325] []
Re: mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
Hi Adding the maintainers for drivers/media/rc/rc-main.c into the loop. This is a follow-up for: http://lkml.kernel.org/r/<201412181916.18051.s@gmx.de> On Thursday 18 December 2014, Stefan Lippers-Hollmann wrote: > Occassionally, but not readily reproducably, I hit a race condition > between mceusb and other connected RC_CORE devices when mceusb tries > to create /class/rc/rc0, which is -by then- already taken by another > RC_CORE device. The other involved IR devices (physically only one) > are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't > actually supposed to receive IR signals (IR receiver not connected): > > mceusb device transceiver: > Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared > Receiver > > DVB-T receiver (no RC_CORE device) > Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE > (Version 2, AF9015) > > twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR > receiver (NEC protocol), logically recognized as two RC_CORE devices): [...] > Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 > Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 Today I got a new, similar, trace with kernel 3.18.1, but this is not a regression and randomly happens with older kernels as well. The frequency of this occuring differs vastly, this time it was 12 days with probably 20 (re-)boots, before that it didn't happen for multiple weeks. I can not totally rule out if it ever happened in the reverse detection/ initialisation order, as I wouldn't notice the consequences of dvb_usb_dw2102's RC_CORE devices failing to initialise, but I think the problem might be seated in the common core of rc-main.c. usb 1-1.5: New USB device found, idVendor=0ccd, idProduct=0069 usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.5: Product: Cinergy T USB XE Ver.2 usb 1-1.5: Manufacturer: TerraTec usb 1-1.5: SerialNumber: 10012007 [...] dvb-usb: found a 'TeVii S480.1 USB' in cold state, will try to load a firmware dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' dw2102: start downloading DW210X firmware usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in cold state usb 1-1.5: dvb_usb_v2: downloading firmware from file 'dvb-usb-af9015.fw' [...] usb 2-1.6: New USB device found, idVendor=0609, idProduct=0334 usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1.6: Product: MCE TRANCEIVR Emulator Device 2006 usb 2-1.6: Manufacturer: SMK CORPORATION usb 2-1.6: SerialNumber: PA070620045513C [...] usb 3-1: USB disconnect, device number 2 usb 2-1.8: new full-speed USB device number 5 using ehci-pci usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in warm state [...] dvb-usb: found a 'TeVii S480.1 USB' in warm state. dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. DVB: registering new adapter (TeVii S480.1 USB) dvb-usb: MAC address: 70:70:70:70:70:70 Invalid probe, probably not a DS3000 dvb-usb: no frontend was attached by 'TeVii S480.1 USB' [...] Registered IR keymap rc-tevii-nec input: IR-receiver inside an USB DVB receiver as /devices/pci:00/:00:1c.5/:04:00.1/usb3/3-1/rc/rc0/input18 rc0: IR-receiver inside an USB DVB receiver as /devices/pci:00/:00:1c.5/:04:00.1/usb3/3-1/rc/rc0 dvb-usb: schedule remote query interval to 150 msecs. dvb-usb: TeVii S480.1 USB successfully initialized and connected. dvb-usb: found a 'TeVii S480.2 USB' in cold state, will try to load a firmware dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' dw2102: start downloading DW210X firmware [...] Registered IR keymap rc-rc6-mce [ cut here ] WARNING: CPU: 1 PID: 311 at /tmp/buildd/linux-aptosid-3.18/fs/sysfs/dir.c:31 sysfs_warn_dup+0x55/0x70() sysfs: cannot create duplicate filename '/class/rc/rc0' Modules linked in: rt2800usb(+) rt2x00usb rt2800lib rt2x00lib mac80211 cfg80211 crc_ccitt rc_rc6_mce mceusb(+) rc_tevii_nec ds3000 nls_utf8 nls_cp437 vfat fat iTCO_wdt iTCO_vendor_support eeepc_wmi asus_wmi intel_rapl sparse_keymap rfkill x86_pkg_temp_thermal evdev intel_powerclamp coretemp kvm_intel kvm snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper dvb_usb_af9015(+) cryptd dvb_usb_v2 dvb_usb_dw2102(+) dvb_usb dvb_core rc_core psmouse snd_hda_intel pcspkr snd_hda_controller serio_raw i2c_i801 snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore lpc_ich mfd_core battery tpm_infineon i915 video i2c_algo_bit drm_kms_helper drm i2c_core intel_gtt ie31200_edac mei_me edac_core mei wmi button processor nct6775 hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 jbd2 mbcache dm_mod sg sd_mod ohci_pci crc32c_intel ahci libahci libata scsi_mod xhci_pci ohci_hcd ehci_pci xhci_hcd ehci_hcd r8169 mii usbcore usb_common fan therm
mceusb: sysfs: cannot create duplicate filename '/class/rc/rc0' (race condition between multiple RC_CORE devices)
Hi Occassionally, but not readily reproducably, I hit a race condition between mceusb and other connected RC_CORE devices when mceusb tries to create /class/rc/rc0, which is -by then- already taken by another RC_CORE device. The other involved IR devices (physically only one) are part of a PCIe TeVii s480 s2.1 twin-tuner DVB-S2 card and aren't actually supposed to receive IR signals (IR receiver not connected): mceusb device transceiver: Bus 002 Device 004: ID 0609:0334 SMK Manufacturing, Inc. eHome Infrared Receiver DVB-T receiver (no RC_CORE device) Bus 001 Device 004: ID 0ccd:0069 TerraTec Electronic GmbH Cinergy T XE (Version 2, AF9015) twin-tuner DVB-S2 PCIe device, TeVii s480 v2.1 (physically one IR receiver (NEC protocol), logically recognized as two RC_CORE devices): 04:00.0 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.1 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.2 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.3 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.4 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.5 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.6 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 04:00.7 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCIe to 4‐Port USB 2.0 Host Controller Bus 006 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 Bus 003 Device 003: ID 9022:d660 TeVii Technology Ltd. DVB-S2 S660 dmesg excerpt from kernel 3.18.1-rc1, but this already happened randomly with older kernels: [...] dvb_usb_dw2102: unknown parameter 'keymap' ignored dvb-usb: found a 'TeVii S480.1 USB' in cold state, will try to load a firmware dvb-usb: downloading firmware from file 'dvb-usb-s660.fw' dw2102: start downloading DW210X firmware [...] usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in cold state [...] usb 1-1.5: dvb_usb_v2: downloading firmware from file 'dvb-usb-af9015.fw' usb 2-1.6: New USB device found, idVendor=0609, idProduct=0334 usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-1.6: Product: MCE TRANCEIVR Emulator Device 2006 usb 2-1.6: Manufacturer: SMK CORPORATION usb 2-1.6: SerialNumber: PA070620045513C [...] usb 3-1: USB disconnect, device number 2 usb 1-1.5: dvb_usb_v2: found a 'TerraTec Cinergy T USB XE' in warm state [...] dvb-usb: found a 'TeVii S480.1 USB' in warm state. dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. DVB: registering new adapter (TeVii S480.1 USB) dvb-usb: MAC address: 40:40:40:40:40:40 Invalid probe, probably not a DS3000 dvb-usb: no frontend was attached by 'TeVii S480.1 USB' [...] Registered IR keymap rc-tevii-nec input: IR-r