FreeBSD/FreeNAS Segmentation fault (core dumped)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 20.0.4
Operating system and version (eg, Ubuntu 20.04): FreeBSD 11.3-RELEASE-p11
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.1): PHP 7.3.25

The issue you are facing:
After Enabling MySQL 4-byte support and running sudo -u www php occ maintenance:repair
I now have Segmentation fault (core dumped) everytime I run a php occ command.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

Level
App	Message		Time
Error	PHP	Error: Undefined offset: 0 at /usr/local/www/owncloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#187		2020-12-18T15:35:51-0500
Error	PHP	Error: Undefined offset: 0 at /usr/local/www/owncloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#187		2020-12-18T15:35:51-0500
Error	PHP	Error: Undefined offset: 0 at /usr/local/www/owncloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#187		2020-12-18T15:35:51-0500
Error	PHP	Error: Undefined offset: 0 at /usr/local/www/owncloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#187		2020-12-18T15:35:51-0500
Error	PHP	Error: Undefined offset: 0 at /usr/local/www/owncloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#155		2020-12-18T15:35:51-0500
Fatal	webdav	Sabre\DAV\Exception\ServiceUnavailable: Système en mode maintenance.		2020-12-18T15:33:54-0500

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'updater.secret' => 'secret',
  'updatechecker' => false,
  'instanceid' => 'id',
  'passwordsalt' => 'salt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'do.do.main',
  ),
  'datadirectory' => '/Data',
  'overwrite.cli.url' => 'https://do.do.main',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'dbp',
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => false,
  'loglevel' => 2,
  'appstore.experimental.enabled' => true,
  'theme' => '',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'mysql.utf8mb4' => true,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

The error message in the logs is related to the serverinfo app, try to disable it (occ app:disable…). Segmentation fault looks really bad, are the commands taking too many system resources?

How do I troubleshoot the Segmentation fault? I have a lot of RAM and Processing on the server…

Not sure, first enable the debug mode for logging. If there is not more information, I’d disable the serverinfo app that throws an error in the logs.