List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:February 23 2009 10:43pm
Subject:bzr commit into mysql-6.0-falcon-team branch (olav:3033) Bug#40155
View as plain text  
#At file:///home/os136802/mysql/develop/repo/falcon-bug40155/ based on revid:olav@stripped

 3033 Olav Sandstaa	2009-02-23
      Bug #40155 Error: assertion (ret == 0) failed at line 80 in file Mutex.cpp
      
      Add a location name to every Mutex object. The purpose is to be able to
      know which mutex an error occurs on.
modified:
  storage/falcon/Connection.cpp
  storage/falcon/Database.cpp
  storage/falcon/Dbb.cpp
  storage/falcon/Event.cpp
  storage/falcon/MemMgr.cpp
  storage/falcon/Mutex.cpp
  storage/falcon/Mutex.h
  storage/falcon/PageWriter.cpp
  storage/falcon/PriorityScheduler.cpp
  storage/falcon/SerialLogFile.cpp
  storage/falcon/SyncObject.cpp
  storage/falcon/Thread.cpp

per-file messages:
  storage/falcon/Connection.cpp
    Add location name to Mutexes.
  storage/falcon/Database.cpp
    Add location name to Mutexes.
  storage/falcon/Dbb.cpp
    Add location name to Mutexes.
  storage/falcon/Event.cpp
    Add location name to Mutexes.
  storage/falcon/MemMgr.cpp
    Add location name to Mutexes.
  storage/falcon/Mutex.cpp
    Add location name to Mutexes.
  storage/falcon/Mutex.h
    Add location name to Mutexes.
  storage/falcon/PageWriter.cpp
    Add location name to Mutexes.
  storage/falcon/PriorityScheduler.cpp
    Add location name to Mutexes.
  storage/falcon/SerialLogFile.cpp
    Add location name to Mutexes.
  storage/falcon/SyncObject.cpp
    Add location name to Mutexes.
  storage/falcon/Thread.cpp
    Add location name to Mutexes.
=== modified file 'storage/falcon/Connection.cpp'

=== modified file 'storage/falcon/Connection.cpp'
--- a/storage/falcon/Connection.cpp	2009-01-27 17:26:16 +0000
+++ b/storage/falcon/Connection.cpp	2009-02-23 22:42:36 +0000
@@ -81,7 +81,7 @@
 #define COOKIE_NAME	"NETFRASTRUCTURE"
 #define UTF8		false
 
-static Mutex		shutdownMutex;
+static Mutex		shutdownMutex("Connection::shutdownMutex");
 //static LinkedList	databases;
 static Database		*firstDatabase;
 static Database		*lastDatabase;

