Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4867

Standalone deadlocks in CRM_Utils_System::checkURL , prevents saving "Force Secure URLs"

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.4, 2.2.5, 2.2.6, 2.2.7
    • Fix Version/s: 2.2.9
    • Component/s: Standalone CiviCRM
    • Labels:
      None

      Description

      In standalone, checkURL deadlocks when $addCookie is true.

      CiviCRM Standalone uses PHP sessions, which cannot be accessed concurrently.
      When checkURL sends a request, that request's PHP interpreter blocks on session_start() [standalone/bootstrap.php line 2] until the session is free. The session never becomes free, since checkURL is waiting for the request to return.

      The user experience is that the "Resource URLs" form hangs during save, and all following CiviCRM pageloads hang, until they clear their browser cookies.
      On the server side, the hung PHP interpreters stay resident for a surprisingly long time (at least an hour). They can be cleared out by restarting Apache.

      Neither Drupal or Joomla is affected by this bug, since Drupal does not use PHP sessions, and Joomla frees its PHP sessions before CiviCRM is called (using session_write_close() )

      This bug was introduced in 2.2.4, with the fix for CRM-4447
      Previously, checkURL used a "HEAD" request instead of a "GET" – which did not trigger session_start()

        Attachments

          Activity

            People

            • Assignee:
              sunil Sunil Pawar
              Reporter:
              jesse_rasa Jesse Wolfe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: