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

 3014 Olav Sandstaa	2009-02-12
      Bug #40155 [Falcon] Error: assertion (ret == 0) failed at line 80 in file Mutex.cpp
      
      Adding code for writing the error status from the call to pthread_mutex_lock to
      the mysql log file when this error occurs. This does not fix the problem but
      will help understanding why this assert happens.
modified:
  storage/falcon/Mutex.cpp

per-file messages:
  storage/falcon/Mutex.cpp
    Write error status from pthread_mutex_lock to the mysql log file.
=== modified file 'storage/falcon/Mutex.cpp'

=== modified file 'storage/falcon/Mutex.cpp'
--- a/storage/falcon/Mutex.cpp	2007-10-26 19:55:40 +0000
+++ b/storage/falcon/Mutex.cpp	2009-02-12 12:29:29 +0000
@@ -21,6 +21,8 @@
 #undef ASSERT
 #endif
 
+#include <stdio.h>
+
 #include "Engine.h"
 #include "Mutex.h"
 
@@ -40,8 +42,8 @@
 #endif
 
 #ifdef _PTHREADS
-	//int ret = 
-	pthread_mutex_init (&mutex, NULL);
+	int ret = pthread_mutex_init (&mutex, NULL);
+	ASSERT(ret == 0);
 #endif
 
 #ifdef SOLARIS_MT
@@ -77,6 +79,16 @@
 
 #ifdef _PTHREADS
 	int ret = pthread_mutex_lock (&mutex);
+
+	// The following code is added to get more information about why
+	// the call to pthread_mutex_lock fails in some out-of-memory situations,
+	// see bug 40155.
+
+	if (ret != 0)
+		{
+		fprintf(stderr, "[Falcon] Error: Mutex::lock: pthread_mutex_lock returned errno %d\n", ret);
+		fflush(stderr);
+		}
 	ASSERT(ret == 0);
 #endif
 

Thread
bzr commit into mysql-6.0-falcon-team branch (olav:3014) Bug#40155Olav Sandstaa12 Feb