=== modified file 'storage/falcon/Database.cpp'
--- a/storage/falcon/Database.cpp	2009-02-19 00:23:00 +0000
+++ b/storage/falcon/Database.cpp	2009-02-23 22:42:36 +0000
@@ -403,7 +403,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-Database::Database(const char *dbName, Configuration *config, Threads *parent)
+Database::Database(const char *dbName, Configuration *config, Threads *parent) : syncCardinality("Database::syncCardinality"), syncMemory("Database::syncMemory")
 {
 	panicShutdown = false;
 	name = dbName;

=== modified file 'storage/falcon/Dbb.cpp'
--- a/storage/falcon/Dbb.cpp	2009-02-14 15:57:14 +0000
+++ b/storage/falcon/Dbb.cpp	2009-02-23 22:42:36 +0000
@@ -68,7 +68,7 @@
 //////////////////////////////////////////////////////////////////////
 
 
-Dbb::Dbb(Database *dbase)
+Dbb::Dbb(Database *dbase) : sectionsMutex("Dbb::sectionMutex")
 {
 	database = dbase;
 	cache = NULL;
@@ -92,7 +92,7 @@
 }
 
 
-Dbb::Dbb(Dbb *dbb, int tblSpaceId)
+Dbb::Dbb(Dbb *dbb, int tblSpaceId) : sectionsMutex("Dbb::sectionMutex")
 {
 	database = dbb->database;
 	tableSpaceId = tblSpaceId;

=== modified file 'storage/falcon/Event.cpp'
--- a/storage/falcon/Event.cpp	2008-06-11 18:24:29 +0000
+++ b/storage/falcon/Event.cpp	2009-02-23 22:42:36 +0000
@@ -26,7 +26,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-Event::Event()
+Event::Event() : mutex("Event::mutex")
 {
 	eventCount = 0;
 	waiters = NULL;

=== modified file 'storage/falcon/MemMgr.cpp'
--- a/storage/falcon/MemMgr.cpp	2009-01-08 09:05:26 +0000
+++ b/storage/falcon/MemMgr.cpp	2009-02-23 22:42:36 +0000
@@ -289,7 +289,7 @@
 }
 
 
-MemMgr::MemMgr(int rounding, int cutoff, int minAlloc, bool *alive)
+MemMgr::MemMgr(int rounding, int cutoff, int minAlloc, bool *alive) : mutex("MemMgr::mutex")
 {
 	signature = defaultSignature;
 	roundingSize = rounding;
@@ -321,7 +321,7 @@
 }
 
 
-MemMgr::MemMgr(void* arg1, void* arg2)
+MemMgr::MemMgr(void* arg1, void* arg2) : mutex("MemMgr::mutex")
 {
 	MemMgr();
 }

=== modified file 'storage/falcon/Mutex.cpp'
--- a/storage/falcon/Mutex.cpp	2009-02-12 12:29:29 +0000
+++ b/storage/falcon/Mutex.cpp	2009-02-23 22:42:36 +0000
@@ -34,7 +34,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-Mutex::Mutex()
+Mutex::Mutex(const char* desc)
 {
 #ifdef _WIN32
 	//mutex = CreateMutex (NULL, false, NULL);
@@ -51,6 +51,7 @@
 #endif
 
 	holder = NULL;
+	description = desc;
 }
 
 Mutex::~Mutex()
@@ -86,7 +87,7 @@
 
 	if (ret != 0)
 		{
-		fprintf(stderr, "[Falcon] Error: Mutex::lock: pthread_mutex_lock returned errno %d\n", ret);
+		fprintf(stderr, "[Falcon] Error: Mutex::lock: %s: pthread_mutex_lock returned errno %d\n", description, ret);
 		fflush(stderr);
 		}
 	ASSERT(ret == 0);

=== modified file 'storage/falcon/Mutex.h'
--- a/storage/falcon/Mutex.h	2007-10-26 19:55:40 +0000
+++ b/storage/falcon/Mutex.h	2009-02-23 22:42:36 +0000
@@ -47,9 +47,10 @@
 	void unlock();
 	void release();
 	void lock();
-	Mutex();
+	Mutex(const char* desc);
 	~Mutex();
 	Sync	*holder;
+	const char* description;
 	
 #ifdef _WIN32
 	//void*	mutex;

=== modified file 'storage/falcon/PageWriter.cpp'
--- a/storage/falcon/PageWriter.cpp	2008-05-08 20:37:28 +0000
+++ b/storage/falcon/PageWriter.cpp	2009-02-23 22:42:36 +0000
@@ -38,7 +38,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-PageWriter::PageWriter(Database *db)
+PageWriter::PageWriter(Database *db) : syncObject("PageWriter::syncObject")
 {
 	database = db;
 	cache = database->cache;

=== modified file 'storage/falcon/PriorityScheduler.cpp'
--- a/storage/falcon/PriorityScheduler.cpp	2008-06-11 18:24:29 +0000
+++ b/storage/falcon/PriorityScheduler.cpp	2009-02-23 22:42:36 +0000
@@ -19,7 +19,7 @@
 #include "Sync.h"
 #include "Thread.h"
 
-PriorityScheduler::PriorityScheduler(void)
+PriorityScheduler::PriorityScheduler(void) : mutex("PriorityScheduler::mutex")
 {
 	currentPriority = 0;
 	count = 0;

=== modified file 'storage/falcon/SerialLogFile.cpp'
--- a/storage/falcon/SerialLogFile.cpp	2008-11-03 00:34:05 +0000
+++ b/storage/falcon/SerialLogFile.cpp	2009-02-23 22:42:36 +0000
@@ -68,7 +68,7 @@
 //////////////////////////////////////////////////////////////////////
 
 
-SerialLogFile::SerialLogFile(Database *db)
+SerialLogFile::SerialLogFile(Database *db) : syncObject("SerialLogFile::syncObject")
 {
 	database = db;
 	handle = 0;

=== modified file 'storage/falcon/SyncObject.cpp'
--- a/storage/falcon/SyncObject.cpp	2009-02-01 20:54:27 +0000
+++ b/storage/falcon/SyncObject.cpp	2009-02-23 22:42:36 +0000
@@ -102,7 +102,7 @@
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
 
-SyncObject::SyncObject()
+SyncObject::SyncObject() : mutex("SyncObject::mutex")
 {
 	readers = 0;
 	waiters = 0;

=== modified file 'storage/falcon/Thread.cpp'
--- a/storage/falcon/Thread.cpp	2009-01-27 17:32:40 +0000
+++ b/storage/falcon/Thread.cpp	2009-02-23 22:42:36 +0000
@@ -51,7 +51,7 @@
 static pthread_key_t	threadIndex;
 #endif
 
-static Mutex	exitMutex;
+static Mutex	exitMutex("Thread::exitMutex");
 static int		initThreads();
 static int		initialized = initThreads();
 

Thread
bzr commit into mysql-6.0-falcon-team branch (olav:3033) Bug#40155Olav Sandstaa23 Feb
  • Re: bzr commit into mysql-6.0-falcon-team branch (olav:3033) Bug#40155Kevin Lewis24 Feb