Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Newrelic.so for PHP 7.3 segfaults

php

#1

Latest New Relic Agent version for PHP 7.3 appears to routinely segfault PHP-FPM. Here is an excerpt from /var/log/newrelic/php_agent.log:

Process 3952 (version 8.5.0.235) received signal 11: segmentation violation
process id 3952 fatal signal (SIGSEGV, SIGFPE, SIGILL, SIGBUS, ...)  - stack dump follows (code=0x7ff8a3a09000 bss=0x7ff8a3cce87c):
/usr/lib/php/20180731/newrelic.so(+0x5cfa5)[0x7ff8a3a65fa5]
/usr/lib/php/20180731/newrelic.so(+0x35ffa)[0x7ff8a3a3effa]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7ff8b0eb90c0]
/usr/lib/php/20180731/newrelic.so(+0x55109)[0x7ff8a3a5e109]
/usr/lib/php/20180731/newrelic.so(+0x583be)[0x7ff8a3a613be]
/usr/lib/php/20180731/newrelic.so(+0x58379)[0x7ff8a3a61379]
/usr/lib/php/20180731/newrelic.so(+0x240d3)[0x7ff8a3a2d0d3]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(+0xda7ab)[0x56500abc07ab]
php-fpm: pool www(execute_ex+0xd0b)[0x56500adf5c6b]
/usr/lib/php/20180731/newrelic.so(+0x245ba)[0x7ff8a3a2d5ba]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(+0x30a6fc)[0x56500adf06fc]
php-fpm: pool www(execute_ex+0x417f)[0x56500adf90df]
/usr/lib/php/20180731/newrelic.so(+0x245ba)[0x7ff8a3a2d5ba]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(+0x30a6fc)[0x56500adf06fc]
php-fpm: pool www(execute_ex+0x417f)[0x56500adf90df]
/usr/lib/php/20180731/newrelic.so(+0x245ba)[0x7ff8a3a2d5ba]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(+0x30a34c)[0x56500adf034c]
php-fpm: pool www(execute_ex+0xe97)[0x56500adf5df7]
/usr/lib/php/20180731/newrelic.so(+0x245ba)[0x7ff8a3a2d5ba]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(+0x30a34c)[0x56500adf034c]
php-fpm: pool www(execute_ex+0xe97)[0x56500adf5df7]
/usr/lib/php/20180731/newrelic.so(+0x245ba)[0x7ff8a3a2d5ba]
/usr/lib/php/20180731/newrelic.so(+0x24ab2)[0x7ff8a3a2dab2]
php-fpm: pool www(zend_execute+0x12a)[0x56500adfdd2a]
php-fpm: pool www(zend_execute_scripts+0xd3)[0x56500ad6ee03]
php-fpm: pool www(php_execute_script+0x2d8)[0x56500ad0d7f8]
php-fpm: pool www(+0xe3b4a)[0x56500abc9b4a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7ff8b10e52e1]
php-fpm: pool www(_start+0x2a)[0x56500abca98a]
PHP execution trace follows...
#0 do_action() called at [/var/www/wp-settings.php:295]
#1 require_once() called at [/var/www/wp-config.php:93]
#2 require_once() called at [/var/www/wp-load.php:37]
#3 require_once() called at [/var/www/wp-blog-header.php:13]
#4 require() called at [/var/www/index.php:17]
#5 unknown() called at [/var/www/index.php:17]

This is on Debian 9. The same version of the PHP Agent for PHP 7.2 on the same server is fine. Unloading newrelic.so from PHP 7.3 and restarting PHP-FPM resolves the issue and no segfaults occur.

Is anyone else seeing this behavior?


#2

Hey @natenate19,

Thanks for letting us know about this. We’re actively looking into this and investigating what the cause is here. As soon as we have more information about what’s occurring here, I will be sure to update this. If you do see the segfaults occur again, it may be best to revert to PHP 7.2 until we have discovered the solution for this.

Let me know if there are any other questions I can answer about this!


#3

Hi @natenate19

