diff --git a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php index d407843..75e469a 100644 --- a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php +++ b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php @@ -18,6 +18,7 @@ class DatabaseLockBackend extends LockBackendAbstract { * Implements Drupal\Core\Lock\LockBackedInterface::acquire(). */ public function acquire($name, $timeout = 30.0) { + reqlog('lock acquire start ' . $name); // Insure that the timeout is at least 1 ms. $timeout = max($timeout, 0.001); $expire = microtime(TRUE) + $timeout; @@ -65,6 +66,7 @@ public function acquire($name, $timeout = 30.0) { // an expired lock. } while ($retry); } + reqlog('lock acquire end ' . $name . ': ' . isset($this->locks[$name])); return isset($this->locks[$name]); } @@ -95,11 +97,13 @@ public function lockMayBeAvailable($name) { * Implements Drupal\Core\Lock\LockBackedInterface::release(). */ public function release($name) { + reqlog('lock release start: ' . $name); unset($this->locks[$name]); db_delete('semaphore') ->condition('name', $name) ->condition('value', $this->getLockId()) ->execute(); + reqlog('lock release end: ' . $name); } /** @@ -115,10 +119,15 @@ public function releaseAll($lock_id = NULL) { ->execute(); } + public function __construct() { + reqlog('lock construct ' . $this->getLockId()); + } + /** * Releases pending locks. */ public function __destruct() { - $this->releaseAll(); + //$this->releaseAll() + reqlog('lock destruct ' . $this->getLockId()); } } diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index fdb819a..d02607d 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -691,6 +691,7 @@ public function run(array $methods = array()) { 'function' => $class . '->' . $method . '()', ); $completion_check_id = TestBase::insertAssert($this->testId, $class, FALSE, t('The test did not complete due to a fatal error.'), 'Completion check', $caller); + reqlog('simpletest start ' . $class . ':' . $method); $this->setUp(); if ($this->setup) { try { @@ -705,6 +706,7 @@ public function run(array $methods = array()) { else { $this->fail(t("The test cannot be executed because it has not been set up properly.")); } + reqlog('simpletest end ' . $class . ':' . $method); // Remove the completion check record. TestBase::deleteAssert($completion_check_id); } diff --git a/index.php b/index.php index a6eb61e..ca31675 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,12 @@ use Drupal\Core\DrupalKernel; use Symfony\Component\HttpFoundation\Request; +function reqlog($msg) { + error_log('[' . posix_getpid() . '] ' . $msg); +} + +reqlog('request start'); + /** * Root directory of Drupal installation. */ @@ -35,3 +41,5 @@ $response = $kernel->handle($request)->prepare($request)->send(); $kernel->terminate($request, $response); + +reqlog('request terminate');