diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-03-30 14:43:29 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-03-30 14:43:29 +0200 |
commit | a03f3f50ca0692a230377468ca569eaccaa57c29 (patch) | |
tree | 25a579e3a8c6da5154a5e948d6302e26c8c9d002 | |
parent | Fixed ICE-7074 - Glacier2 router bug where client to server requests forward ... (diff) | |
download | ice-a03f3f50ca0692a230377468ca569eaccaa57c29.tar.bz2 ice-a03f3f50ca0692a230377468ca569eaccaa57c29.tar.xz ice-a03f3f50ca0692a230377468ca569eaccaa57c29.zip |
Fixed Glacier2 bug which would cause hang on shutdown
-rw-r--r-- | CHANGELOG-3.6.md | 4 | ||||
-rw-r--r-- | cpp/src/Glacier2/Blobject.cpp | 33 |
2 files changed, 19 insertions, 18 deletions
diff --git a/CHANGELOG-3.6.md b/CHANGELOG-3.6.md index 1ed274d3907..cc713945979 100644 --- a/CHANGELOG-3.6.md +++ b/CHANGELOG-3.6.md @@ -62,6 +62,10 @@ These are the changes since Ice 3.6.1. - Fixed Glacier2 router bug where requests from client to server could be lost if forwarded as batch requests with the _fwd=O context. +- Fixed Glacier2 bug which would occur in un-buffered mode and when forwarding + one-way requests. The Glacier2 router could eventually leak and hang on + shutdown. + ## C++ Changes - Fixed El Capitan build issues caused by a new security feature that no longer diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp index a9c2ce55f80..1f58da34ffb 100644 --- a/cpp/src/Glacier2/Blobject.cpp +++ b/cpp/src/Glacier2/Blobject.cpp @@ -48,7 +48,7 @@ Glacier2::Blobject::Blobject(const InstancePtr& instance, const ConnectionPtr& r _instance->properties()->getPropertyAsInt(clientTraceOverride)), _context(context) { - RequestQueueThreadPtr t = _reverseConnection ? _instance->serverRequestQueueThread() : + RequestQueueThreadPtr t = _reverseConnection ? _instance->serverRequestQueueThread() : _instance->clientRequestQueueThread(); if(t) { @@ -86,17 +86,14 @@ Glacier2::Blobject::invokeResponse(bool ok, const pair<const Byte*, const Byte*> } void -Glacier2::Blobject::invokeSent(bool sent, const AMD_Object_ice_invokePtr& amdCB) +Glacier2::Blobject::invokeSent(bool, const AMD_Object_ice_invokePtr& amdCB) { - if(sent) - { #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) - amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr), - static_cast<const Byte*>(nullptr))); + amdCB->ice_response(true, pair<const Byte*, const Byte*>(static_cast<const Byte*>(nullptr), + static_cast<const Byte*>(nullptr))); #else - amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0)); + amdCB->ice_response(true, pair<const Byte*, const Byte*>(0, 0)); #endif - } } void @@ -124,7 +121,7 @@ Glacier2::Blobject::invokeException(const Exception& ex, const AMD_Object_ice_in } void -Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB, +Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB, const std::pair<const Byte*, const Byte*>& inParams, const Current& current) { // @@ -171,7 +168,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd proxy = proxy->ice_twoway(); break; } - + case 'o': { if(_alwaysBatch && _requestQueue) @@ -184,7 +181,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } break; } - + case 'd': { if(_alwaysBatch && _requestQueue) @@ -197,7 +194,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } break; } - + case 'O': { if(_requestQueue) @@ -210,7 +207,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } break; } - + case 'D': { if(_requestQueue) @@ -223,19 +220,19 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } break; } - + case 's': { proxy = proxy->ice_secure(true); break; } - + case 'z': { proxy = proxy->ice_compress(true); break; } - + default: { Warning out(_instance->logger()); @@ -245,7 +242,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } } } - + if(_requestTraceLevel >= 1) { Trace out(_instance->logger(), "Glacier2"); @@ -284,7 +281,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } if(_requestQueue) - { + { // // If we are in buffered mode, we create a new request and add // it to the request queue. If the request is twoway, we use |