Closed archon810 closed 3 months ago
warning: .dynamic section for "/usr/lib64/libpcre2-8.so.0" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib64/libcurl.so.4" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/usr/lib64/libxcb.so.1" is not at the expected address (wrong library or version mismatch?)
...
Quick question, with which opensuse release 8.1.29 comes from/had been built ?
The Leap 15.6 release incorporates several key software upgrades enhancing performance and security. It integrates Linux Kernel 6.4, which provides backports for some of latest hardware drivers, which offer performance enhancements. OpenSSL 3.1 becomes the new default and provides robust security features and updated cryptographic algorithms. Database management systems receive significant updates with MariaDB 10.11.6 and PostgreSQL 16. Redis 7.2 offers advanced data handling capabilities and the software stack is rounded out with PHP 8.2
php8│ │8.1.29-lp156.2.1 │openSUSE BuildService - devel:languages:php
In this case, it came from this repo:
zypper addrepo -f --name "openSUSE BuildService - devel:languages:php" https://download.opensuse.org/repositories/devel:/languages:/php:/php81/openSUSE_Leap_15.6/ "download.opensuse.org-php"
We also tested PHP 8.2, but some Wordpress plugins we're using haven't been updated for it yet and output a lot of notices/warnings, so the plan was to move from 8.0 to 8.1 for now.
First, PHP 8.1 is in security mode now, so won't receive any regular bug fixes, but only security relevant fixes. This doesn't look like a security issue, though.
We also tested PHP 8.2, but some Wordpress plugins we're using haven't been updated for it yet and output a lot of notices/warnings, so the plan was to move from 8.0 to 8.1 for now.
That is unfortunate. Maybe you can urge the respective developers a bit to make their code compatible with PHP 8.2, and then switch to that version directly.
Tried disabling
pcre.jit
but it didn't work.
That would be an indication that PCRE's JIT is not the problem.
Anyhow, did you try running without Xdebug? Would that also crash?
No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.
Anyhow, did you try running without Xdebug? Would that also crash?
Yes, it was also crashing without xdebug. All signs pointed to pcre.jit
, so I'm stumped.
That is unfortunate. Maybe you can urge the respective developers a bit to make their code compatible with PHP 8.2, and then switch to that version directly.
We have been. Right now the biggest offender is https://github.com/google/site-kit-wp/issues/8331, though they have been closing some tickets about notices. I don't believe it's fully ready yet though.
From https://github.com/PCRE2Project/pcre2/issues/435:
Here's how it's set in both /etc/php8/apache/php.ini and /etc/php8/cli/php.ini:
pcre.jit=0
I verified that the value is set correctly:
php8 -r 'echo phpinfo();'|ack pcre.jit pcre.jit => 0 => 0
That verification is irrelevant; you need to check when running a web request through Apache. Put a file containing
<?php
phpinfo();
somewhere in the docroot, and request that from a browser. I have the suspicion that neither disabling pcre.jit nor disabling Xdebug actually worked in your experiments so far.
From the cores, I can actually see that all of them come from command line php scripts, not the web server (apache), which is why I was testing using the command line php.
Okay. Then please provide a stack backtrace without having loaded Xdebug and with pcre.jit=0
.
I think you may have been right, actually, and without xdebug the issue doesn't occur. What confused me earlier (apologies) is the crashes kept happening even after apache restarts, but after your comment I realized that those were all coming from php cli, and that those were managed by supervisor and continued to run in the background without restarting. Now that I restarted them, we haven't had a crash since (it's been 4 days).
Looks like the next steps are to re-enable pcre.jit
and see if the crashes occur again. And regardless, I will try to report this to xdebug.
I had the exact same issue - removing xdebug
sorted it out even with pcre.jit
enabled.
@bradaric Ah, good to find someone else experiencing the same issue.
Do you have a reproducible case by chance? Xdebug bug reporting is pretty strict about that. https://xdebug.org/reporting-bugs
Maybe @derickr wants to have a look at this.
@derickr Do you think you have enough to work with above in this case?
Edit: Ha, we both pinged him at the same time. I was just looking for the right Github user.
Reading through those requirements - I'm not sure I can produce a script.
For me it only triggered on certain pages (using php8.3-fpm) and only with NewRelic PHP agent enabled (newrelic-php5). At first I though the agent was causing the trouble, but from their analysis ( https://docs.newrelic.com/docs/apm/agents/php-agent/troubleshooting/segmentation-faults/ ) it seems any observer would trigger it, if I understand that correctly...
I suppose I could try a clean PHP 8.3 system with just xdebug and the newrelic agent (or a test observer) and then do something memory-intensive in the script. I'll give it a try in the morning...
Or is it xdebug actually clashing with newrelic? Would any 2 observers clash?
FWIW we don't have newrelic enabled right now and those crashes still happen with xdebug.
Description
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 https://github.com/PCRE2Project/pcre2/issues/57, https://github.com/oerdnj/deb.sury.org/issues/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).
I'm posting it here in case it's an issue with PHP itself.
I also posted to https://github.com/PCRE2Project/pcre2/issues/435. Tried disabling
pcre.jit
but it didn't work.PHP Version
PHP 8.1.29
Operating System
OpenSUSE 15.6