From 010d660e5fb9f4d8a593cc2a3a76de89d47f269f Mon Sep 17 00:00:00 2001 From: David Hall Date: Mon, 8 Aug 2016 16:38:38 -0500 Subject: [PATCH] During BPP destroy, check the joinDataReceived member function to ensure the END_JOINER command has been processed before destroy. --- primitives/primproc/primitiveserver.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/primitives/primproc/primitiveserver.cpp b/primitives/primproc/primitiveserver.cpp index ea7616025..deaae576e 100644 --- a/primitives/primproc/primitiveserver.cpp +++ b/primitives/primproc/primitiveserver.cpp @@ -1405,8 +1405,19 @@ struct BPPHandler it = bppMap.find(uniqueID); if (it != bppMap.end()) { - it->second->abort(); - bppMap.erase(it); + boost::shared_ptr bppv = it->second; + if (bppv->joinDataReceived) + { + bppv->abort(); + bppMap.erase(it); + } + else + { + // MCOL-5. On ubuntu, a crash was happening. Checking + // joinDataReceived here fixes it. + // We're not ready for a destroy. Reschedule. + return -1; + } } else { //cout << "got a destroy for an unknown obj " << uniqueID << endl;