Hi,
I've been doing some work on making Xdebug run with PHP 8.1 (master)
again, and after my fixes
(https://github.com/xdebug/xdebug/pull/728/files) I am still running
into a crash (or rather, assert, in opcache):
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6bc5537 in __GI_abort () at abort.c:79
#2 0x00007ffff6bc540f in __assert_fail_base (fmt=0x7ffff6d2e128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff45b7584 "ret > 2", file=0x7ffff45b7410 "/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c",
line=327, function=<optimized out>) at assert.c:92
#3 0x00007ffff6bd4662 in __GI___assert_fail (assertion=0x7ffff45b7584 "ret > 2", file=0x7ffff45b7410 "/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c", line=327,
function=0x7ffff45b7810 <PRETTY_FUNCTION.6> "zend_accel_get_type_map_ptr") at assert.c:101
#4 0x00007ffff44a1328 in zend_accel_get_type_map_ptr (type_name=0x4021bbb0, scope=0x408beca0) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327
#5 0x00007ffff44a15a2 in zend_persist_type (type=0x408bf068, scope=0x408beca0) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:352
#6 0x00007ffff44a292a in zend_persist_op_array_ex (op_array=0x408bef00, main_persistent_script=0x0) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:630
#7 0x00007ffff44a34de in zend_persist_class_method (zv=0x408beec0, ce=0x408beca0) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:765
#8 0x00007ffff44a40f8 in zend_persist_class_entry (orig_ce=0x555557324b28) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:876
#9 0x00007ffff44a7047 in zend_accel_persist_class_table (class_table=0x408beaf0) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:1225
#10 0x00007ffff44a7845 in zend_accel_script_persist (script=0x408be9c0, key=0x7fffffff99e0, key_length=80, for_shm=1) at /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:1286
#11 0x00007ffff448c2e3 in cache_script_in_shared_memory (new_persistent_script=0x55555739a8b0, key=0x408beb88 "coverage4.inc:2502976:2352312:/home/derick/dev/php/derickr-xdebug/tests/coverage", key_length=80,
from_shared_memory=0x7fffffff9adc) at /home/derick/dev/php/php-src.git/ext/opcache/ZendAccelerator.c:1550
#12 0x00007ffff448f3b2 in persistent_compile_file (file_handle=0x7fffffff9b80, type=2) at /home/derick/dev/php/php-src.git/ext/opcache/ZendAccelerator.c:2181
#13 0x00007ffff4402461 in xdebug_compile_file (file_handle=0x7fffffff9b80, type=2) at /home/derick/dev/php/derickr-xdebug/src/base/base.c:75
#14 0x0000555555d8bf25 in compile_filename (type=2, filename=0x408be620) at Zend/zend_language_scanner.l:727
#15 0x0000555555e31b86 in zend_include_or_eval (inc_filename=0x408be620, type=2) at /home/derick/dev/php/php-src.git/Zend/zend_execute.c:4270
#16 0x0000555555e40d13 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER () at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:4697
#17 0x0000555555e3ba87 in ZEND_USER_OPCODE_SPEC_HANDLER () at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:3019
#18 0x0000555555eabc4c in execute_ex (ex=0x555557334b40) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:54826
#19 0x00007ffff4404838 in xdebug_execute_ex (execute_data=0x555557334b40) at /home/derick/dev/php/derickr-xdebug/src/base/base.c:765
#20 0x0000555555eb02b6 in zend_execute (op_array=0x5555571afcf0, return_value=0x0) at /home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:59065
#21 0x0000555555dfba96 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/derick/dev/php/php-src.git/Zend/zend.c:1689
#22 0x0000555555d4e84d in php_execute_script (primary_file=0x7fffffffd580) at /home/derick/dev/php/php-src.git/main/main.c:2489
#23 0x0000555555f5ad32 in do_cli (argc=88, argv=0x555556fb0e10) at /home/derick/dev/php/php-src.git/sapi/cli/php_cli.c:964
#24 0x0000555555f5bd80 in main (argc=88, argv=0x555556fb0e10) at /home/derick/dev/php/php-src.git/sapi/cli/php_cli.c:1357
To reproduce:
-
Check out xdebug from GIT, and switch to the php81-fixes branch:
git clone git@github.com:derickr/xdebug.git && cd xdebug && git checkout php81-fixes -
Compile and install
phpize && ./configure --enable-xdebug-dev && make clean && make all && make install -
Run tests:
OPCACHE=yes php run-xdebug-tests.php
(This should show the error, and create the .php file used below): -
For an individual test that shows it (with php.ini disabled):
/usr/local/php/master-zts/bin/php -n -dzend_extension=opcache -dzend_extension=xdebug -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d "xdebug.start_with_request=default" -f "/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php" -
Loading order does not matter:
/usr/local/php/master-zts/bin/php -n -dzend_extension=xdebug -dzend_extension=opcache -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d "xdebug.start_with_request=default" -f "/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php" -
Not loading opcache does work:
/usr/local/php/master-zts/bin/php -n -dzend_extension=xdebug -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d "xdebug.start_with_request=default" -f "/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php"
cheers,
Derick
--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug
We already made few significant changes in PHP-8.1.
e.g. most classes and methods are immutable.
It's not allowed to change them (this is the same as before, but now almost
all of them are immutable). Use opcache.protect_memory=1 to catch
potentially wrong modification.
From the quick look, I don't see how zend_map_ptr_new() may return 0 or 1
at this point.
I'll be able to run xdebug tests only in the middle of the next week.
Thanks. Dmitry.
Hi,
I've been doing some work on making Xdebug run with PHP 8.1 (master)
again, and after my fixes
(https://github.com/xdebug/xdebug/pull/728/files) I am still running
into a crash (or rather, assert, in opcache):php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6bc5537 in __GI_abort () at abort.c:79
#2 0x00007ffff6bc540f in __assert_fail_base (fmt=0x7ffff6d2e128
"%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff45b7584 "ret2", file=0x7ffff45b7410
"/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c",
line=327, function=<optimized out>) at assert.c:92
#3 0x00007ffff6bd4662 in __GI___assert_fail (assertion=0x7ffff45b7584
"ret > 2", file=0x7ffff45b7410
"/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c", line=327,
function=0x7ffff45b7810 <PRETTY_FUNCTION.6>
"zend_accel_get_type_map_ptr") at assert.c:101
#4 0x00007ffff44a1328 in zend_accel_get_type_map_ptr
(type_name=0x4021bbb0, scope=0x408beca0) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327
#5 0x00007ffff44a15a2 in zend_persist_type (type=0x408bf068,
scope=0x408beca0) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:352
#6 0x00007ffff44a292a in zend_persist_op_array_ex (op_array=0x408bef00,
main_persistent_script=0x0) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:630
#7 0x00007ffff44a34de in zend_persist_class_method (zv=0x408beec0,
ce=0x408beca0) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:765
#8 0x00007ffff44a40f8 in zend_persist_class_entry
(orig_ce=0x555557324b28) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:876
#9 0x00007ffff44a7047 in zend_accel_persist_class_table
(class_table=0x408beaf0) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:1225
#10 0x00007ffff44a7845 in zend_accel_script_persist (script=0x408be9c0,
key=0x7fffffff99e0, key_length=80, for_shm=1) at
/home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:1286
#11 0x00007ffff448c2e3 in cache_script_in_shared_memory
(new_persistent_script=0x55555739a8b0, key=0x408beb88
"coverage4.inc:2502976:2352312:/home/derick/dev/php/derickr-xdebug/tests/coverage",
key_length=80,
from_shared_memory=0x7fffffff9adc) at
/home/derick/dev/php/php-src.git/ext/opcache/ZendAccelerator.c:1550
#12 0x00007ffff448f3b2 in persistent_compile_file
(file_handle=0x7fffffff9b80, type=2) at
/home/derick/dev/php/php-src.git/ext/opcache/ZendAccelerator.c:2181
#13 0x00007ffff4402461 in xdebug_compile_file (file_handle=0x7fffffff9b80,
type=2) at /home/derick/dev/php/derickr-xdebug/src/base/base.c:75
#14 0x0000555555d8bf25 in compile_filename (type=2, filename=0x408be620)
at Zend/zend_language_scanner.l:727
#15 0x0000555555e31b86 in zend_include_or_eval (inc_filename=0x408be620,
type=2) at /home/derick/dev/php/php-src.git/Zend/zend_execute.c:4270
#16 0x0000555555e40d13 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER () at
/home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:4697
#17 0x0000555555e3ba87 in ZEND_USER_OPCODE_SPEC_HANDLER () at
/home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:3019
#18 0x0000555555eabc4c in execute_ex (ex=0x555557334b40) at
/home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:54826
#19 0x00007ffff4404838 in xdebug_execute_ex (execute_data=0x555557334b40)
at /home/derick/dev/php/derickr-xdebug/src/base/base.c:765
#20 0x0000555555eb02b6 in zend_execute (op_array=0x5555571afcf0,
return_value=0x0) at
/home/derick/dev/php/php-src.git/Zend/zend_vm_execute.h:59065
#21 0x0000555555dfba96 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/derick/dev/php/php-src.git/Zend/zend.c:1689
#22 0x0000555555d4e84d in php_execute_script (primary_file=0x7fffffffd580)
at /home/derick/dev/php/php-src.git/main/main.c:2489
#23 0x0000555555f5ad32 in do_cli (argc=88, argv=0x555556fb0e10) at
/home/derick/dev/php/php-src.git/sapi/cli/php_cli.c:964
#24 0x0000555555f5bd80 in main (argc=88, argv=0x555556fb0e10) at
/home/derick/dev/php/php-src.git/sapi/cli/php_cli.c:1357To reproduce:
Check out xdebug from GIT, and switch to the php81-fixes branch:
git clone git@github.com:derickr/xdebug.git && cd xdebug && git
checkout php81-fixesCompile and install
phpize && ./configure --enable-xdebug-dev && make clean && make all &&
make installRun tests:
OPCACHE=yes php run-xdebug-tests.php
(This should show the error, and create the .php file used below):For an individual test that shows it (with php.ini disabled):
/usr/local/php/master-zts/bin/php -n -dzend_extension=opcache
-dzend_extension=xdebug -d "opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d
"xdebug.start_with_request=default" -f
"/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php"Loading order does not matter:
/usr/local/php/master-zts/bin/php -n -dzend_extension=xdebug
-dzend_extension=opcache -d "opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d
"xdebug.start_with_request=default" -f
"/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php"Not loading opcache does work:
/usr/local/php/master-zts/bin/php -n -dzend_extension=xdebug -d
"opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -d "xdebug.mode=coverage" -d
"xdebug.start_with_request=default" -f
"/home/derick/dev/php/derickr-xdebug/tests/coverage/coverage4-php74.php"cheers,
Derick--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)
Just run it as:
wget https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt -O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d "opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f xdebug_var_dump_typed_properties-text.php
Result:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Aborted
cheers,
Derick
I suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.
Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick
Hi,
It's not just my own build, see this one on OSX on Azure Pipelines (line
427):
Which is a build from scratch.
And I've locally also just rebuild from scratch, but still getting the
same result.
My build log:
http://derickrethans.nl/files/dump/master.log
My configure line:
'./configure' '--prefix=/usr/local/php/master' '--enable-debug' '--with-gettext' '--with-gd' '--enable-gd' '--with-jpeg' '--without-freetype' '--with-jpeg-dir=/usr' '--without-freetype-dir' '--with-mysql=mysqlnd' '--enable-bcmath' '--with-readline' '--with-openssl' '--without-esmtp' '--with-curl' '--with-sodium' '--with-ffi' '--with-mysqli' '--enable-pcntl' '--enable-sockets' '--enable-zip' '--with-zip' '--enable-memory-limit' '--with-mcrypt' '--with-libxml' '--enable-libxml' '--with-iconv' '--enable-wddx' '--enable-calendar' '--with-sqlite3' '--enable-spl' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-sqlite' '--with-ctype' '--with-bz2' '--enable-mbstring' '--with-mime-magic' '--with-xmlrpc' '--with-zlib' '--disable-zend-memory-manager' '--with-esmtp' '--with-xsl' '--enable-exif' '--enable-soap' '--enable-ftp' '--enable-intl' '--enable-opcache' '--enable-fpm' '--enable-fileinfo' '--with-pear'
cheers,
Deric
I suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick
--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug
I can't reproduce this on Linux.
[dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d
opcache.enable_cli=1 -d opcache.optimization_level=-1
tests/tracing/functrace_typed_properties.phpt
...
PHP_VERSION
: 8.1.0-dev
...
PASS Test for function traces with typed properties
[tests/tracing/functrace_typed_properties.phpt]
...
Thanks. Dmitry
Hi,
It's not just my own build, see this one on OSX on Azure Pipelines (line
427):Which is a build from scratch.
And I've locally also just rebuild from scratch, but still getting the
same result.My build log:
http://derickrethans.nl/files/dump/master.logMy configure line:
'./configure' '--prefix=/usr/local/php/master' '--enable-debug'
'--with-gettext' '--with-gd' '--enable-gd' '--with-jpeg'
'--without-freetype' '--with-jpeg-dir=/usr' '--without-freetype-dir'
'--with-mysql=mysqlnd' '--enable-bcmath' '--with-readline' '--with-openssl'
'--without-esmtp' '--with-curl' '--with-sodium' '--with-ffi'
'--with-mysqli' '--enable-pcntl' '--enable-sockets' '--enable-zip'
'--with-zip' '--enable-memory-limit' '--with-mcrypt' '--with-libxml'
'--enable-libxml' '--with-iconv' '--enable-wddx' '--enable-calendar'
'--with-sqlite3' '--enable-spl' '--enable-pdo' '--with-pdo-mysql'
'--with-pdo-sqlite' '--with-ctype' '--with-bz2' '--enable-mbstring'
'--with-mime-magic' '--with-xmlrpc' '--with-zlib'
'--disable-zend-memory-manager' '--with-esmtp' '--with-xsl' '--enable-exif'
'--enable-soap' '--enable-ftp' '--enable-intl' '--enable-opcache'
'--enable-fpm' '--enable-fileinfo' '--with-pear'cheers,
DericI suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug
I can't reproduce this on Linux.
[dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d
opcache.enable_cli=1 -d opcache.optimization_level=-1
tests/tracing/functrace_typed_properties.phpt...
PHP_VERSION : 8.1.0-dev
...
PASS Test for function traces with typed properties
[tests/tracing/functrace_typed_properties.phpt]
...
That's curious. I'm locally on Debian Linux, and Azure pipelines is on OSX. How can we figure this out? Want to do a screenshare or something? Perhaps it's a compiler issue? I'm building in debug mode FWIW. And see it with and without ZTS.
Did you try my one liner without xdebug involved at all too?
cheers,
Derick
On 4 March 2021 20:22:37 GMT, Dmitry Stogov dmitrystogov@gmail.com
wrote:I can't reproduce this on Linux.
[dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d
opcache.enable_cli=1 -d opcache.optimization_level=-1
tests/tracing/functrace_typed_properties.phpt...
PHP_VERSION : 8.1.0-dev
...
PASS Test for function traces with typed properties
[tests/tracing/functrace_typed_properties.phpt]
...That's curious. I'm locally on Debian Linux, and Azure pipelines is on
OSX. How can we figure this out? Want to do a screenshare or something?
Perhaps it's a compiler issue? I'm building in debug mode FWIW. And see it
with and without ZTS.
Do you use CLANG on Linux?
I won't be able to work on this before March 9.
Did you try my one liner without xdebug involved at all too?
Everything works fine for me.
We test OSX build without xdebug on Azure, and didn't see a similar problem.
Thanks. Dmitry.
cheers,
Derick
On 4 March 2021 20:22:37 GMT, Dmitry Stogov dmitrystogov@gmail.com
wrote:I can't reproduce this on Linux.
[dmitry@tpl2 xdebug]$ php run-xdebug-tests.php -d opcache.enable=1 -d
opcache.enable_cli=1 -d opcache.optimization_level=-1
tests/tracing/functrace_typed_properties.phpt...
PHP_VERSION : 8.1.0-dev
...
PASS Test for function traces with typed properties
[tests/tracing/functrace_typed_properties.phpt]
...That's curious. I'm locally on Debian Linux, and Azure pipelines is on
OSX. How can we figure this out? Want to do a screenshare or something?
Perhaps it's a compiler issue? I'm building in debug mode FWIW. And see it
with and without ZTS.Do you use CLANG on Linux?
No, GCC 10:
gcc version 10.2.1 20210110 (Debian 10.2.1-6)
I think it could perhaps use GCC on Azure/OSX too:
85: checking whether we are using the GNU C compiler... yes
But I'm not sure whether CLang would respond the same.
Did you try my one liner without xdebug involved at all too?
Everything works fine for me. We test OSX build without xdebug on
Azure, and didn't see a similar problem.
How odd :-/
cheers,
Derick
--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug
Hello,
I was also able to reproduce the error.
I used the latest available "daily" cloud image for Debian Buster and
created a small recipe to reproduce. Hopefully this helps in finding the
problem.
Greets
Dennis
wget
"https://cloud.debian.org/images/cloud/buster/20210208-542/debian-10-nocloud-amd64-20210208-542.tar.xz"
tar -xvf "debian-10-nocloud-amd64-20210208-542.tar.xz"
Resized the image, 2GB is to small
dd if=/dev/zero bs=1M count=1 seek=20479 of=disk.raw
echo ", +" | /sbin/sfdisk -N 1 disk.raw
sudo losetup -f --show disk.raw
sudo partprobe /dev/loop0
sudo e2fsck -f /dev/loop0p1
sudo resize2fs /dev/loop0p1
sudo losetup -d /dev/loop0
create and start VM, e.g. with virt-manager
Inside VM
Generate ssh host keys
dpkg-reconfigure openssh-server
Change PermitRootLogin, PasswordAuthentication and
PermitEmptyPasswords to yes to login without password/key
systemctl restart sshd.service
apt install git autoconf make gcc g++ pkg-config bison re2c libssl-dev
libxml2-dev libsqlite3-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev
libpng-dev libjpeg-dev libonig-dev libreadline-dev libsodium-dev
libxslt1-dev libzip-dev libffi-dev
git clone https://github.com/php/php-src
cd php-src
./buildconf
./configure '--prefix=/usr/local/php/master' '--enable-debug'
'--with-gettext' '--with-gd' '--enable-gd' '--with-jpeg'
'--without-freetype' '--with-jpeg-dir=/usr' '--without-freetype-dir'
'--with-mysql=mysqlnd' '--enable-bcmath' '--with-readline'
'--with-openssl' '--without-esmtp' '--with-curl' '--with-sodium'
'--with-ffi' '--with-mysqli' '--enable-pcntl' '--enable-sockets'
'--enable-zip' '--with-zip' '--enable-memory-limit' '--with-mcrypt'
'--with-libxml' '--enable-libxml' '--with-iconv' '--enable-wddx'
'--enable-calendar' '--with-sqlite3' '--enable-spl' '--enable-pdo'
'--with-pdo-mysql' '--with-pdo-sqlite' '--with-ctype' '--with-bz2'
'--enable-mbstring' '--with-mime-magic' '--with-xmlrpc' '--with-zlib'
'--disable-zend-memory-manager' '--with-esmtp' '--with-xsl'
'--enable-exif' '--enable-soap' '--enable-ftp' '--enable-intl'
'--enable-opcache' '--enable-fpm' '--enable-fileinfo' '--with-pear'
make && make install
cd ~
wget
"https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt"
-O "xdebug_var_dump_typed_properties-text.php"
/usr/local/php/master/bin/php -n -dzend_extension=opcache -d
"opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -f xdebug_var_dump_typed_properties-text.php
Am 04.03.21 um 19:14 schrieb Dmitry Stogov:
I suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick
This is fixed in master.
Thanks. Dmitry.
On Fri, Mar 5, 2021 at 4:43 PM Dennis Birkholz php@dennis.birkholz.biz
wrote:
Hello,
I was also able to reproduce the error.
I used the latest available "daily" cloud image for Debian Buster and
created a small recipe to reproduce. Hopefully this helps in finding the
problem.Greets
Denniswget
"
https://cloud.debian.org/images/cloud/buster/20210208-542/debian-10-nocloud-amd64-20210208-542.tar.xz
"
tar -xvf "debian-10-nocloud-amd64-20210208-542.tar.xz"Resized the image, 2GB is to small
dd if=/dev/zero bs=1M count=1 seek=20479 of=disk.raw
echo ", +" | /sbin/sfdisk -N 1 disk.raw
sudo losetup -f --show disk.raw
sudo partprobe /dev/loop0
sudo e2fsck -f /dev/loop0p1
sudo resize2fs /dev/loop0p1
sudo losetup -d /dev/loop0create and start VM, e.g. with virt-manager
Inside VM
Generate ssh host keys
dpkg-reconfigure openssh-server
Change PermitRootLogin, PasswordAuthentication and
PermitEmptyPasswords to yes to login without password/key
systemctl restart sshd.serviceapt install git autoconf make gcc g++ pkg-config bison re2c libssl-dev
libxml2-dev libsqlite3-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev
libpng-dev libjpeg-dev libonig-dev libreadline-dev libsodium-dev
libxslt1-dev libzip-dev libffi-devgit clone https://github.com/php/php-src
cd php-src
./buildconf
./configure '--prefix=/usr/local/php/master' '--enable-debug'
'--with-gettext' '--with-gd' '--enable-gd' '--with-jpeg'
'--without-freetype' '--with-jpeg-dir=/usr' '--without-freetype-dir'
'--with-mysql=mysqlnd' '--enable-bcmath' '--with-readline'
'--with-openssl' '--without-esmtp' '--with-curl' '--with-sodium'
'--with-ffi' '--with-mysqli' '--enable-pcntl' '--enable-sockets'
'--enable-zip' '--with-zip' '--enable-memory-limit' '--with-mcrypt'
'--with-libxml' '--enable-libxml' '--with-iconv' '--enable-wddx'
'--enable-calendar' '--with-sqlite3' '--enable-spl' '--enable-pdo'
'--with-pdo-mysql' '--with-pdo-sqlite' '--with-ctype' '--with-bz2'
'--enable-mbstring' '--with-mime-magic' '--with-xmlrpc' '--with-zlib'
'--disable-zend-memory-manager' '--with-esmtp' '--with-xsl'
'--enable-exif' '--enable-soap' '--enable-ftp' '--enable-intl'
'--enable-opcache' '--enable-fpm' '--enable-fileinfo' '--with-pear'
make && make installcd ~
wget
"
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
"
-O "xdebug_var_dump_typed_properties-text.php"
/usr/local/php/master/bin/php -n -dzend_extension=opcache -d
"opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpAm 04.03.21 um 19:14 schrieb Dmitry Stogov:
I suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick
Hi Dmitry,
I can confirm that it works locally again too now.
cheers,
Derick
This is fixed in master.
Thanks. Dmitry.
On Fri, Mar 5, 2021 at 4:43 PM Dennis Birkholz php@dennis.birkholz.biz
wrote:Hello,
I was also able to reproduce the error.
I used the latest available "daily" cloud image for Debian Buster and
created a small recipe to reproduce. Hopefully this helps in finding the
problem.Greets
Denniswget
"
https://cloud.debian.org/images/cloud/buster/20210208-542/debian-10-nocloud-amd64-20210208-542.tar.xz
"
tar -xvf "debian-10-nocloud-amd64-20210208-542.tar.xz"Resized the image, 2GB is to small
dd if=/dev/zero bs=1M count=1 seek=20479 of=disk.raw
echo ", +" | /sbin/sfdisk -N 1 disk.raw
sudo losetup -f --show disk.raw
sudo partprobe /dev/loop0
sudo e2fsck -f /dev/loop0p1
sudo resize2fs /dev/loop0p1
sudo losetup -d /dev/loop0create and start VM, e.g. with virt-manager
Inside VM
Generate ssh host keys
dpkg-reconfigure openssh-server
Change PermitRootLogin, PasswordAuthentication and
PermitEmptyPasswords to yes to login without password/key
systemctl restart sshd.serviceapt install git autoconf make gcc g++ pkg-config bison re2c libssl-dev
libxml2-dev libsqlite3-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev
libpng-dev libjpeg-dev libonig-dev libreadline-dev libsodium-dev
libxslt1-dev libzip-dev libffi-devgit clone https://github.com/php/php-src
cd php-src
./buildconf
./configure '--prefix=/usr/local/php/master' '--enable-debug'
'--with-gettext' '--with-gd' '--enable-gd' '--with-jpeg'
'--without-freetype' '--with-jpeg-dir=/usr' '--without-freetype-dir'
'--with-mysql=mysqlnd' '--enable-bcmath' '--with-readline'
'--with-openssl' '--without-esmtp' '--with-curl' '--with-sodium'
'--with-ffi' '--with-mysqli' '--enable-pcntl' '--enable-sockets'
'--enable-zip' '--with-zip' '--enable-memory-limit' '--with-mcrypt'
'--with-libxml' '--enable-libxml' '--with-iconv' '--enable-wddx'
'--enable-calendar' '--with-sqlite3' '--enable-spl' '--enable-pdo'
'--with-pdo-mysql' '--with-pdo-sqlite' '--with-ctype' '--with-bz2'
'--enable-mbstring' '--with-mime-magic' '--with-xmlrpc' '--with-zlib'
'--disable-zend-memory-manager' '--with-esmtp' '--with-xsl'
'--enable-exif' '--enable-soap' '--enable-ftp' '--enable-intl'
'--enable-opcache' '--enable-fpm' '--enable-fileinfo' '--with-pear'
make && make installcd ~
wget
"
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
"
-O "xdebug_var_dump_typed_properties-text.php"
/usr/local/php/master/bin/php -n -dzend_extension=opcache -d
"opcache.enable=1" -d "opcache.enable_cli=1" -d
"opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpAm 04.03.21 um 19:14 schrieb Dmitry Stogov:
I suppose, something is wrong with your build.
This code works fine for me.
Please, try full rebuild.Thanks. Dmitry.
Hi,
turns out that this test fails even without Xdebug even loaded, so it's
not something on my side :-)Just run it as:
wget
https://derickrethans.nl/files/dump/xdebug_var_dump_typed_properties-text.php.txt
-O xdebug_var_dump_typed_properties-text.php
php -n -dzend_extension=opcache -d "opcache.enable=1" -d
"opcache.enable_cli=1" -d "opcache.optimization_level=-1" -f
xdebug_var_dump_typed_properties-text.phpResult:
php: /home/derick/dev/php/php-src.git/ext/opcache/zend_persist.c:327:
zend_accel_get_type_map_ptr: Assertion `ret > 2' failed.
Abortedcheers,
Derick
--
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug