List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:December 1 2010 2:16pm
Subject:bzr push into mysql-trunk-innodb branch (vasil.dimov:3350 to 3351) Bug#58432
View as plain text  
 3351 Vasil Dimov	2010-12-01
      Fix Bug#58432 innodb.innodb_bug56143 fails under valgrind
      
      Use a longer timeout for semaphore waits if (possibly) running under
      Valgrind.
      
      Approved by:	Marko (via IRC)

    modified:
      storage/innobase/sync/sync0arr.c
 3350 Marko Mäkelä	2010-12-01 [merge]
      Merge mysql-5.5-innodb to mysql-trunk-innodb.

    modified:
      storage/innobase/buf/buf0buf.c
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/ibuf0ibuf.h
=== modified file 'storage/innobase/sync/sync0arr.c'
--- a/storage/innobase/sync/sync0arr.c	revid:marko.makela@oracle.com-20101201131919-q00f8y04ce5731gk
+++ b/storage/innobase/sync/sync0arr.c	revid:vasil.dimov@stripped201140708-fsc5xlu9bkpov6pv
@@ -923,12 +923,25 @@ sync_array_print_long_waits(void)
 	ulint		fatal_timeout = srv_fatal_semaphore_wait_threshold;
 	ibool		fatal = FALSE;
 
+#ifdef UNIV_DEBUG_VALGRIND
+	/* Increase the timeouts if running under valgrind because it executes
+	extremely slowly. UNIV_DEBUG_VALGRIND does not necessary mean that
+	we are running under valgrind but we have no better way to tell.
+	See Bug#58432 innodb.innodb_bug56143 fails under valgrind
+	for an example */
+# define SYNC_ARRAY_TIMEOUT	2400
+	fatal_timeout *= 10;
+#else
+# define SYNC_ARRAY_TIMEOUT	240
+#endif
+
 	for (i = 0; i < sync_primary_wait_array->n_cells; i++) {
 
 		cell = sync_array_get_nth_cell(sync_primary_wait_array, i);
 
 		if (cell->wait_object != NULL && cell->waiting
-		    && difftime(time(NULL), cell->reservation_time) > 240) {
+		    && difftime(time(NULL), cell->reservation_time)
+		    > SYNC_ARRAY_TIMEOUT) {
 			fputs("InnoDB: Warning: a long semaphore wait:\n",
 			      stderr);
 			sync_array_cell_print(stderr, cell);
@@ -970,6 +983,8 @@ sync_array_print_long_waits(void)
 			" to the standard error stream\n");
 	}
 
+#undef SYNC_ARRAY_TIMEOUT
+
 	return(fatal);
 }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-innodb branch (vasil.dimov:3350 to 3351) Bug#58432vasil.dimov1 Dec