<div dir="ltr">The issue that <br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 26, 2018 at 3:59 PM, Frediano Ziglio <span dir="ltr"><<a href="mailto:fziglio@redhat.com" target="_blank">fziglio@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"times new roman","new york",times,serif;font-size:12pt;color:rgb(0,0,0)"><div>Is installing debug information not enough?<br></div><div>Sameeh, can you provide him needed software?</div></div></div></blockquote><div>The software needed is all provided by Microsoft and no intalling debug info is not enough, the steps for collecting traces is completely covered in the document I refereed to earlier. (<a href="https://github.com/daynix/UsbDk/blob/master/Documentation/Tracing.txt" target="_blank" style="font-size:12.8px">https://github.com/daynix/<wbr>UsbDk/blob/master/<wbr>Documentation/Tracing.txt</a>).</div><div><br></div><div>Wang, can you please elaborate on what went wrong with traceview? You should be able to install WDK successfully and get traceview from there. No need for compilation.</div><div><br></div><div>Regarding the client crashing, I took a look at the code and I can tell you what to investigate since I cant reproduce this.</div><div><br></div><div><br></div><div>spice-gtk [1] uses usbredir [2] for managing the usb and usbredir uses libusb [3] which uses UsbDk [4] as a backend.</div><div><br></div><div>I think that the call stack looks like this when you remove the device:</div><div><br></div><div><div><b>spice-gtk:</b></div><div><div>spice_usb_device_manager_remove_dev or spice_usb_device_manager_disconnect_device</div></div><div>disconnect_device_sync</div><div>spice_usbredir_channel_disconnect_device</div><div>usbredirhost_set_device (called with usb_dev_handle = null which causes the redirection to stop as documented [5])</div><div><br></div><div><b>usbredir:<br></b></div><div>usbredirhost_set_device<br></div><div>usbredirhost_clear_device<br></div><div>usbredirhost_wait_for_cancel_completion<br></div><div>libusb_handle_events_timeout<br></div><div><br></div><div><b>libusb:</b></div><div>libusb_handle_events_timeout<br></div><div>handle_events<br></div><div>windows_handle_events<br></div><div>windows_handle_callback (status = LIBUSB_TRANSFER_ERROR)  --> libusb: error [windows_transfer_callvack] detected I/O error 1627: [1627] During execution, the function has encountered a problem</div><div><br></div><div>So I'd suggest that you add few debug prints to usbredir in order to determine what actually causes the crash.</div><div><br></div></div><div>I'm not that familiar with spice compilation so can anyone shed a light on Windows compilation of usbredir?</div><div><br></div><div>[1] - <a href="https://cgit.freedesktop.org/spice/spice-gtk/">https://cgit.freedesktop.org/spice/spice-gtk/</a></div><div>[2] - <a href="https://cgit.freedesktop.org/spice/usbredir">https://cgit.freedesktop.org/spice/usbredir</a></div><div>[3] - <a href="https://github.com/libusb/libusb">https://github.com/libusb/libusb</a></div><div>[4] - <a href="https://github.com/daynix/UsbDk/blob/master/Documentation/Tracing.txt" target="_blank" style="font-size:12.8px">https://github.com/daynix/<wbr>UsbDk</a></div><div>[5] - <a href="https://cgit.freedesktop.org/spice/usbredir/tree/usbredirhost/usbredirhost.h#n96">https://cgit.freedesktop.org/spice/usbredir/tree/usbredirhost/usbredirhost.h#n96</a></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"times new roman","new york",times,serif;font-size:12pt;color:rgb(0,0,0)"><div><span style="font-family:arial,sans-serif;font-size:small;color:rgb(34,34,34)"> </span></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"times new roman","new york",times,serif;font-size:12pt;color:rgb(0,0,0)"><div></div><div><br></div><div>Frediano<br></div><div><br></div><div><br></div><hr id="gmail-m_-6863793661344964217zwchr"><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"王杰东" <<a href="mailto:wangjiedong@kylinos.cn" target="_blank">wangjiedong@kylinos.cn</a>><br><b>To: </b>"Sameeh Jubran" <<a href="mailto:sameeh@daynix.com" target="_blank">sameeh@daynix.com</a>><br><b>Cc: </b>"Yan Vugenfirer" <<a href="mailto:yan@daynix.com" target="_blank">yan@daynix.com</a>>, "spice-devel" <<a href="mailto:spice-devel@lists.freedesktop.org" target="_blank">spice-devel@lists.<wbr>freedesktop.org</a>><br><b>Sent: </b>Friday, January 26, 2018 6:48:34 AM<div><div class="gmail-h5"><br><b>Subject: </b>Re: [Spice-devel] virt-viewer on win10 32bit abort when pullingoutthe USB<br><div><br></div><div>I'm sorry for no responding at once.</div><div>I tried to install tracing tools , Dbgview.exe had only few info, however, another tools like traceview.exe from WDK could not be installed, so i get on traces now.</div><div>But I build another environment using win10 32bit with virt-viewer 5.0/6.0 and UsbDk 1.0.17/1.0.19, both of them aborted. because of the complex compilation process on windows, i can never debug the code.</div><div>So i wish you can  investigate the BUG, thanks!</div><div><div> </div><div style="color:rgb(0,0,0)"><div style="font-size:12px;font-family:"Arial Narrow";padding:2px 0px">------------------ Original --<wbr>----------------</div><div style="font-size:12px;background:rgb(239,239,239);padding:8px"><div id="gmail-m_-6863793661344964217menu_sender"><b>From: </b> "Sameeh Jubran"<<a href="mailto:sameeh@daynix.com" target="_blank">sameeh@daynix.com</a>>;</div><div><b>Date: </b> Mon, Jan 15, 2018 06:55 PM</div><div><b>To: </b> "王杰东"<<a href="mailto:wangjiedong@kylinos.cn" target="_blank">wangjiedong@kylinos.cn</a>><wbr>; </div><div><b>Cc: </b> "spice-devel"<<a href="mailto:spice-devel@lists.freedesktop.org" target="_blank">spice-devel@<wbr>lists.freedesktop.org</a>>; "Yan Vugenfirer"<<a href="mailto:yan@daynix.com" target="_blank">yan@daynix.com</a>>; </div><div><b>Subject: </b> Re: [Spice-devel] virt-viewer on win10 32bit abort when pullingoutthe USB</div></div><div> </div><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 15, 2018 at 3:40 AM, 王杰东 <span dir="ltr"><<a href="mailto:wangjiedong@kylinos.cn" target="_blank">wangjiedong@kylinos.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Firstly, I installed UsbDk 1.0.19 and VirtViewer 6.0.256 , then i tried UsbDk 1.0.17 and VirtViewer 5.0.256 .</div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>and i tried Sandisk and Kingston usb device , all of these aborted .</div><div>But i never install libusb additionally , only find libusb-1.0.dll in virtviewer\bin\ .</div><div>is that enough ? it's right with windows 64bit when only installing UsbDk and VirtViewer .</div></blockquote><div>Yes this is enough. </div><div><br></div><div>There are two issues that we need to investigate in order to resolve this:</div><div><br></div><div>1. What is the error occuring in the first place</div><div>2. Which component is not handling this failure correctly</div><div><br></div><div>For 1 enabling UsbDk tracing can give us a bigger picture on what's causing this error, please refer to the following link for instructions on tracing UsbDk:</div><div><a href="https://github.com/daynix/UsbDk/blob/master/Documentation/Tracing.txt" target="_blank">https://github.com/daynix/<wbr>UsbDk/blob/master/<wbr>Documentation/Tracing.txt</a><br></div><div><br></div><div>For 2 It could be the usbredir (<a href="https://cgit.freedesktop.org/spice/usbredir" target="_blank">https://cgit.freedesktop.org/<wbr>spice/usbredir</a>) component failing to handle libusb failures. I am not that familiar with the usbredir code,</div><div>but inserting few debug prints in the main loop should give a good idea where this bug lies.</div><div><br></div><div>Please do send traces back so we can further investigate the issue =)</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="text-decoration:underline"></span><div> </div><div> </div><div style="color:rgb(0,0,0)"><div style="font-size:12px;padding:2px 0px">------------------ Original --<wbr>----------------</div><div style="font-size:12px;background:rgb(239,239,239);padding:8px"><div id="gmail-m_-6863793661344964217gmail-m_4282205279386408930menu_sender"><b>From: </b> "Sameeh Jubran"<<a href="mailto:sameeh@daynix.com" target="_blank">sameeh@daynix.com</a>>;</div><div><b>Date: </b> Mon, Jan 15, 2018 00:22 AM</div><div><b>To: </b> "王杰东"<<a href="mailto:wangjiedong@kylinos.cn" target="_blank">wangjiedong@kylinos.cn</a>><wbr>; </div><div><b>Cc: </b> "spice-devel"<<a href="mailto:spice-devel@lists.freedesktop.org" target="_blank">spice-devel@<wbr>lists.freedesktop.org</a>>; </div><div><b>Subject: </b> Re: [Spice-devel] virt-viewer on win10 32bit abort when pulling outthe USB</div></div><div><div class="gmail-m_-6863793661344964217gmail-h5"><div> </div><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 14, 2018 at 11:38 AM, 王杰东 <span dir="ltr"><<a href="mailto:wangjiedong@kylinos.cn" target="_blank">wangjiedong@kylinos.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:sans-serif">I installed lastest virt-viewer and UsbDk on win10 32bit OS , and I successed to redirect my USB to the windows 7 VM .</span><div><span style="font-family:sans-serif">But when i cancelled the check box of the USB or pulled out the USB , remote-viewer.exe aborted at once .<br>I tested some VERSION of virt-viewer、UsbDk and spice-server , but it allways aborted .<br>I got this when --debug "libusb: error [windows_transfer_callvack] detected I/O error 1627: [1627] 执行期间,函数出了问题"<br></span></div></blockquote><div>Which version of libusb, UsbDK are you using? Can you reproduce this with other usb devices?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:sans-serif"><br>Can you help me for this ? Thanks . <br></span><div><div><br></div><div><div><span style="text-decoration:underline"></span><span style="text-decoration:underline"></span></div></div></div></div><br>______________________________<wbr>_________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank">Spice-devel@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-6863793661344964217gmail-m_4282205279386408930m_-3354220385726401759gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(11,83,148);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif">Respectfully,<br></span><div style="font-size:12.8px;color:rgb(136,136,136)"><span style="color:rgb(11,83,148);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif"><b><i>Sameeh Jubran</i></b></span></div><div style="font-size:12.8px;color:rgb(136,136,136)"><i style="color:rgb(7,55,99)"><span style="line-height:15px"><a href="https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a" title="View public profile" name="m_-6863793661344964217_m_4282205279386408930_m_-3354220385726401759_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14e2c1de96f8c195_UNIQUE_ID_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" style="color:rgb(17,85,204);margin:0px;padding:0px;border-width:0px;outline:none;vertical-align:baseline;text-decoration:none" target="_blank">Linkedin</a></span></i><br></div><div style="font-size:12.8px;color:rgb(136,136,136)"><span style="color:rgb(7,55,99);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif"><i>Software Engineer @ <a href="http://www.daynix.com" target="_blank">Daynix</a>.</i></span></div></div></div></div></div></div></div></div></div>
</div></div>

