Closed rjgrandy closed 4 years ago
@rjgrandy hey! Does this problem also occurs when you use usb2.0 and what runtime version are you using?
Also could you first check if the issue is reproducible on the host machine? VM isn't officially supported so it's very hard to tell especially when passing from window to linux.
Hi @Namburger thanks for the reply
Yes, it appears to occur when using a USB2.0 port as well, I captured the below on the DMESG when connected to a USB2 port. My runtime version is 13.
I did try this on a similar setup on another computer (Surface) Tablet with similar results (Win10 host with Ubuntu VM using USB3 port) I ran frigate with similar results. I also ran the Demo Macaw code (which appears to work in my setup) and also saw errors on the DMESG, I put them below at the bottom.
I'll try running it on Windows, I'm not sure if I know exactly where to find a similar error log as the DMESG in Linux though.
Jul 09 09:49:06.376701 HA kernel: usb 1-3: reset high-speed USB device number 8 using xhci_hcd
Jul 09 09:49:06.533028 HA kernel: usb 1-3: device descriptor read/all, error -32
Jul 09 09:49:06.661222 HA kernel: usb 1-3: reset high-speed USB device number 8 using xhci_hcd
Jul 09 09:49:06.816398 HA kernel: usb 1-3: device descriptor read/all, error -71
Jul 09 09:49:07.628409 HA kernel: usb 1-3: USB disconnect, device number 8
Jul 09 09:49:08.272766 HA kernel: usb 1-3: new high-speed USB device number 9 using xhci_hcd
Jul 09 09:49:08.440450 HA kernel: usb 1-3: New USB device found, idVendor=18d1, idProduct=9302, bcdDevice= 1.00
Jul 09 09:49:08.440901 HA kernel: usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jul 09 09:49:08.780502 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Jul 09 09:49:08.780780 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000003482a6a0 trb-start 000000003482a420 trb-end 000000003482a420 seg-start 000000003482a000 seg-end 000000003482aff0
Jul 09 09:49:08.780931 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Jul 09 09:49:08.781076 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000003482a430 trb-start 000000003482a420 trb-end 000000003482a420 seg-start 000000003482a000 seg-end 000000003482aff0
Jul 09 09:49:08.781215 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Jul 09 09:49:08.781374 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000003482a440 trb-start 000000003482a420 trb-end 000000003482a420 seg-start 000000003482a000 seg-end 000000003482aff0
Jul 09 09:49:08.781540 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Jul 09 09:49:08.781677 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000003482a450 trb-start 000000003482a420 trb-end 000000003482a420 seg-start 000000003482a000 seg-end 000000003482aff0
Jul 09 09:49:08.781814 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
Jul 09 09:49:08.781952 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000003482a460 trb-start 000000003482a420 trb-end 000000003482a420 seg-start 000000003482a000 seg-end 000000003482aff0
Jul 09 09:49:08.782104 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1
21:11:10 kernel: usb 2-1: LPM exit latency is zeroed, disabling LPM.
21:11:10 kernel: usb 2-1: LPM exit latency is zeroed, disabling LPM.
21:11:10 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:11:09 kernel: usb 2-1: device descriptor read/8, error -71
21:11:09 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:11:09 kernel: usb 2-1: device descriptor read/8, error -71
21:11:09 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:11:08 kernel: usb 2-1: device descriptor read/8, error -32
21:11:08 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:11:08 kernel: usb 2-1: device descriptor read/8, error -32
21:11:08 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:10:24 kernel: usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
21:10:24 kernel: usb 2-1: New USB device found, idVendor=18d1, idProduct=9302, bcdDevice= 1.00
21:10:24 kernel: usb 2-1: LPM exit latency is zeroed, disabling LPM.
21:10:24 kernel: usb 2-1: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
21:10:24 kernel: usb 2-1: USB disconnect, device number 3
21:10:24 kernel: usb 2-1: device firmware changed
21:10:24 kernel: usb 2-1: LPM exit latency is zeroed, disabling LPM.
21:10:24 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:10:23 kernel: usb 2-1: device descriptor read/8, error -71
21:10:23 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:10:23 kernel: usb 2-1: device descriptor read/8, error -71
21:10:23 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:10:23 kernel: usb 2-1: device descriptor read/8, error -32
21:10:23 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:10:23 kernel: usb 2-1: device descriptor read/8, error -32
21:10:23 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:10:21 kernel: usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:06:38 kernel: usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
21:06:38 kernel: usb 2-1: New USB device found, idVendor=1a6e, idProduct=089a, bcdDevice= 1.00
21:06:38 kernel: usb 2-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
21:06:22 kernel: usb 2-1: USB disconnect, device number 2
21:06:07 kernel: usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
21:06:07 kernel: usb 2-1: New USB device found, idVendor=1a6e, idProduct=089a, bcdDevice= 1.00
21:06:07 kernel: usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
12:10:29 kernel: snd_intel8x0 0000:00:05.0: white list rate for 1028:0177 is 48000
12:09:57 kernel: e1000 0000:00:03.0 enp0s3: renamed from eth0
12:09:57 kernel: sd 2:0:0:0: [sda] Attached SCSI disk
12:09:57 kernel: scsi 2:0:0:0: Direct-Access ATA VBOX HARDDISK 1.0 PQ: 0 ANSI: 5
12:09:57 kernel: hid-generic 0003:80EE:0021.0001: input,hidraw0: USB HID v1.10 Mouse [VirtualBox USB Tablet] on usb-0000:00:0c.0-1/input0
12:09:57 kernel: usb 1-1: Manufacturer: VirtualBox
12:09:57 kernel: scsi host2: ahci
12:09:57 kernel: ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
12:09:57 kernel: piix4_smbus 0000:00:07.0: SMBus Host Controller at 0x4100, revision 0
12:09:57 kernel: usb 1-1: new full-speed USB device number 2 using xhci_hcd
12:09:57 kernel: sr 1:0:0:0: Attached scsi generic sg0 type 5
12:09:57 kernel: scsi 1:0:0:0: CD-ROM VBOX CD-ROM 1.0 PQ: 0 ANSI: 5
12:09:57 kernel: rtc_cmos rtc_cmos: setting system clock to 2020-07-09T17:09:53 UTC (1594314593)
12:09:57 kernel: intel_pmc_core intel_pmc_core.0: initialized
12:09:57 kernel: platform eisa.0: EISA: Detected 0 cards
12:09:57 kernel: rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
12:09:57 kernel: hub 2-0:1.0: 6 ports detected
12:09:57 kernel: usb usb2: SerialNumber: 0000:00:0c.0
12:09:57 kernel: xhci_hcd 0000:00:0c.0: Host supports USB 3.0 SuperSpeed
12:09:57 kernel: hub 1-0:1.0: 8 ports detected
12:09:57 kernel: usb usb1: SerialNumber: 0000:00:0c.0
12:09:57 kernel: xhci_hcd 0000:00:0c.0: hcc params 0x04000000 hci version 0x100 quirks 0x000000000000b930
12:09:57 kernel: scsi host1: ata_piix
12:09:57 kernel: ata_piix 0000:00:01.1: version 2.13
12:09:57 kernel: platform rtc_cmos: registered platform RTC device (no PNP device found)
12:09:57 kernel: pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
12:09:57 kernel: pci_bus 0000:00: resource 7 [mem 0xe0000000-0xfdffffff window]
12:09:57 kernel: pnp 00:01: Plug and Play ACPI device, IDs PNP0f03 (active)
12:09:57 kernel: pci 0000:00:02.0: vgaarb: bridge control possible
12:09:57 kernel: pci_bus 0000:00: root bus resource [bus 00-ff]
12:09:57 kernel: acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
Thanks for the logs, awaiting your results from window, could you also give me a reference link to the frigate software?
The frigate github is here:
https://github.com/blakeblackshear/frigate
I'll work on trying the windows method
@rjgrandy I see, so frigate's default is to use docker, that's why you preferred to run our software stack in docker, correct? You see docker in window is a lot different form docker in linux :) I believe it runs on top of the HyperV VM which adds more complexity in the mix. Again I'd like to reiterate that VMs are not officially supported by us, but these messages:
Jul 08 01:27:12.248178 HA kernel: xhci_hcd 0000:00:0c.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Jul 08 01:27:12.248308 HA kernel: xhci_hcd 0000:00:0c.0: Looking for event-dma 000000009f133830 trb-start 000000009f1335c0 trb-end 000000009f133790 seg-start 000000009f133000 seg-end 000000009f133ff0
gave some ideas that there are some error with libusb passing data from window to the container
FYI, that is a really kool project, thanks for sharing
Yeah he has done a pretty good job on Frigate, a very nice application of coral.
My setup is actually Frigate running in a Docker container running in a Ubuntu VM on a Windows 10 host, so I believe that would be docker in linux.
I've been trying to get the demos running on my windows computers. I believe I have been following the getting started instructions for windows pretty closely however, I keep getting some errors when I try to run the "classify_image.py" program. I have used Python 3.7 on 2 windows computers with similar results. Also, I found I had to install "pillow", is this correct? Is there something I am missing in the windows installation and setup? See below for the errors:
rgran@DESKTOP-9VUURQ4 MINGW64 /c/coral/tflite/python/examples/classification (master)
$ python classify_image.py --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels models/inat_bird_labels.txt --input images/parrot.jpg
Traceback (most recent call last):
File "classify_image.py", line 122, in <module>
main()
File "classify_image.py", line 99, in main
interpreter = make_interpreter(args.model)
File "classify_image.py", line 73, in make_interpreter
{'device': device[0]} if device else {})
File "C:\Users\rgran\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 162, in load_delegate
delegate = Delegate(library, options)
File "C:\Users\rgran\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 91, in __init__
self._library = ctypes.pydll.LoadLibrary(library)
File "C:\Users\rgran\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 442, in LoadLibrary
return self._dlltype(name)
File "C:\Users\rgran\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
Exception ignored in: <function Delegate.__del__ at 0x000001EDBD264C18>
Traceback (most recent call last):
File "C:\Users\rgran\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 126, in __del__
if self._library is not None:
AttributeError: 'Delegate' object has no attribute '_library'
@rjgrandy
AttributeError: 'Delegate' object has no attribute '_library'
and
OSError: [WinError 126] The specified module could not be found
Indicates that the library were unable to load. Do you have an edgetpu.dll
in c:\windows\system32
?
@Namburger I have this file in that location on both computers.
@rjgrandy Can you get an md5sum of that file? Something like this:
CertUtil -hashfile c:\windows\system32\edgetpu.dll MD5
@Namburger I was able to get this:
Ryan@DESKTOP-MHTPQRH MINGW64 /c/windows/system32
$ CertUtil -hashfile edgetpu.dll MD5
MD5 hash of edgetpu.dll:
ea58212b2e690da0daf6289ac5b1bf08
CertUtil: -hashfile command completed successfully.
@rjgrandy I see, this is an odd problem, could you can reinstalling the dll from here instead? https://dl.google.com/coral/edgetpu_api/edgetpu_runtime_20200331.zip (just run the uninstall.bat and then install.bat)
@Namburger I was able to do the uninstall and install with your files. The macaw demo worked on my 2 windows machines with the files you provided (interestingly, when I had my VM running on my desktop, I got errors, even if the USB wasn't "attached" to the VM, when I close the VM the demo works, I suppose the VM is somehow "grabbing" the USB when it is running). I tried reinstalling the latest files I originally tried and again they did not work.
@rjgrandy interesting... Very similar to https://github.com/google-coral/tflite/issues/21... We should have uplaoded the new zip, but then we sorta made some more changes on the documentation side, let me check with our team.
Mean while, you can continue using that package I sent you since there were no changes that affects USB devices
@Namburger I ended up migrating my server to Unraid. So now the host is Linux. I run frigate in docker and then I have additional Windows and Linux Virtual Machines as well (which I don't use Coral with).
Coral so far is working well with this configuration, probably because I removed the VM from the equation and am using Coral on docker in Linux.
@rjgrandy I see, thanks for confirming. Closing this issue for now, unless you have further questions. Sorry that we couldn't help in this case
It looks like this occurs as well on a Dell PowerEdge R620 running VMWare ESXi 7 with an Ubuntu 20 LTS Server VM running Frigate in Docker-Compose. The server has dual redundant power supplies and is capable of running massive arrays. Yet when I plug in the USB coral I get this error in Ubuntu and frigate won't see the USB device at all. I've tried Hardware pass through and it just gets stuck on Enabled / Requires Reboot and no matter how many times I reboot it it still says the same thing. My server is a 40 core 256gig beast so the only real option is virtualization as not a lot of OS's can handle that much. Anyone have any other ideas? I head someone said getting a PCIe USB Hub and then passing that through to the VM helped but I'd prefer to be sure before spending the money. Server cards are not cheap.
It looks like this occurs as well on a Dell PowerEdge R620 running VMWare ESXi 7 with an Ubuntu 20 LTS Server VM running Frigate in Docker-Compose. The server has dual redundant power supplies and is capable of running massive arrays. Yet when I plug in the USB coral I get this error in Ubuntu and frigate won't see the USB device at all. I've tried Hardware pass through and it just gets stuck on Enabled / Requires Reboot and no matter how many times I reboot it it still says the same thing. My server is a 40 core 256gig beast so the only real option is virtualization as not a lot of OS's can handle that much. Anyone have any other ideas? I head someone said getting a PCIe USB Hub and then passing that through to the VM helped but I'd prefer to be sure before spending the money. Server cards are not cheap.
I tried this and it reduced the frequency of this problem for me but did not solve it completely. I went from having the VM freeze daily to having it freeze every 3-4 days. Did you ever solve the problem?
I am using a USB Coral device which is passed through to an Ubuntu 20.04 virtualbox VM. The host os is Windows 10. Inside of the VM I have a program called frigate running in a docker container which uses the coral to run object recognition on a camera stream.
The device and program appear to be working, however after some time Ubuntu freezing and the VM needs to be restarted. This occurs everytime when the coral is attached and the frigate program is running and using it, however does not occur if the coral is not used. I have captured some repeated errors related to the USB after the coral is inserted and accessed by frigate on the DMESG log from my Ubuntu installation. I have the coral inserted into a USB3 port in my desktop computer, I have also tried running it through a USB3 hub as I understand it can draw a fair amount of power, however this did not seem to affect my results at all.
I am trying to understand where the issue lies, after googling the various errors I haven't seen many documented examples of this occuring with the coral.