Closed glassfishrobot closed 9 years ago
Reported by godeyes
oleksiys said: Hmm, that's interesting, do you know what kind of Exception is thrown from Transport.closeConnection(...)? Because 1st thing we do there is closing NIO Channel, so I'd expect it should work, otherwise it sounds like NIO bug.
Thank you.
godeyes said: Thank you for your reply. We didn't catch the exception in the log. But AbstractInterrruptibleChannnel.close() of NIO called by Transport.closeConnection(...) is declared to throw IOException. So, I don't think this close() will always work well.
oleksiys said: Can you pls. lower the logging level for org.glassfish.grizzly.nio.transport.TCPNIOTransport to FINEST? It will dump the exception when closeConnection is invoked.
I'd really like to know what kind of exception is that, if it's some Interrupted-like exception - it's one thing and in that case we'll have to find out who interrupts the thread... but if it's some different Exception - we'll probably need to investigate more carefully.
Thank you.
godeyes said: We encountered this issue when there were some network problems. After that, I tried to reproduce this issue but failed. Maybe we could suspend this until the problem reproduces, since we can get more information and logs then.
Thanks.
oleksiys said: It would be great! Thank you!
@rlubke said: Closing this for now per the submitter. Re-open if the issue can be reproduced.
This issue was imported from java.net JIRA GRIZZLY-1758
Marked as cannot reproduce on Friday, October 16th 2015, 1:26:56 pm
We got an endless loop sometimes when there was network problem, as the trace stack shown below. I dived into source code, found there was bug in NIOConnection.close0(416). It set closeTypeFlag NOT_NULL first and then tried to close the connection. If IOException thrown when "transport.closeConnection(NIOConnection.this)", the connection won't be closed FOREVER and lead to an endless loop in TCPNIOTransport.read. I think closeTypeFlag should be set null when IOException caught.
"Grizzly(1) SelectorRunner" daemon prio=10 tid=0x00007f7e013da000 nid=0x1c95 runnable [0x00007f7dc935a000] java.lang.Thread.State: RUNNABLE at java.lang.Throwable.fillInStackTrace(Native Method)
Environment
jdk 1.6.37
Affected Versions
[2.3.8]