php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62877 PHP-FPM segfaults with latest APC 3.1.12
Submitted: 2012-08-21 10:11 UTC Modified: 2012-08-24 08:33 UTC
From: alex at derhofbauer dot at Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.4.4 OS: Debian/sid
Private report: No CVE-ID: None
 [2012-08-21 10:11 UTC] alex at derhofbauer dot at
Description:
------------
As soon as APC is enabled, PHP-FPM 5.4.4 with Apache 2.2.22 on Debian/sid crashes here on every machine.

Syslog says "php5-fpm[14906]: segfault at ee0 ip 00007fee5d39d6e4 sp 00007fff33e29430 error 4 in apc.so[7fee5d380000+24000]"


I was able to track the bug – importing your SVN and using wonderful "git bisect" – back to r326820 (free interned strings storage on module shutdown). Reverting that commit fixes my problem.


Please let me know if you need further details.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-21 10:57 UTC] laruence@php.net
what is your apc configurations?
 [2012-08-21 11:06 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2012-08-21 11:06 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2012-08-22 14:54 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=327233
Log: Attempt to fix bug #62877

if apc interned string allocating failed, then failover to normal string
 [2012-08-22 14:58 UTC] laruence@php.net
Hi, weltling and I got a simple fix for this,  could you please help us to try the 
with the latest svn reversion? 

http://svn.php.net/viewvc?view=revision&revision=327233

thanks
 [2012-08-22 21:58 UTC] alex at derhofbauer dot at
Thank you for your help. I'm afraid your fix doesn't fix this problem though.

I hope I'll be able to provide a proper backtrace tomorrow.
 [2012-08-22 21:58 UTC] alex at derhofbauer dot at
-Status: Feedback +Status: Open
 [2012-08-23 10:34 UTC] ab@php.net
The rev 326820 was reverted, please take a look again.
 [2012-08-23 10:34 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-08-23 13:42 UTC] alex at derhofbauer dot at
-Status: Feedback +Status: Open
 [2012-08-23 13:42 UTC] alex at derhofbauer dot at
The revert works as expected.

It's hard for me to provide a backtrace, I'm not that skilled debugging an FPM pool. Any pointers on that?
 [2012-08-23 14:01 UTC] alex at derhofbauer dot at
Oh, managed to debug FPM by reducing its pool size to 1.
Here's a backtrace (the core dump is 150M big), it seems debugging symbols are missing though. I'll see if I can recompile with debugging.


---------
#0  0x00007fd812d94714 in apc_new_interned_string () from /usr/lib/php5/20100525/apc.so
#1  0x00007fd812d88f54 in ?? () from /usr/lib/php5/20100525/apc.so
#2  0x00007fd812d81055 in ?? () from /usr/lib/php5/20100525/apc.so
#3  0x00007fd812d8975f in ?? () from /usr/lib/php5/20100525/apc.so
#4  0x00007fd812d80d46 in ?? () from /usr/lib/php5/20100525/apc.so
#5  0x00007fd812d8108e in ?? () from /usr/lib/php5/20100525/apc.so
#6  0x00007fd812d8975f in ?? () from /usr/lib/php5/20100525/apc.so
#7  0x00007fd812d80d46 in ?? () from /usr/lib/php5/20100525/apc.so
#8  0x00007fd812d8108e in ?? () from /usr/lib/php5/20100525/apc.so
#9  0x00007fd812d8975f in ?? () from /usr/lib/php5/20100525/apc.so
#10 0x00007fd812d80d46 in ?? () from /usr/lib/php5/20100525/apc.so
#11 0x00007fd812d8108e in ?? () from /usr/lib/php5/20100525/apc.so
#12 0x00007fd812d8975f in ?? () from /usr/lib/php5/20100525/apc.so
#13 0x00007fd812d80d46 in ?? () from /usr/lib/php5/20100525/apc.so
#14 0x00007fd812d8108e in ?? () from /usr/lib/php5/20100525/apc.so
#15 0x00007fd812d8975f in ?? () from /usr/lib/php5/20100525/apc.so
#16 0x00007fd812d80d46 in ?? () from /usr/lib/php5/20100525/apc.so
#17 0x00007fd812d8108e in ?? () from /usr/lib/php5/20100525/apc.so
#18 0x00007fd812d87b42 in apc_cache_store_zval () from /usr/lib/php5/20100525/apc.so
#19 0x00007fd812d87ca6 in apc_cache_make_user_entry () from /usr/lib/php5/20100525/apc.so
#20 0x00007fd812d85695 in _apc_store () from /usr/lib/php5/20100525/apc.so
#21 0x00007fd812d858bf in ?? () from /usr/lib/php5/20100525/apc.so
#22 0x0000000000745102 in ?? ()
#23 0x00000000006fe977 in execute ()
#24 0x0000000000690050 in zend_call_function ()
#25 0x00000000005c5c8f in ?? ()
#26 0x0000000000745102 in ?? ()
#27 0x00000000006fe977 in execute ()
#28 0x0000000000690050 in zend_call_function ()
#29 0x00000000005c5a34 in ?? ()
#30 0x0000000000745102 in ?? ()
#31 0x00000000006fe977 in execute ()
#32 0x000000000069e83e in zend_execute_scripts ()
#33 0x000000000063de43 in php_execute_script ()
#34 0x0000000000431a80 in ?? ()
#35 0x00007fd813dbaead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#36 0x00000000004322b1 in _start ()
 [2012-08-23 15:54 UTC] laruence@php.net
if it is okey now, maybe we can close this entry.
 [2012-08-24 08:32 UTC] alex at derhofbauer dot at
-PHP Version: 5.4.6 +PHP Version: 5.4.4
 [2012-08-24 08:32 UTC] alex at derhofbauer dot at
That depends on whether the authors of that now reverted revision intended to fix something (e.g. a memory leak).

I'm closing my bug new because the current svn is good for me, hope that's OK. You can always contact me should you update the original change and want someone to test it.
 [2012-08-24 08:33 UTC] alex at derhofbauer dot at
-Status: Open +Status: Closed
 [2012-08-24 08:33 UTC] alex at derhofbauer dot at
-
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC