Skip to content

Segfaults with PHP 7.0.8 #265

Closed
Closed
@tgagor

Description

@tgagor

I have CentOS 7 based environment with PHP-FPM from IUS repo. I compiled manually memcached module and it was working but not so well - from time too time it cause segfaults:

[19-Jul-2016 15:16:39] WARNING: [pool web] child 19880 exited on signal 11 (SIGSEGV - core dumped) after 99.885775 seconds from start
[19-Jul-2016 15:16:39] NOTICE: [pool web] child 20059 started

Trying to debug it I've got:

root /var/spool/abrt/ccpp-2016-07-19-14:37:04-14420 # gdb /usr/sbin/php-fpm coredump 
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/php-fpm...Reading symbols from /usr/lib/debug/usr/sbin/php-fpm.debug...done.
done.
[New LWP 14420]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php-fpm: pool web              '.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f95b6745577 in vfprintf () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f95b6745577 in vfprintf () from /lib64/libc.so.6
#1  0x00007f95b6809e25 in __vsnprintf_chk () from /lib64/libc.so.6
#2  0x00007f95b6809d88 in __snprintf_chk () from /lib64/libc.so.6
#3  0x00007f95a84a8ce7 in memcached_set_error(org::libmemcached::Instance&, memcached_return_t, char const*) ()
   from /lib64/libmemcached.so.11
#4  0x00007f95a84a6ab5 in _memcached_connect(org::libmemcached::Instance*, bool) [clone .constprop.8] ()
   from /lib64/libmemcached.so.11
#5  0x00007f95a84aa7a0 in memcached_mget_by_key_real(memcached_st*, char const*, unsigned long, char const* const*, unsigned long const*, unsigned long, bool) () from /lib64/libmemcached.so.11
#6  0x00007f95a84ab480 in memcached_mget_by_key () from /lib64/libmemcached.so.11
#7  0x00007f95a86d599c in php_memc_mget_apply (intern=intern@entry=0x7f95b4603240, server_key=<optimized out>, 
    keys=keys@entry=0x7ffeaee6d1f0, result_apply_fn=result_apply_fn@entry=0x7f95a86d0df0 <s_get_multi_apply_fn>, 
    with_cas=<optimized out>, context=context@entry=0x7ffeaee6d1e0) at /tmp/memcache/php_memcached.c:672
#8  0x00007f95a86d5b1c in php_memc_mget_apply (context=0x7ffeaee6d1e0, with_cas=<optimized out>, 
    result_apply_fn=0x7f95a86d0df0 <s_get_multi_apply_fn>, keys=0x7ffeaee6d1f0, server_key=<optimized out>, 
    intern=0x7f95b4603240) at /tmp/memcache/php_memcached.c:1498
#9  php_memc_getMulti_impl (execute_data=<optimized out>, return_value=0x7f9589357b00, by_key=<optimized out>)
    at /tmp/memcache/php_memcached.c:1509
#10 0x00007f95b962dbdb in dtrace_execute_internal (execute_data=<optimized out>, return_value=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:107
#11 0x00007f95b96ba934 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:844
#12 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#13 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#14 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#15 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#16 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#17 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#18 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#19 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#20 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#21 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#22 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#23 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#24 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#25 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#26 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#27 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#28 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#29 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#30 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#31 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
    at /usr/src/debug/php-7.0.8/Zend/zend_dtrace.c:83
#32 0x00007f95b96ba600 in ZEND_DO_FCALL_SPEC_HANDLER () at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:800
#33 0x00007f95b967c38b in execute_ex (ex=<optimized out>) at /usr/src/debug/php-7.0.8/Zend/zend_vm_execute.h:414
#34 0x00007f95b962dab9 in dtrace_execute_ex (execute_data=<optimized out>)
---Type <return> to continue, or q <return> to quit---q
 at /usr/src/debug/php-7.0.8/Zend/zend_dtraceQuit
(gdb) q

I don't know what to do next with that so any help is appreciated :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions