php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71374 PHP-FPM crashes repeatedly in call to _php_iconv_strlen
Submitted: 2016-01-14 21:48 UTC Modified: 2016-07-15 09:27 UTC
From: mqudsi at neosmart dot net Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 7.0.2 OS: FreeBSD-10.2-RELEASE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mqudsi at neosmart dot net
New email:
PHP Version: OS:

 

 [2016-01-14 21:48 UTC] mqudsi at neosmart dot net
Description:
------------
I have a (currently) locally-reproducible crash that I haven't yet isolated out to a minimal test case which causes PHP-FPM to crash with a SIGBUS error in the log:

WARNING: [pool www] child 8278 exited on signal 10 (SIGBUS) after 46.230505 seconds from start

The backtrace from an attached GDB session:

Switching to Thread 805006400 (LWP 100703)]
0x00000000007c99dc in ZEND_INIT_FCALL_SPEC_CONST_HANDLER ()
(gdb) continue
Continuing.

Program received signal SIGBUS, Bus error.
0x00000008029f1bf1 in __bsd_iconv () from /lib/libc.so.7
(gdb) bt
#0  0x00000008029f1bf1 in __bsd_iconv () from /lib/libc.so.7
#1  0x00000000005867d8 in _php_iconv_strlen ()
#2  0x0000000000584204 in zif_iconv_strlen ()
#3  0x00000000007ea1d7 in ZEND_DO_ICALL_SPEC_HANDLER ()
#4  0x00000000007b5448 in execute_ex ()
#5  0x0000000000766cf8 in zend_call_function ()
#6  0x0000000000766536 in call_user_function_ex ()
#7  0x00000000005148a1 in php_pcre_replace_impl ()
#8  0x00000000005173ff in php_replace_in_subject ()
#9  0x00000000005171cc in preg_replace_impl ()
#10 0x0000000000516530 in zif_preg_replace_callback ()
#11 0x00000000007ea1d7 in ZEND_DO_ICALL_SPEC_HANDLER ()
#12 0x00000000007b5448 in execute_ex ()
#13 0x00000000007b5686 in zend_execute ()
#14 0x000000000077590f in zend_execute_scripts ()
#15 0x000000000070d8dc in php_execute_script ()
#16 0x000000000080f9a9 in main ()

PHP 7.0.2 has been compiled from source:

'./configure' '--with-curl' '--with-zlib=/usr/local' '--enable-shmop' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-mbstring' '--with-iconv' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-config-file-scan-dir=/usr/local/lsws/lsphp7/conf.d/' '--with-openssl' '--with-gd' '--with-litespeed' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--prefix=/usr/local/php7' '--with-config-file-scan-dir=/usr/local/php7/etc/conf.d' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-pdo-sqlite' '--enable-opcache' '-C' '--without-sqlite3' 'CFLAGS=-msse4.2 '-Wno-error' '-Ofast' '-funroll-loops' '-march=native' '-DOPENSSL_NO_SSL2''

The only external extension installed is php-memcached from HEAD (which makes no appearance in the bt).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-14 22:06 UTC] mqudsi at neosmart dot net
Re-compiling against a locally-compiled version of GNU libiconv instead of using the system bsdiconv has resolved the issue.

I don't know what the recommendation is here, in this case.
 [2016-07-15 09:27 UTC] dmitry@php.net
-Status: Open +Status: Not a bug
 [2016-07-15 09:27 UTC] dmitry@php.net
This looks like not a PHP bug.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jun 02 08:01:26 2020 UTC