=== modified file 'modules/system/system.install'
--- modules/system/system.install	2010-09-12 19:17:12 +0000
+++ modules/system/system.install	2010-09-13 19:14:51 +0000
@@ -2672,27 +2672,31 @@ function system_update_6053() {
 function system_update_6054() {
   $ret = array();
 
-  $schema['semaphore'] = array(
-    'fields' => array(
-      'name' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => ''),
-      'value' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-        'default' => ''),
-      'expire' => array(
-        'type' => 'float',
-        'size' => 'big',
-        'not null' => TRUE),
-      ),
-    'indexes' => array('expire' => array('expire')),
-    'primary key' => array('name'),
-  );
-  db_create_table($ret, 'semaphore', $schema['semaphore']);
+  // The table may have already been added by update_fix_d6_requirements(), so
+  // check for its existence before creating.
+  if (!db_table_exists('semaphore')) {
+    $schema['semaphore'] = array(
+      'fields' => array(
+        'name' => array(
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''),
+        'value' => array(
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''),
+        'expire' => array(
+          'type' => 'float',
+          'size' => 'big',
+          'not null' => TRUE),
+        ),
+      'indexes' => array('expire' => array('expire')),
+      'primary key' => array('name'),
+    );
+    db_create_table($ret, 'semaphore', $schema['semaphore']);
+  }
 
   return $ret;
 }

=== modified file 'update.php'
--- update.php	2010-09-12 19:17:12 +0000
+++ update.php	2010-09-13 19:13:17 +0000
@@ -517,6 +517,31 @@ function update_fix_d6_requirements() {
       'primary key' => array('cid'),
     );
     db_create_table($ret, 'cache_block', $schema['cache_block']);
+
+    // Create the semaphore table now -- the menu system after 6.15 depends on
+    // this table, and menu code runs in updates prior to the table being
+    // created in its original update function, system_update_6054().
+    $schema['semaphore'] = array(
+      'fields' => array(
+        'name' => array(
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''),
+        'value' => array(
+          'type' => 'varchar',
+          'length' => 255,
+          'not null' => TRUE,
+          'default' => ''),
+        'expire' => array(
+          'type' => 'float',
+          'size' => 'big',
+          'not null' => TRUE),
+        ),
+      'indexes' => array('expire' => array('expire')),
+      'primary key' => array('name'),
+    );
+    db_create_table($ret, 'semaphore', $schema['semaphore']);
   }
 
   return $ret;

