Edit report at https://bugs.php.net/bug.php?id=79128&edit=1
ID: 79128
Updated by: nikic@php.net
Reported by: dotbox at gmail dot com
Summary: SIGABRT double free or corruption with preloading
-Status: Open
+Status: Verified
Type: Bug
Package: opcache
Operating System: Debian Buster
PHP Version: 7.4.2
Block user comment: N
Private report: N
New Comment:
I was able to reproduce this issue outside Docker using "sudo !! -d
opcache.preload_user=root".
Previous Comments:
------------------------------------------------------------------------
[2020-01-24 11:12:49] dotbox at gmail dot com
As PHP 7.4.2 was released, although the changes between 7.4.2rc1 and 7.4.2 are minimal, I gave it a
try with the new docker images available and I have the exact same segfault.
------------------------------------------------------------------------
[2020-01-17 14:14:47] w3goodies dot com at gmail dot com
Can vote to this same case. I am using official PHP docker images and tested with PHP 7.4.1 and 7.4
and built 7.4.2 myself using same code as in 7.4.1 by just changing the download urls of PHP source.
The issue persists in all the versions.
------------------------------------------------------------------------
[2020-01-17 13:26:11] dotbox at gmail dot com
I could not find official PHP 7.4.2rc1 docker images, so i build my own by cloning the repo from https://github.com/docker-library/php, then i
changed the 7.4/buster/cli/Dockerfile lines 67 to 69:
-ENV PHP_VERSION 7.4.1
-ENV PHP_URL="https://www.php.net/get/php-7.4.1.tar.xz/from/this/mirror"
PHP_ASC_URL="https://www.php.net/get/php-7.4.1.tar.xz.asc/from/this/mirror"
-ENV PHP_SHA256="561bb866bdd509094be00f4ece7c3543ec971c4d878645ee81437e291cffc762"
PHP_MD5=""
+ENV PHP_VERSION 7.4.2RC1
+ENV PHP_URL="https://downloads.php.net/~derick/php-7.4.2RC1.tar.xz"
PHP_ASC_URL=""
+ENV PHP_SHA256="" PHP_MD5=""
then i build with docker build . --tag php:dbg and then run with docker run -t -i --rm -p 8000:8000
php:dbg /bin/bash, sadly the same problem :-(
------------------------------------------------------------------------
[2020-01-17 13:06:11] nikic@php.net
PHP 7.4.1 has known issues with preloading, so I'm not surprised that they exhibit this issue.
I'm assuming that images for 7.4.2rc1 are not available?
------------------------------------------------------------------------
[2020-01-17 12:59:30] dotbox at gmail dot com
Thanks Nikita for having a look.
I tried on my local workstation (Fedora 30) with compiling from source (7.4.1 and 7.4.2RC1) and also
could not reproduce in this case, but i was able to reproduce this with the official PHP docker
images.
You can try with 7.4.1-cli-buster image:
docker run -t -i --rm -p 8000:8000 php:7.4.1-cli-buster /bin/bash
cd /tmp
curl -L -o oxid.tar.gz https://github.com/OXID-eSales/oxideshop_ce/archive/v6.5.0.tar.gz
tar -xvzf oxid.tar.gz
cd oxideshop_ce-6.5.0/
curl -o source/preload.php https://pastebin.com/raw/g2Pzm16r
php -n -d zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/opcache.so -S
localhost:8000 -t source/ -d opcache.preload=source/preload.php -d opcache.preload_user=root &
curl localhost:8000
And with the 7.4.1-cli-alpine image:
docker run -t -i --rm -p 8000:8000 php:7.4.1-cli-alpine3.11 /bin/sh
cd /tmp
curl -L -o oxid.tar.gz https://github.com/OXID-eSales/oxideshop_ce/archive/v6.5.0.tar.gz
tar -xvzf oxid.tar.gz
cd oxideshop_ce-6.5.0/
curl -o source/preload.php https://pastebin.com/raw/g2Pzm16r
php -n -d zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/opcache.so -S
localhost:8000 -t source/ -d opcache.preload=source/preload.php -d opcache.preload_user=root &
curl localhost:8000
(the only difference is /bin/sh instead of /bin/bash)
I played around with those Dockerfiles for 7.4.1-cli-buster and 7.4.1-cli-alpine3.11, i tried
removing the CFLAGS, CPPFLAGS, LDFLAGS as well as all configure options besides --enable-opcache,
but it still core dumped with the same stack trace as in the original report (besides the apache
part of course, but the rest is exactly the same).
As i could rule out Ubuntu (be using Fedora without a problem and Alpine having the same problem),
compile flags and other modules (by not compiling and calling with php -n), the only common
denominator i could find in this case is docker (or LXC).
Disclaimer: i am not very much used to debug C code, so there could be other differences as well ;-)
Could you assist me with how to proceed?
------------------------------------------------------------------------
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=79128
--
Edit this bug report at https://bugs.php.net/bug.php?id=79128&edit=1