-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libpcre2-8-0 10.44 SIGSEGV segfault crash with PHP 8.1.29 #435
Comments
Hmm, I disabled pcre.jit, but it's still crashing and still using a function name that mentions jit. Here's how it's set in both /etc/php8/apache/php.ini and /etc/php8/cli/php.ini:
I verified that the value is set correctly:
|
According to your report, this line cause the issue: This is simply a value reading and setting a stack allocated variable. Either The second case is strange as well, since it does run jit when you disabled it. Anyway, it looks like it runs the jit code. Please disassemble the code with |
@zherczeg Sorry for the late reply. I just tried this with the latest core:
As for checking whether I have enough stack, could you please provide more details? I did
Just to be clear, the above is all using this latest dump from a couple of days ago:
|
Try Based on your backtrace, there is a lot of ZEND_DO_FCALL_SPEC_OBSERVER_HANDLER/execute_ex recursive calling. |
For only PHP related issues, see php/php-src#15199 (comment). |
It looks like you need to increase the stack space or reduce the recursive depth. The function allocates 0x2c8 bytes, which is surprising considering the function is simple. Perhaps the code is compiled in debug mode. Anyway this does not feels like a pcre2 issue. |
Hi,
We recently updated to OpenSUSE 15.6 (from 15.4) and are testing an update from PHP 8.0 to 8.1 (8.1.29 currently). On the test machine where we're testing, all of a sudden I'm seeing constant PHP8 crashes. After using gdb to see what's going on, they all seem to point to libpcre2-8-0, specifically pcre2_jit_match_8, php_pcre_replace_impl, php_pcre_replace, and php_replace_in_subject.
As has been suggested in other places like #57, oerdnj/deb.sury.org#1721, https://bugs.php.net/bug.php?id=81647, it seems like JIT is the culprit once again (the only other recent PHP crashes I've observed were related to opcache.jit being enabled).
Here's a sample backtrace from one such crash.
As you can see, it looks like the query was just
SELECT 1
and whatever regex was used to parse it crashes the whole PHP.I think in our code (using Wordpress), it happens here:
From what I can tell based on the messages in /var/log/messages, the pcre library loaded is libpcre2-8.so.0.13.0, which according to the package manager is version 10.44 (the latest available).
Any ideas?
The text was updated successfully, but these errors were encountered: