Segmentation Fault with occ command

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4 LTS WSL2
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 8.0.13

The issue you are facing: Segmentation fault

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

Everything on the forum has been tried :
sudo -u www-data php ./occ files:cleanup
sudo -u www-data php ./occ files:scan --all
sudo -u www-data php ./occ db:add-missing-indices
sudo -u www-data php ./occ app:update
adding apc.enable_cli=1 ( /etc/php/8.0/cli/conf.d/20-apcu.ini), still no luck.

produce segmentation fault

seg

Does anyone has an idea what could be the problem?

Thanks.

Victor

Hi @vcooper

What does php -v say?

Did you try to execute PHP with the full path like this…?

sudo -u www-data /usr/bin/php8.0 /var/www/nextcloud/occ files:scan --all

Hi @bb77
Thanks for the reply…yes I’ve tried that too…still no luck…before that, there’s no issue executing with or without 8.0, don’t know what breaks the occ command.

On my system I added this line to /etc/php/8.0/mods-available/apcu.ini But I’m not sure if that makes any difference, though. You could also try disabling APCu in the config.php of your Nextcloud temporarily and see if it works without it. Then we would at least know for sure that it has to do with APCu. And maybe also check if all required PHP packages are installed in version 8, especially the php-apcu module.

dpkg --get-selections | grep -i php

@bb77, yes I already have the line added in the mods-available/apc.ini, before this problem exists… My PHP packages are complete…included the php8.0-apcu module. I also have tried changing the line from config.php ‘memcache.local’ => ‘\OC\Memcache\APCu’, to ‘Redis’…and also tried omitting the memcache lines entirely…that too has failed to execute the occ command. Every time I tried those changes, I do the command sudo service apache2 restart and sudo service redis-server restart.

I finally found the cause of the problem…I upgraded the backup Apps from 1.0.0 => 1.0.1…removing it, resolves the occ commands segmentation fault. :man_facepalming:

Seems to be a bug in the Backup app. I have the same issue on my test instance after upgrading the app to version 1.0.1.

Sombody already opened an issue on GitHub…