php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63558 Random crash in php-fpm
Submitted: 2012-11-19 07:30 UTC Modified: 2014-12-30 10:41 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: goelvivek2011 at gmail dot com Assigned:
Status: No Feedback Package: SQLite related
PHP Version: 5.3.18 OS: amazon-linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-11-19 07:30 UTC] goelvivek2011 at gmail dot com
Description:
------------
Description:
php-fpm is randomly crashing with error message:

WARNING: [pool www] child 20063 exited on signal 11 (SIGSEGV - core dumped) after 187826.894044 seconds from start

PHP package details:
PHP 5.3.18 (cli) (built: Nov  5 2012 19:35:04) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

Configuration command:
Configure Command =>  './configure'  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-amazon-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-mhash' '--enable-force-cgi-redirect' '--libdir=/usr/lib64/php' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--enable-mysqlnd=shared' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pdo-dblib=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared,/usr' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=no' '--with-recode=shared,/usr'


Any other information unique or specific to your setup:
We are custom compiling sqlite3 extension. For compilation we followed following steps:
1. Download php source code. 
2. Download latest sqlite3 source code. 
3. Copy latest sqlite files to ext/sqlite3/libsqlite/ folder. 
4. Call phpize and then configure with following flags -DHAVE_READLINE -DNO_TCL -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DHAVE_USLEEP=1-DSQLITE_ENABLE_FTS3=1.
5. Call make and copy the destination sqlite3.so to our svn folder. 
6. Using some deployment script destination sqlit3.so gets copied to php extension_dir on other machines. 

Also,We are doing a custom session handling  using  session_set_save_handler function.


gdb backtrace on machine 'A' for one occurrence of such error:

#0  0x000000000059e571 in _zval_ptr_dtor ()
#1  0x00000000005b9ce8 in zend_hash_destroy ()
#2  0x00000000005ababf in _zval_dtor_func ()
#3  0x000000000059e5b1 in _zval_ptr_dtor ()
#4  0x00000000004b10e8 in ?? ()
#5  0x00000000005b355c in ?? ()
#6  0x00000000005ba16c in zend_hash_reverse_apply ()
#7  0x00000000005ac700 in ?? ()
#8  0x0000000000559475 in php_request_shutdown ()
#9  0x0000000000641508 in ?? ()
#10 0x00007f74383b1cdd in __libc_start_main (main=0x6408b0, argc=3, ubp_av=0x7fff2d9d2e58, init=<value optimized out>, 
    fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff2d9d2e48) at libc-start.c:226
#11 0x000000000042318d in _start ()

gdb backtrace on machine 'B' for one occurrence of such error:
#0  0x000000000058d8c8 in ?? ()
#1  0x00000000005a31f7 in destroy_op_array ()
#2  0x00000000005b9ce8 in zend_hash_destroy ()
#3  0x00000000005a2fda in destroy_zend_class ()
#4  0x00000000005b8815 in ?? ()
#5  0x00000000005ba181 in zend_hash_reverse_apply ()
#6  0x000000000059ebe6 in ?? ()
#7  0x00000000005ac7e5 in ?? ()
#8  0x0000000000559290 in php_request_shutdown ()
#9  0x0000000000641508 in ?? ()
#10 0x00007f16fe0e4cdd in __libc_start_main () from /lib64/libc.so.6
#11 0x000000000042318d in _start ()



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-20 02:55 UTC] laruence@php.net
-Package: FPM related +Package: SQLite related
 [2012-11-20 02:55 UTC] laruence@php.net
according to your description, I think maybe not a fpm issue, but sqlite3
 [2012-11-20 06:14 UTC] goelvivek2011 at gmail dot com
@laruence
How to identify the cause? What all can go wrong in this flow?
 [2013-10-24 06:51 UTC] yohgaki@php.net
-Status: Open +Status: Feedback
 [2013-10-24 06:51 UTC] yohgaki@php.net
I guess amazon-linux also has debuginfo packages.
To identify which packages you need, use gdb and read start up message.
(i.e. execute 'gdb php-cgi')

Then you can get better backtrace.
 [2013-10-24 06:52 UTC] yohgaki@php.net
By the way, we don't fix 5.3 bug anymore. Try it with 5.4.
 [2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug 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 and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 14:03:37 2021 UTC