Thanks Mikhail,<div>Please let me know if you need me to test any patches or if you have any questions. I can consistently reproduce the bug</div><div><div><br><div>I'd just like to point out a few more things:</div><div>

<ul><li>When using USB filters (vs controlvm usbattach), the Smart-card reader device always gets captured correctly **if** it is removed from the host and plugged back in. Or if it is inserted *after* a VM is started.</li>

<li>Getting the device description fails even when there are no virtual machines running and no devices are captured. But only works after the device is captured (See my last email)</li></ul><div>Thanks,</div><div>Ribhi</div>

<div><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 9:02 AM, Mikhail Sennikovsky <span dir="ltr"><<a href="mailto:mikhail.sennikovsky@oracle.com" target="_blank">mikhail.sennikovsky@oracle.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>

  
    
    
  
  <div bgcolor="#ffffff" text="#000000">
    Hi Rabhi,<br>
    <br>
    The usbLibDevCfgDrGet can now really fail when querying device info
    on device capture. This is because the device being captured gets
    (soft-) re-plugged, so it really disappears and then appears back,
    and doing IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION and thing
    like this could fail within this time slot.<br>
    The problem is that since description of one and the same device
    could differ (depending on whether usbLibDevCfgDrGet fails or not),
    VBoxSVC may think it is two different devices. There is a logic in
    VBoxSVC that should prevent things like this, unfortunately it is
    hard to make it work 100% correct.<br>
    I'll have another look into it t see if it can be improved to work
    properly once I have a spare minute.<br>
    <br>
    Thanks,<br>
    Mikhail<div><div></div><div><br>
    <br>
    On 10/14/2011 7:18 PM, Ribhi Kamal wrote:
    </div></div><blockquote type="cite"><div><div></div><div>
      <div>For the issue in vboxsvc, it seems like its a locking
        issue.  See attached log for more info.</div>
      <div> </div>
      <div>Thanks,</div>
      <div>Ribhi<br>
      </div>
      <div class="gmail_quote">On Thu, Oct 13, 2011 at 2:02 PM, Ribhi
        Kamal <span dir="ltr"><<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a>></span>
        wrote:<br>
        <blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
          <div>Alright, this is a very old problem that used to happens
            A LOT with the very first version of vbox that had usb
            support. The problem went a way for a while and now its
            back. It also happens in both my compiled and
            Oracle binaries.</div>
          <div> </div>
          <div>Here is what happens:</div>
          <div>The smart-card reader is inserted to the host and a
            virtual machine is running (nothing is captured yet)</div>
          <div> </div>
          <div>vboxmanage list usbhost, shows the smartcard device but
            without the Manufacturer and product strings.</div>
          <div>
            <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe list
              usbhost<br>
              Host USB Devices:</div>
          </div>
          <div>UUID:               7344ae78-9c6a-429f-a5d7-95838e6084e7
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
              Address:           
              {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
            </div>
            Current State:      Busy</div>
          <div> </div>
          <div>Next, when trying to attach the device:</div>
          <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe
            controlvm testing usbattach
            {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002</div>
          <div>
            <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe list
              usbhost<br>
              Host USB Devices:</div>
          </div>
          <div>UUID:               7344ae78-9c6a-429f-a5d7-95838e6084e7
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
              Address:           
              {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
              Current State:      Captured</div>
          </div>
          <div> </div>
          <div>UUID:               c78f6adb-5884-4bd2-8449-a06a892f0629
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
            </div>
            Manufacturer:       Axalto<br>
            Product:            Reflex USB v3<br>
            Address:            <a>\\?\usb#vid_80ee&pid_cafe#21120614404073#{00873fdf-cafe-80ee-aa5e-00c04fb1720b</a>}<br>
            Current State:      Held</div>
          <div>
            <div><br>
              C:\Users\tester\Desktop\bin-new>VBoxManage.exe list
              usbhost<br>
              Host USB Devices:</div>
          </div>
          <div>UUID:               7344ae78-9c6a-429f-a5d7-95838e6084e7
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
              Address:           
              {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
              Current State:      Captured</div>
          </div>
          <div> </div>
          <div>UUID:               c78f6adb-5884-4bd2-8449-a06a892f0629
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
            </div>
            Manufacturer:       Axalto<br>
            Product:            Reflex USB v3<br>
            Address:           
            {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
            Current State:      Busy<br>
          </div>
          <div>Now the description for the smartcard reader is visable
            and the capture will work.</div>
          <div>
            <div>C:\Users\tester\Desktop\bin-new><br>
            </div>
            C:\Users\tester\Desktop\bin-new>VBoxManage.exe controlvm
            testing usbattach
            {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
            VBoxManage.exe: error: USB device '<unknown>' with
            UUID {7344ae78-9c6a-429f-a5d7-95838e6084e7} is busy with a
            previous request. Please try again later<br>
            VBoxManage.exe: error: Details: code E_INVALIDARG
            (0x80070057), component HostUSBDevice, interface
            IHostUSBDevice, callee IUnknown<br>
            VBoxManage.exe: error: Context:
            "AttachUSBDevice(usbId.raw())" at line 832 of file
            VBoxManageControlVM.cpp</div>
          <div> </div>
          <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe
            controlvm testing usbattach <strong>c78f6adb-5884-4bd2-8449-a06a892f0629</strong></div>
          <div>
            <div> </div>
            <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe list
              usbhost<br>
              Host USB Devices:</div>
          </div>
          <div>UUID:               7344ae78-9c6a-429f-a5d7-95838e6084e7
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
              Address:           
              {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
              Current State:      Captured</div>
          </div>
          <div> </div>
          <div>UUID:               c78f6adb-5884-4bd2-8449-a06a892f0629
            <div><br>
              VendorId:           0x04e6 (04E6)<br>
              ProductId:          0x511c (511C)<br>
              Revision:           5.24 (0524)<br>
            </div>
            Manufacturer:       Axalto<br>
            Product:            Reflex USB v3<br>
            Address:            <a>\\?\usb#vid_80ee&pid_cafe#21120614404073#{00873fdf-cafe-80ee-aa5e-00c04fb1720b</a>}<br>
            Current State:      Captured
            <div><br>
              C:\Users\tester\Desktop\bin-new></div>
          </div>
          <div> </div>
          <div>I'm not sure, but I think this problem was not in 4.1.2
            and definitely not in 4.0.12.</div>
          <div> </div>
          <div>Thanks,</div>
          <div>Ribhi<br>
          </div>
          <div>
            <div>
              <div class="gmail_quote">On Thu, Oct 13, 2011 at 12:12 PM,
                Ribhi Kamal <span dir="ltr"><<a href="mailto:rbhkamal@gmail.com" target="_blank">rbhkamal@gmail.com</a>></span>
                wrote:<br>
                <blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
                  <div>More than often I see the following error when
                    trying to capture the axalto smartcard reader:</div>
                  <div>VBoxSVC.log</div>
                  <div>VirtualBox (XP)COM Server 4.1.51_OSE r38834
                    win.amd64 (Oct 11 2011 12:53:24) release log<br>
                    00:00:00.000 main     Log opened
                    2011-10-13T15:58:02.008196600Z<br>
                    00:00:00.000 main     OS Product: Windows 7<br>
                    00:00:00.000 main     OS Release: 6.1.7601<br>
                    00:00:00.000 main     Executable:
                    C:\Users\tester\Desktop\bin-new\VBOXSVC.exe<br>
                    00:00:00.000 main     Process ID: 2152<br>
                    00:00:00.000 main     Package type:
                    WINDOWS_64BITS_GENERIC (OSE)<br>
                    00:00:00.016          Loading settings file
                    "C:\Users\tester/.VirtualBox\VirtualBox.xml" with
                    version "1.12-windows"<br>
                    00:00:00.156          usbLibDevCfgDrGet:
                    DeviceIoControl 1 fail winEr (31)<br>
                    00:00:00.453          VDInit finished<br>
                    00:00:00.453          Loading settings file
                    "C:\Users\tester\VirtualBox
                    VMs\testing\testing.vbox" with version
                    "1.11-windows"<br>
                    00:00:01.794 USBPROXY usbLibDevCfgDrGet:
                    DeviceIoControl 1 fail winEr (31)<br clear="all">
                  </div>
                  <div>------------------------------------------------------------</div>
                  <div> </div>
                  <div>After the capture the device will be left in the
                    following state:</div>
                  <div>C:\Users\tester\Desktop\bin-new>VBoxManage.exe
                    list usbhost<br>
                    Host USB Devices:</div>
                  <div>UUID:              
                    717a5a0d-3510-4b9e-a5f5-2830de45ff3f<br>
                    VendorId:           0x04b9 (04B9)<br>
                    ProductId:          0x1000 (1000)<br>
                    Revision:           1.0 (0100)<br>
                    Manufacturer:       Rainbow Technologies<br>
                    Product:            iKey 1000<br>
                    Address:            <a>\\?\usb#vid_80ee&pid_cafe#5&35ea7c2c&0&1#{00873fdf-cafe-80ee-aa5e-00c04fb1720b</a>}<br>
                    Current State:      Captured</div>
                  <div> </div>
                  <div>UUID:              
                    407b053e-0566-47de-b293-a81781524dbf<br>
                    VendorId:           0x04e6 (04E6)<br>
                    ProductId:          0x511c (511C)<br>
                    Revision:           5.24 (0524)<br>
                    Address:           
                    {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0002<br>
                    <u><strong>Current State:      Captured</strong></u></div>
                  <div> </div>
                  <div>UUID:              
                    d027769c-8edb-4e12-a93e-56ff4e0614c6<br>
                    VendorId:           0x0b97 (0B97)<br>
                    ProductId:          0x7772 (7772)<br>
                    Revision:           1.16 (0116)<br>
                    Manufacturer:       O2<br>
                    Product:            O2Micro CCID SC Reader<br>
                    Address:           
                    {50dd5230-ba8a-11d1-bf5d-0000f805f530}\0001<br>
                    Current State:      Busy</div>
                  <div> </div>
                  <div> </div>
                  <div>There are two problems:</div>
                  <div>1- The capture issue. (maybe retry
                    usbLibDevCfgDrGet?)</div>
                  <div>2- Handling the error is not done properly in
                    vboxsvc(?) and the device is left the "Captured"
                    state eventhough it is not.</div>
                  <div> </div>
                  <div> </div>
                  <div>Please let me know how I can help.</div>
                  <div><br>
                    Thanks, <br>
                    <font color="#888888">-- Ribhi<br>
                    </font></div>
                </blockquote>
              </div>
              <br>
              <br clear="all">
              <br>
            </div>
          </div>
          <font color="#888888">-- <br>
            -- Ribhi<br>
          </font></blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      -- Ribhi<br>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
vbox-dev mailing list
<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>-- Ribhi<br>
</div></div>
</div></div>