Bug 893

Summary: eclipse can not exit if we close the qemu directly
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Lianhao Lu <lianhao.lu>
Component: eclipse-pluginAssignee: Jessica <jessica.zhang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liping.ke, yp.ep.watcher, yp.watcher
Version: 1.0   
Target Milestone: 1.0 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Lianhao Lu 2011-03-17 03:02:11 UTC
Using the following scenario, the eclipse can not be closed correctly:

1. launch the eclipse from the terminal
2. launch the qemu
3. remote debug an application from eclipse
4. directly click the "X" on the qemu window
5. exit eclipse

Then we'll find the eclipse hang after printing "Unsubscribe streams before disconnecting TCP channel". 

This is because by directly click the "X" on the qemu window, the OS still thinks there is an active TCP connection to qemu even though the tap device is deleted.(we can see this by running "netstat -ant") 

The eclipse plugin is waiting for the reply of "unsubscribe stream" for ever. And because the system doesn't think the TCP connection is broken, it won't trigger the IOException which is designed to be caught by the eclipse plugin to handle such kind of situations. 

Is it possible this has something to do with the tap device?
Comment 1 Lianhao Lu 2011-03-17 19:25:46 UTC
The root cause of this bug is the same of bug #203.
Comment 2 liping Ke 2011-03-17 19:40:59 UTC
Sometimes, if target shutdown unexpectedly, the TCF client side
need to unsubsribe all its streams. However, if we use wait style,
it will never receive response and go back. So we use Timeout,
if 1s passes, it will raise an Timeout Exception.

This bug should be fixed by commit: 
http://git.pokylinux.org/cgit/cgit.cgi/eclipse-poky/commit/?id=7f633bcc9cf44c082fd0a2102ea313f0b600228e


Thanks& Regards,
criping