</div></div></div></div><span style="text-decoration:underline"></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-6863793661344964217gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(11,83,148);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif">Respectfully,<br></span><div style="font-size:12.8px;color:rgb(136,136,136)"><span style="color:rgb(11,83,148);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif"><b><i>Sameeh Jubran</i></b></span></div><div style="font-size:12.8px;color:rgb(136,136,136)"><i style="color:rgb(7,55,99)"><span style="line-height:15px"><a href="https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a" title="View public profile" name="m_-6863793661344964217_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14e2c1de96f8c195_UNIQUE_ID_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" style="color:rgb(17,85,204);margin:0px;padding:0px;border-width:0px;outline:none;vertical-align:baseline;text-decoration:none" target="_blank">Linkedin</a></span></i><br></div><div style="font-size:12.8px;color:rgb(136,136,136)"><span style="color:rgb(7,55,99);font-family:"times new roman",serif;font-size:large" size="4" face="times new roman, serif"><i>Software Engineer @ <a href="http://www.daynix.com" target="_blank">Daynix</a>.</i></span></div></div></div></div></div></div></div></div></div>
</div></div>

</div></div></div><br>______________________________<wbr>_________________<br>Spice-devel mailing list<br><a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank">Spice-devel@lists.freedesktop.<wbr>org</a><br><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br></div></div></blockquote><div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font size="4" color="#0b5394" face="times new roman, serif">Respectfully,<br></font><div style="font-size:12.8px;color:rgb(136,136,136)"><font size="4" color="#0b5394" face="times new roman, serif"><b><i>Sameeh Jubran</i></b></font></div><div style="font-size:12.8px;color:rgb(136,136,136)"><i style="color:rgb(7,55,99);font-family:"times new roman",serif;font-size:large"><span style="line-height:15px"><a href="https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a" title="View public profile" name="UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14e2c1de96f8c195_UNIQUE_ID_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" style="color:rgb(17,85,204);margin:0px;padding:0px;border-width:0px;outline:none;vertical-align:baseline;text-decoration:none" target="_blank">Linkedin</a></span></i><br></div><div style="font-size:12.8px;color:rgb(136,136,136)"><font size="4" face="times new roman, serif" color="#073763"><i>Software Engineer @ <a href="http://www.daynix.com" target="_blank">Daynix</a>.</i></font></div></div></div></div></div></div></div></div></div>
</div></div>