I wanted to update you on what we’ve found since looking into this. We have been able to reproduce this behavior and have opened a bug with the provider of the deb.sury.org repository and that version of PHP 7.3. This segfault has only been reproduce-able thus far with that Debian repo. At this point in time I’d recommend staying on PHP version 7.2 until this has been resolved. Let me know if there are any other questions I can answer about this!


#4

Hello @priscilla,

Thanks for following up, I see the bug report for ondrej’s repo:

That is indeed where my version of PHP 7.3 is supplied from on Debian 9. I’m staying on PHP 7.2 for now, here’s to hoping this can be tracked down.

Thanks again.


#5

Thanks for letting us know you can stick with 7.2 for now @natenate19 - We’re hopeful for a speedy resolution of this: https://github.com/oerdnj/deb.sury.org/issues/1089 too!


#6

Ran into this with https://hub.docker.com/_/php so not a deb.sury.org problem.


#7

Hi @jgilliland

Thanks for the heads up on where you also ran into this! Our engineering team is actively investigating this as we speak, so we hope to have a root cause and solution in the near future. For the time being we recommend staying on PHP version 7.2 until we have a solution.

Thank you again for letting us know that this is something you’re also experiencing!


#8

@priscilla of course! Only way for y’all to fix it is to see the whole picture. :slight_smile:

Is this the right place to follow for updates on it getting fixed or is there a bug tracker or something I should /follow?


#9

Hey @jgilliland - We don’t have a publicly accessible bug tracking tool that you could follow. We’ll keep you updated here in this thread :slight_smile:


#10

Hi all,

I wanted to update everyone that we have found the root cause for this behavior. We have found that this segfault was occurring due to some changes in PHP internals.

This change in the OPcache module interferes with how the PHP agent instruments PHP functions. For the time being, other than staying on version 7.2 of PHP, you can either deactivate OPcache, or deactivate New Relic to avoid this segfault from occurring.

We plan on shipping a fix for this in an upcoming version. You will be able to see when that update comes out from our release notes which can be found linked below.

https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes

Thanks for everyone letting us know if they were experiencing this. Please let me know if you have any other questions about this.


#11

Looks like this has been fixed in PHP Agent 8.6. Much obliged to New Relic for fixing this.


#12

@natenate19 - yup! PHP Agent 8.6.0.238 contains the bug fix for this issue :smiley:

Let us know if you see this re-occur again or if you spot any other problems, we’ll be eager to look into those as well. :smiley:


#13

Recently since we upgraded to 7.3 we have been getting these type of errors:

Process 156 (version [8.6.0.238] received signal 11: segmentation violation
process id 156 fatal signal (SIGSEGV, SIGFPE, SIGILL, SIGBUS, …) - stack dump follows (code=0x7f616e806000 bss=0x7f616eacc87c):

  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x5d585)[0x7f616e863585]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x3632a)[0x7f616e83c32a]
  • /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f617b2f6890]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x402de)[0x7f616e8462de]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x181b6)[0x7f616e81e1b6]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x3f5b6)[0x7f616e8455b6]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x243c9)[0x7f616e82a3c9]
  • /app/.heroku/php/lib/php/extensions/no-debug-non-zts-20180731/newrelic.so(+0x24d92)[0x7f616e82ad92]
  • php-fpm: pool www(zend_call_function+0x6eb)[0x56536f0fd67b]
  • php-fpm: pool www(_call_user_function_ex+0x55)[0x56536f0fda95]
  • php-fpm: pool www(zend_try_exception_handler+0xa7)[0x56536f10b0c7]
  • php-fpm: pool www(zend_execute_scripts+0xde)[0x56536f10b23e]
  • php-fpm: pool www(php_execute_script+0x2d0)[0x56536f0ab9d0]
  • php-fpm: pool www(+0x11c4db)[0x56536ee2c4db]
  • /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f617b524b97]
  • php-fpm: pool www(_start+0x2a)[0x56536ee2d79a]
  • PHP execution trace follows…