defuse/php-encryption

Invalid opcode 117/2/0

Simian-m opened this issue · 10 comments

Hi there, i've been getting an error with opcode after I've upgraded to PHP8. It seems to get killed on:

error
Symfony\Component\ErrorHandler\Error\FatalError
Invalid opcode 117/2/0.

src/Core.php on line 412;

Core::ensureTrue(
    ->        \in_array($algorithm, $ok_algorithms, true),
            'Algorithm is not a secure cryptographic hash function.'

);

Looking into it, it seems to resolve around opcache commands not working as intended. Anything I can do about this?

I ran into the same issue. It appears to be an issue with PHP 8 core.

php/php-src@fdb05b9

I didn't see this yesterday but I was able to isolate the problem to a bug with opcache and put in a PR #467 to patch this library while we wait to hear from the core devs on a fix upstream.

FYI Received a note that the upstream bug causing this issue has been fixed and patched upstream. They will release the fix in 8.0.1.

Revisiting this, but was this issue in fact resolved in 8.0.1 for you, @wshafer? I am still experiencing it in PHP8.0.3, so I've opened a new bug report. https://bugs.php.net/bug.php?id=80859

Interesting. Running on the latest version (just checked if an upgrade was available), I'm still encountering this after having restarted any related processes (PHP-FPM + Nginx). Thanks for the response @tsusanka.

PHP 8.0.3 (cli) (built: Mar  5 2021 07:53:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.3, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.3, Copyright (c), by Zend Technologies

I'll take that as an opportunity to dive a bit deeper and try to figure out why it is still occurring on our production server.

@corsair Are you sure you're using the correct php-fpm version? In your extract you're using php-cli.

dpkg -s php8.0-fpm | grep Version

@Blitheness Yes, currently on the latest php-fpm. Version: 8.0.3-1+ubuntu18.04.1+deb.sury.org+1

Adding opcache.optimization_level=0 resolves this as noted in the original bug report, but commenting it out results in the same invalid opcode issue. Seeing as it has been resolved for others, I will assume there is something wrong on my end and take a bit to investigate it further. Appreciate it.

I'm no longer having the issue in 8.0.3, but I'm on Debian stable. Not sure if OS will have an effect? Is it feasible for you to update to Ubuntu 20.04 or whatever the latest LTS is?
Version: 8.0.3-1+0~20210305.17+debian10~1...

Sounds like this was a PHP issue, but thanks for reporting it anyway! Please re-open if problems persist.