List:Commits« Previous MessageNext Message »
From:marko.makela Date:June 30 2010 7:59am
Subject:bzr commit into mysql-trunk-innodb branch (marko.makela:3129) Bug#54583
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.5-innodb/ based on revid:marko.makela@strippedxv00w8r8hq6r

 3129 Marko Mäkelä	2010-06-30
      Bug#54583 InnoDB: Assertion failure sync/sync0sync.c:1226
      
      Silence the UNIV_SYNC_DEBUG assertion failure while upgrading old data files
      to multiple rollback segments during server startup. Because the upgrade
      takes place while InnoDB is running a single thread, we can safely ignore the
      latching order checks without fearing deadlocks.
      
      innobase_start_or_create_for_mysql(): Set srv_is_being_started = FALSE
      only after trx_sys_create_rsegs() has completed.
      
      sync_thread_add_level(): If srv_is_being_started, ignore latching order
      violations for SYNC_TRX_SYS_HEADER and SYNC_IBUF_BITMAP.

    modified:
      storage/innobase/srv/srv0start.c
      storage/innobase/sync/sync0sync.c
=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c	revid:marko.makela@oracle.com-20100629132105-zzdqxv00w8r8hq6r
+++ b/storage/innobase/srv/srv0start.c	revid:marko.makela@stripped0630075949-deoyuaxblmvceoid
@@ -1715,8 +1715,6 @@ innobase_start_or_create_for_mysql(void)
 	os_thread_create(&srv_monitor_thread, NULL,
 			 thread_ids + 4 + SRV_MAX_N_IO_THREADS);
 
-	srv_is_being_started = FALSE;
-
 	if (trx_doublewrite == NULL) {
 		/* Create the doublewrite buffer to a new tablespace */
 
@@ -1731,6 +1729,8 @@ innobase_start_or_create_for_mysql(void)
 
 	trx_sys_create_rsegs(TRX_SYS_N_RSEGS - 1);
 
+	srv_is_being_started = FALSE;
+
 	err = dict_create_or_check_foreign_constraint_tables();
 
 	if (err != DB_SUCCESS) {

=== modified file 'storage/innobase/sync/sync0sync.c'
--- a/storage/innobase/sync/sync0sync.c	revid:marko.makela@stripped-zzdqxv00w8r8hq6r
+++ b/storage/innobase/sync/sync0sync.c	revid:marko.makela@strippedceoid
@@ -40,6 +40,9 @@ Created 9/5/1995 Heikki Tuuri
 #include "srv0srv.h"
 #include "buf0types.h"
 #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */
+#ifdef UNIV_SYNC_DEBUG
+# include "srv0start.h" /* srv_is_being_started */
+#endif /* UNIV_SYNC_DEBUG */
 
 /*
 	REASONS FOR IMPLEMENTING THE SPIN LOCK MUTEX
@@ -1152,6 +1155,13 @@ sync_thread_add_level(
 	case SYNC_TREE_NODE_FROM_HASH:
 		/* Do no order checking */
 		break;
+	case SYNC_TRX_SYS_HEADER:
+		if (srv_is_being_started) {
+			/* This is violated during trx_sys_create_rsegs()
+			when creating additional rollback segments when
+			upgrading in innobase_start_or_create_for_mysql(). */
+			break;
+		}
 	case SYNC_MEM_POOL:
 	case SYNC_MEM_HASH:
 	case SYNC_RECV:
@@ -1160,7 +1170,6 @@ sync_thread_add_level(
 	case SYNC_LOG_FLUSH_ORDER:
 	case SYNC_THR_LOCAL:
 	case SYNC_ANY_LATCH:
-	case SYNC_TRX_SYS_HEADER:
 	case SYNC_FILE_FORMAT_TAG:
 	case SYNC_DOUBLEWRITE:
 	case SYNC_SEARCH_SYS:
@@ -1222,8 +1231,12 @@ sync_thread_add_level(
 			ut_a(sync_thread_levels_g(array, SYNC_IBUF_BITMAP - 1,
 						  TRUE));
 		} else {
-			ut_a(sync_thread_levels_g(array, SYNC_IBUF_BITMAP,
-						  TRUE));
+			/* This is violated during trx_sys_create_rsegs()
+			when creating additional rollback segments when
+			upgrading in innobase_start_or_create_for_mysql(). */
+			ut_a(srv_is_being_started
+			     || sync_thread_levels_g(array, SYNC_IBUF_BITMAP,
+						     TRUE));
 		}
 		break;
 	case SYNC_FSP_PAGE:

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100630075949-deoyuaxblmvceoid.bundle
Thread
bzr commit into mysql-trunk-innodb branch (marko.makela:3129) Bug#54583marko.makela30 Jun