Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2012 15:00:32 +0300
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
Cc:        ports@freebsd.org
Subject:   Re: lang/php53 dumps core
Message-ID:  <500E8E60.3010405@gmail.com>
In-Reply-To: <500D5385.9030407@gmail.com>
References:  <500D5385.9030407@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Volodymyr Kostyrko wrote:
> On some of my servers php keeps dumping core on some requests. There are
> days that it dumps core almost continuously. However there are days it
> works smoothly.
>
> FreeBSD kohrah.xim.bz 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0 r236967:
> Tue Jun 12 22:25:24 EEST 2012
> arcade@kohrah.xim.bz:/usr/obj/usr/src/sys/MINIMAL amd64
>
> The general cause is:
>
> Jul 23 16:27:09 kohrah kernel: pid 49951 (php-fpm), uid 80: exited on
> signal 11 (core dumped)
>
> And in very rare case:
>
> [23-Jul-2012 16:26:40] WARNING: [pool www] child 49887 said into stderr:
> "zend_mm_heap corrupted"
> [23-Jul-2012 16:26:40] WARNING: [pool www] child 49887 exited with code
> 1 after 36.791579 seconds from start
>
> There's a backtrace on the core:
>
> #0 0x000000000056b9fe in gc_zval_possible_root ()
> [New Thread 802007400 (LWP 149340/php-fpm)]
> (gdb) bt full
> #0 0x000000000056b9fe in gc_zval_possible_root ()
> No symbol table info available.
> #1 0x000000000055ce83 in zend_hash_destroy ()
> No symbol table info available.
> #2 0x000000000056f79e in zend_objects_free_object_storage ()
> No symbol table info available.
> #3 0x0000000000572757 in zend_objects_store_free_object_storage ()
> No symbol table info available.
> #4 0x00000000005465eb in shutdown_executor ()
> No symbol table info available.
> #5 0x0000000000552400 in zend_deactivate ()
> No symbol table info available.
> #6 0x0000000000506506 in php_request_shutdown ()
> No symbol table info available.
> #7 0x00000000005d0548 in main ()
> No symbol table info available.
>
> What other data I should collect to file a PR? Or is this just a memory
> problem?

My thanks to all who helped as I found the cause of problem.

  1. If suhosin and memcache are loaded script dumps core.
  2. If memcache is loaded script occasionally dumps core. Looks like 
suhosin narrows the problem down.
  3. If php is build WITH_DEBUG problem vanishes. A lot of leaks are 
reported though.

  So the problem is actually an unplugged memory leak. Should those ones 
be reported anywhere?

-- 
Sphinx of black quartz judge my vow.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?500E8E60.3010405>