Edit report at https://bugs.php.net/bug.php?id=78894&edit=1
ID: 78894
Comment by: w1zzard at gmx dot net
Reported by: luis dot armengol at koyi dot tv
Summary: Preload: double free or corruption crash
Status: Feedback
Type: Bug
Package: opcache
Operating System: Centos 7.3
PHP Version: 7.4.2
Block user comment: N
Private report: N
New Comment:
Indeed, the error happens with opcache.preload_user=root, too. I just got lucky on my first test
run.
What's the recommended way to enable preloading now?
Empty opcache.preload_user results in Fatal Error "opcache.preload_user" has not been
defined
Previous Comments:
------------------------------------------------------------------------
[2020-01-27 11:12:51] nikic@php.net
> Correct, changing from opcache.preload_user=username to opcache.preload_user=root fixes the
> problem.
I don't think that works. The referenced issue occurs with any use of opcache.preload_user,
independent of whether it's root or not. Specifying root might just work by luck.
> Why do the docs say "Preloading code as root is not allowed for security reasons. This
> directive facilitates to let the preloading to be run as another user."
Preloading under root is not allowed by default, but explicit use of opcache.preload_user=root is
allowed, if you do want to run preloading under root (e.g. if you use Docker and you're root
anyway).
------------------------------------------------------------------------
[2020-01-27 11:06:13] w1zzard at gmx dot net
Correct, changing from opcache.preload_user=username to opcache.preload_user=root fixes the problem.
Thanks!
Why do the docs say "Preloading code as root is not allowed for security reasons. This
directive facilitates to let the preloading to be run as another user."
------------------------------------------------------------------------
[2020-01-27 08:30:49] nikic@php.net
Do you make use of opcache.preload_user? If so, this might be bug #79128.
------------------------------------------------------------------------
[2020-01-27 07:48:58] w1zzard at gmx dot net
Seeing the same issue on 7.4.2.
The error will appear only after certain number of classes loaded. If I remove one class, I can load
another.
------------------------------------------------------------------------
[2019-12-18 11:36:18] nikic@php.net
I've cloned the zf1 repo and used your preload.php (with Redis commented) with the following
command:
~/php-7.4/sapi/cli/php -c ~/php-7.4/php.ini -d opcache.preload=preload.php -S localhost:8000 -t
demos/Zend/Wildfire/public/ -d include_path=$PWD/library
I couldn't produce a segfault that way (but I only used demos/Zend/Wildfire/public because it
was bundled and looked like web code...)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78894
--
Edit this bug report at https://bugs.php.net/bug.php?id=78894&edit=1