Summary: | ClientGIOPConnection/closeAllowReopen and threads | ||
---|---|---|---|
Product: | JacORB | Reporter: | Nick Cross <jacorb> |
Component: | ORB | Assignee: | Nick Cross <jacorb> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | mesnierp |
Priority: | P5 | ||
Version: | 3.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: | example of failure raised by this bug fix |
Description
Nick Cross
2013-10-15 16:50:36 UTC
Fixed on master by 0b9f406a288dcba2fe3cd4a6bcadcf8c412a9559 and branch by 8ce56ede8b404bf6c37e21fa31c4ac55c9976853 Created attachment 456 [details]
example of failure raised by this bug fix
The attached patch modifies the hello demo to illustrate a negative side effect to the current fix for this bug.
Given a server listening on a specific endpoint, a client will hang indefinitely if the server dies and is restarted while the client is still running. It seems that when "disconnect_after_systemexception" is true, the thread in GIOPConnection.receiveMessages exits but later after a new connection is established no thread reenters receiveMessages so the server's reply message is never received and the client is hung.
My test has to be run by hand, use separate command lines for client and server.
cd demo/hello
jaco -cp target/classes org.jacorb.demo.hello.Server hello.ior
and
cd demo/hello
jaco -cp target/classes org.jacorb.demo.hello.Client hello.ior
While the client is sleeping, kill and restart the server. Observe the client hangs after sending the request. Note that uncommenting Client.java line 43:
// p.setProperty ("jacorb.connection.client.disconnect_after_systemexception", "false");
allows the client to recover.
reopening as there is still an issue here. Discussing with Phil - might need a patch in ClientConnectionManager Fix 932cf57c941d6794e180fd69272fbfc46b38d5d9 applied. |