0

I'm using Drupal 10.2.4 with Apache 2.4, PHP8.1.2 and MySQl 8

I have just tested locally on Docker upgrading from CiviCRM 5.70.2 to 5.71.1 and get an immediate crash. Here is the Docker output:

2024-03-14 17:09:38 [Thu Mar 14 17:09:38.810014 2024] [core:notice] [pid 1] AH00052: child pid 249 exit signal Segmentation fault (11)

I thought it might be database related so tried doing a database update first before accessing CiviCRM (the Drupal database is already up to date). I get a segmentation fault, along with several Smarty notices:

    www-bridge-user@bfdbdd09a7a9:/var/www/html$ cv upgrade:db
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/org.civicrm.shoreditch/shoreditch.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/eu.businessandcode.notepermissions-master/notepermissions.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/checksum/checksum.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/uk.countrytrust.securenotesfromexport/securenotesfromexport.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/configitems-2.0.0/civiconfig.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/uk.countrytrust.additional-permissions/additional_permissions.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/uk.countrytrust.reroute_email/reroute_email.civix.php:100
[PHP Notice] Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect at /var/www/html/web/sites/default/files/civicrm/ext/summernote-1.2.2/summernote.civix.php:100
Found CiviCRM database version 5.70.2.
Found CiviCRM code version 5.71.1.
Checking pre-upgrade messages...
(No messages)
Dropping SQL triggers...
Preparing upgrade...
Executing upgrade...
..................Segmentation fault

I've never ever seen a segmentation fault before and so its really odd. The same happens on a clone of my live environment, so I do not think this is anything to do with my local Docker development environment (which mimics Live anyway).

Has anyone else seen this? Does anyone have any thoughts on how I troubleshoot this? It maybe something is using all the memory in some way.

In addition, what are the Smarty notices? (I have already added the define statement for CIVICRM_SMARTY3_AUTOLOAD_PATH).

1
  • I have finally tracked this down to an inhouse extension that adds addtional Drupal permissions to control some aspects of CiviCRM like SearchKit reports. The issue seems to lie with the handling of Managed i.e. the single mgd.php we have. Somewhere from 5.70 to 5.71, there must have been a change and I'll need to try to understand where that is and how mgd files are picked up now. when I know for sure,I'll report back
    – ChumKui
    Commented Mar 27 at 11:17

1 Answer 1

1

I have finally tracked it down to an API call that I used to get the values of a particular option group. The code was:

$optionValues = \Civi\Api4\OptionValue::get()
  ->addWhere('option_group_id:name', '=', 'my_group')
  ->execute();

When I went through the debugger, I noticed that the call just went through a loop until memory was just exhausted, hence the segmentation fault. I changed this to:

$optionValues = \Civi\Api4\OptionValue::get(FALSE)
  ->addWhere('option_group_id:name', '=', 'my_group')
  ->execute();

This solved the issue and so it seems that the default of check permisions is now TRUE by default.

The good news is that managed files (mgd.php) are handled by the Mixin [email protected]. Running civix upgrade on the extension removed the code that previously dealt with all that, so that slims the code base down a bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.