#At file:///usr/local/devel/bzrroot/server/mysql-trunk-innodb/ based on revid:marko.makela@stripped
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
=== modified file 'storage/innobase/sync/sync0arr.c'
--- a/storage/innobase/sync/sync0arr.c revid:marko.makela@stripped
+++ b/storage/innobase/sync/sync0arr.c revid:vasil.dimov@stripped
@@ -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);
}
Attachment: [text/bzr-bundle] bzr/vasil.dimov@oracle.com-20101201140708-fsc5xlu9bkpov6pv.bundle
Thread |
---|
• bzr commit into mysql-trunk-innodb branch (vasil.dimov:3351) Bug#58432 | vasil.dimov | 1 Dec |