Failed to install/update apps

Hi,

Nextcloud version: Nextcloud Hub 4 (26.0.1)
Operating system and version: FreeBSD 13.2-Release
Apache or nginx version: Nginx1.24.0_6,3
PHP version : 8.1

I recently installed a nexcloud instance.
The installation process ran fine and we are using it for a couple of days.

But, the following error now occurrs when trying to update or install apps:

An error occurred during the request. Unable to proceed

( translated from the french message)

I did not see any relevant entries in the log file. The last one says:

"reqId":"3BlWcAWB4Y33930sexXh","level":3,"time":"2023-05-22T20:37:35+00:00","remoteAddr":"xxxxxxx","user":"xxxx","app":"PHP","method":"GET","url":"/core/preview?fileId=7169&x=250&y=250","message":"sem_get(): Failed for key 0xa11: Function not implemented at /usr/local/www/nextcloud/lib/private/Preview/Generator.php#320","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"26.0.1.1","data":{"app":"PHP"}}

I also tried to perform the operation with the help of occ:

root@nextcloud:/usr/local/www/nextcloud # sudo -u www php --define apc.enable_cli=1 occ app:update --verbose forms
forms new version available: 3.3.0
Illegal instruction

I first though about a files/folder permissions issue but the weird thing is that I was able to install some apps just after the installation process.

Since the installation,

  1. Redis was configured as a memcache.distributed option.
  2. Files were manually added (copied from the former owncloud instance) using occ scan.

Any clue ?

Thanks for your help.

config.php:


TurtleCrazy
Diaspora
diaspora* - Sign in
Serveur Matrix
https://reuz.lapinbilly.eu/#/login

hi @TurtleCrazy welcome to the forum :handshake:

I see you are using FreeBSD which is not on the supported OS list. There might be a difference in PHP or the system itself. Please verify each prerequisite carefully, maybe you miss some module…

I double checked the prerequisite and everything sounds ok. I was confident about the freebsd port, for which the maintainer does a great job.

It also installed a very convenient ready-to-use occ script.

I also have another instance that runs on FreeBSD too, but that one is installed on another architecture, Xeon based (haswell), while the problematic one runs on top of a corei7 one (sandybridge).
The Xeon one was upgraded on top of a former owncloud instance and even if it needs a full cleanup, doesn’t raise this error.

And there should be the issue. I first though that the error message illegal instruction was coming from php or the occ command.

It turns out that it’s a true SIGILL signal, thus, a cpu trap. The software involved is php.

Before removing the march flags to the compiler, I would like to go ahead and find out what is the library or even php code that causes this CPU exception.

As the same machine hosts others php based services (flarum, dokuwiki), it ’ s one nextcloud specific feature (php extension, may be) that trap the CPU.

Therefore, what is the best way to activate some debug information to occ/nextcloud and get closer to the issue ?

Did you read this: General troubleshooting — Nextcloud latest Administration Manual latest documentation

and this: Logging — Nextcloud latest Administration Manual latest documentation

FTR, the is issue was located in the X509 certificate checking (phpseclib).

I don’t know exactly which library is involved in the process, but compiling with machine optimization flags makes the X509 analysis crash.

1 Like

Which ports did you recompile and which options (or makefile edits) did you make (please?) … ?