javaee/metro-wsit

Negative case. Suspended parent Fiber is never resumed for exceptions other than DuplicateMessageRegistrationException in com.sun.xml.ws.rx.rm.runtime.ServerDestinationDeliveryCallback.ResponseCallbackHandler.onCompletion(Packet)

Closed this issue · 5 comments

Look at the catch block in com.sun.xml.ws.rx.rm.runtime.ServerDestinationDeliveryCallback.ResponseCallbackHandler.onCompletion(Packet) that catches only DuplicateMessageRegistrationException (as below). Suspended parent Fiber will never be resumed if there is an exception other than DuplicateMessageRegistrationException.

catch (DuplicateMessageRegistrationException ex) {
onCompletion(ex);
}

This was reported first by BobN (bnaugle) few days back when he saw this by accident while getting some positive use case to work but I could reproduce it easily in my debugger by throwing an NPE in the else block right above the catch block (parent Fiber is not resumed, DISI ServiceRequestTransport.request hangs waiting, test client hangs waiting).

There is a to-do note in the code that says "TODO handle RM faults" above the catch block, not fully sure what that entails but the fix for this particular issue could be simple. We could catch Exception rather than catching only DuplicateMessageRegistrationException to make sure that the parent Fiber is always resumed with a Throwable that is thrown. Any type of a hang is problematic even if it is a negative case. Adding a unit test for this negative case will be little tricky but the suggested fix is obvious and harmless by looking at the code.

Environment

RedHat Linux, Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Affected Versions

[2.3.1]

Reported by umjoshi

umjoshi said:
Fixed at svn revision 7598.

Was assigned to umjoshi

This issue was imported from java.net JIRA WSIT-1671

Marked as fixed on Monday, June 3rd 2013, 9:59:21 am