trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-2314] MXOSRVR sometimes exits abnormally with NAMutex assert
Date Fri, 10 Feb 2017 16:12:40 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 18cc630ab -> 554cd32f4


[TRAFODION-2314] MXOSRVR sometimes exits abnormally with NAMutex assert

Fixes as suggested by Selva and Sandhya.

We were hitting the code to make heap thread safe repeatedly while running
jdbc and phoenix tests.

PROCESS_LOB flag was being set incorrectly in some cases.

Unlocking a mutex owned by a different thread lead to the assertion.

This could also result in heap corruption.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/293dbd57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/293dbd57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/293dbd57

Branch: refs/heads/master
Commit: 293dbd5736d43ebdffc67127fc57d6548bf34074
Parents: bce610d
Author: Arvind Narain <narain.arvind@gmail.com>
Authored: Fri Feb 10 00:46:25 2017 +0000
Committer: Arvind Narain <narain.arvind@gmail.com>
Committed: Fri Feb 10 00:46:25 2017 +0000

----------------------------------------------------------------------
 core/sql/common/NAMemory.cpp      | 2 +-
 core/sql/exp/ExpLOBinterface.cpp  | 6 ++++--
 core/sql/generator/GenPreCode.cpp | 8 +++++---
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/293dbd57/core/sql/common/NAMemory.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/NAMemory.cpp b/core/sql/common/NAMemory.cpp
index f8f9c5d..7b781f0 100644
--- a/core/sql/common/NAMemory.cpp
+++ b/core/sql/common/NAMemory.cpp
@@ -2972,7 +2972,7 @@ void NAHeap::setThreadSafe()
   // set this heap and heaps it is derived from
   while (heap)
   {
-    if (heap->threadSafe_ == false);
+    if (heap->threadSafe_ == false)
     {
       rc = pthread_mutex_init(&(heap->mutex_), &attr);
       assert(rc == 0);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/293dbd57/core/sql/exp/ExpLOBinterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.cpp b/core/sql/exp/ExpLOBinterface.cpp
index d8cb3bd..4634eec 100644
--- a/core/sql/exp/ExpLOBinterface.cpp
+++ b/core/sql/exp/ExpLOBinterface.cpp
@@ -66,8 +66,10 @@ Lng32 ExpLOBinterfaceInit(void *& exLobGlob, void * lobHeap,
     {
       NAHeap *heap = new ((NAHeap *)lobHeap) NAHeap("LOB Heap", (NAHeap *)lobHeap);
       if (isHiveRead)
-        ((ExLobGlobals *)exLobGlob)->startWorkerThreads();
-      heap->setThreadSafe();
+        {
+          ((ExLobGlobals *)exLobGlob)->startWorkerThreads();
+          heap->setThreadSafe();
+        }
       ((ExLobGlobals *)exLobGlob)->setHeap(heap);
       
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/293dbd57/core/sql/generator/GenPreCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp
index fddcbf5..0ba3a79 100644
--- a/core/sql/generator/GenPreCode.cpp
+++ b/core/sql/generator/GenPreCode.cpp
@@ -4177,9 +4177,11 @@ RelExpr * FileScan::preCodeGen(Generator * generator,
 	 TRUE);
 
       if (isHiveTable())
-	// assign individual files and blocks to each ESPs
-	((NodeMap *) getPartFunc()->getNodeMap())->assignScanInfos(hiveSearchKey_);
-       generator->setProcessLOB(TRUE);
+        {
+          // assign individual files and blocks to each ESPs
+          ((NodeMap *) getPartFunc()->getNodeMap())->assignScanInfos(hiveSearchKey_);
+          generator->setProcessLOB(TRUE);
+        }
     }
 
   


Mime
View raw message