ImageIO hanging on TCP CLOSE_WAIT state on reading a url and closing the JVM?

Paulo Levi i30817 at gmail.com
Wed Dec 30 10:10:23 PST 2009


Hi. I have a ThreadPoolExecutor that is using  a thread factory that creates
deamon threads.
On these threads i do ImageIO.read(someURL).
On a dual core machine i'm seeing hangs when i close my application and the
JVM is in the
ImageIO.read(URL) (i think on native code).

My rationale is the following:
I can't make the application call a thread-dump when it enters this state.
I put a system.out.println("Start "+id) before reading,
and a corresponding finally with a System.out.println("End "+id);

Some starts have no end.
I additionally used process explorer (in windows) to check out the java
process.
While i can't see the thread state (a dll without debuging symbols) i can
see TCP/IP connections state : they are all in CLOSE_WAIT

I would appreciate any way to resolve this issue and if this is a known bug
in either ImageIO or java URLs a pointer to the bug.

Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20091230/5d922b93/attachment.html 


More information about the net-dev mailing list