Bug #80175 [Com]: PHP8 RC1 - JIT Buffer not working

From: Date: Wed, 21 Jul 2021 21:39:23 +0000
Subject: Bug #80175 [Com]: PHP8 RC1 - JIT Buffer not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235250@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80175&edit=1

 ID:                 80175
 Comment by:         dieter at mainis dot de
 Reported by:        celestinoxp at hotmail dot com
 Summary:            PHP8 RC1 - JIT Buffer not working
 Status:             Closed
 Type:               Bug
 Package:            JIT
 Operating System:   Windows 10
 PHP Version:        8.0.0rc2
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

It wasn't mentioned in this thread so maybe this might be helpful, too:
For me it turned out that xdebug was the root cause for me that it didn't work. Maybe someone
knows why these two modules interfere with each other? Didn't try the error-log option to my
shame.

Disable xdebug in your php.ini and everything should work.


Previous Comments:
------------------------------------------------------------------------
[2020-10-21 10:05:19] celestinoxp at hotmail dot com

Finally the puzzle is over!
I just tested with zend_extension = php_opcache.dll instead of zend_extension = opcache, and now
when I add the line opcache.jit_buffer_size = (any value ex: 1M) It works !!!!
Tomorrow I will test the new build with zend_extension = opcache, but it should work.

Thanks for the excellent work!

------------------------------------------------------------------------
[2020-10-21 09:49:11] cmb@php.net

Ah, good catch, @nikic!  Indeed, I tested with
zend_extension=php_opcache.dll, but with zend_extension=opcache
RC2 crashes for me as well.

@celestinoxp, it might be best to test with the next nightly
snapshot.

------------------------------------------------------------------------
[2020-10-21 09:32:38] nikic@php.net

There is a chance that the remaining issue is related to bug #80243, which is fixed now as well. It
doesn't actually have to do with JIT, but seems to manifest as a crash there. (This only
affects the case where opcache is loaded using zend_extension=opcache. If it was loaded using
zend_extension=php_opcache.dll, it should not be related.)

------------------------------------------------------------------------
[2020-10-21 09:12:34] cmb@php.net

Well, we need a backtrace to proceed with this, but I just noticed
that the instruction to generate a backtrace on Windows[1] are
terribly outdated. I have rewritten that section, and with this
technique you should be able to get a backtrace even when Apache
crashes right after start.  That backtrace might not be sufficient
for JIT issues, but please give it try.

Anyhow, I checked once again with RC1 and RC2, and while the
former crashes for me, the latter does not, so I'm closing this
ticket, since the respective fix obviously addressed a bug.
Please open a new ticket for your issue.  Thanks. :)

[1] <https://bugs.php.net/bugs-generating-backtrace-win32.php>

------------------------------------------------------------------------
[2020-10-20 12:08:20] celestinoxp at hotmail dot com

Hi, jit_buffer_size still not working. I changed php.ini configuration to this:

opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size = 32M
opcache.jit = 1205

all other lines are commented with ; so values are default.

only when add ; in opcache.jit_buffer_size = 32M, php starts...

I'm frustrated because I don't know where the error is ... and the php log is blank ...
the apache log just says the following:

[Wed Oct 21 13: 06: 57.709383 2020] [core: warn] [pid 624: tid 636] AH00098: pid file C:
/xampp/apache/logs/httpd.pid overwritten - Unclean shutdown of previous Apache run?

------------------------------------------------------------------------


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=80175


--
Edit this bug report at https://bugs.php.net/bug.php?id=80175&edit=1


Thread (27 messages)

« previous php.bugs (#235250) next »