Bug #70079 [Com]: Segmentation fault after more than 100 SoapClient calls
| From: | dmifedorenko at gmail dot com | Date: | Wed, 15 Jul 2015 06:59:56 +0000 |
| Subject: | Bug #70079 [Com]: Segmentation fault after more than 100 SoapClient calls | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194453@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70079&edit=1
ID: 70079
Comment by: dmifedorenko at gmail dot com
Reported by: dmifedorenko at gmail dot com
Summary: Segmentation fault after more than 100 SoapClient
calls
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Linux vm 3.13.0-37-generic #64-U
PHP Version: 7.0Git-2015-07-15 (Git)
Block user comment: N
Private report: N
New Comment:
Sorry but server is not public, it works in locale network only. I cant share full source code of
client due to copyrights.
Minimal code example useless without public soap server. Or not?
I got full binary core file, can it help?
Previous Comments:
------------------------------------------------------------------------
[2015-07-15 06:40:26] laruence@php.net
give us a script(client and server) which can reproduce that ...
------------------------------------------------------------------------
[2015-07-15 06:40:25] laruence@php.net
give us a script(client and server) which can reproduce that ...
------------------------------------------------------------------------
[2015-07-15 06:17:16] dmifedorenko at gmail dot com
Source of out client method:
class JiraSoapClient extends SoapClient implements IJiraClient{
public function getIssueActions($issueKey, $token = null){
if(is_null($token))
$token = $this->getDefaultAuthToken();
return parent::getAvailableActions($token,$issueKey);
}
}
------------------------------------------------------------------------
[2015-07-15 06:15:29] dmifedorenko at gmail dot com
Description:
------------
Hello. Almost several weeks I see the same strange bug in last PHP7 master. I can reproduce it on
several different PCs in our office (apache2 or nginx), but cant give you fixture to reproduce it.
Description of problem. We have 150 calls of SoapClient to old Jira endpoint (method getIssueByKey)
inside foreach. After all data received PHP7 trying render html and falls with seg fault inside
outerLayout.inc.php template file. The only content of file is "<?" - two simbols. If I
remove include of this file fatal will happen on next template. Looks like inlude broken?
In apache2 log I see entry:
[Wed Jul 15 15:36:45.538571 2015] [core:notice] [pid 9031] AH00051: child pid 9036 exit signal
Segmentation fault (11), possible coredump in /tmp
If reduce limit on SoapClient to 80 calles all works perfect, but after about 98 calls include will
be broken.
Check out core file's backtrace please:
---
#0 0x00007f688851ed7f in zend_mm_alloc_small (heap=0x7f687e400040, size=56, bin_num=6,
__zend_filename=0x7f6888ab3458 "/home/fedorenko/php7/php-src/Zend/zend_list.c",
__zend_lineno=43, __zend_orig_filename=0x0, __zend_orig_lineno=0) at
/home/fedorenko/php7/php-src/Zend/zend_alloc.c:1244
#1 0x00007f688851efd6 in zend_mm_alloc_heap (heap=0x7f687e400040, size=56,
__zend_filename=0x7f6888ab3458 "/home/fedorenko/php7/php-src/Zend/zend_list.c",
__zend_lineno=43,
__zend_orig_filename=0x0, __zend_orig_lineno=0) at
/home/fedorenko/php7/php-src/Zend/zend_alloc.c:1311
#2 0x00007f68885210e0 in _emalloc (size=24, __zend_filename=0x7f6888ab3458
"/home/fedorenko/php7/php-src/Zend/zend_list.c", __zend_lineno=43,
__zend_orig_filename=0x0,
__zend_orig_lineno=0) at /home/fedorenko/php7/php-src/Zend/zend_alloc.c:2210
#3 0x00007f688856cd1b in zend_list_insert (ptr=0x7f687be9ec80, type=2) at
/home/fedorenko/php7/php-src/Zend/zend_list.c:43
#4 0x00007f688856cf25 in zend_register_resource (rsrc_pointer=0x7f687be9ec80, rsrc_type=2) at
/home/fedorenko/php7/php-src/Zend/zend_list.c:98
#5 0x00007f68884dde47 in _php_stream_alloc (ops=0x7f6888e0dd40 <php_stream_stdio_ops>,
abstract=0x7f687c093540, persistent_id=0x0, mode=0x7f6888a99051 "rb",
__php_stream_call_depth=4, __zend_filename=0x7f6888a9c8e8
"/home/fedorenko/php7/php-src/main/streams/plain_wrapper.c", __zend_lineno=178,
__zend_orig_filename=0x7f6888a98678 "/home/fedorenko/php7/php-src/main/main.c",
__zend_orig_lineno=1340) at /home/fedorenko/php7/php-src/main/streams/streams.c:309
#6 0x00007f68884e717f in _php_stream_fopen_from_fd_int (fd=21, mode=0x7f6888a99051 "rb",
persistent_id=0x0, __php_stream_call_depth=3,
__zend_filename=0x7f6888a9c8e8
"/home/fedorenko/php7/php-src/main/streams/plain_wrapper.c", __zend_lineno=992,
__zend_orig_filename=0x7f6888a98678 "/home/fedorenko/php7/php-src/main/main.c",
__zend_orig_lineno=1340) at /home/fedorenko/php7/php-src/main/streams/plain_wrapper.c:178
#7 0x00007f68884e89c5 in _php_stream_fopen (filename=0x7f687be84298
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
mode=0x7f6888a99051 "rb", opened_path=0x7fff2427e000, options=16512,
__php_stream_call_depth=2,
__zend_filename=0x7f6888a9c8e8
"/home/fedorenko/php7/php-src/main/streams/plain_wrapper.c", __zend_lineno=1050,
__zend_orig_filename=0x7f6888a98678 "/home/fedorenko/php7/php-src/main/main.c",
__zend_orig_lineno=1340) at /home/fedorenko/php7/php-src/main/streams/plain_wrapper.c:992
#8 0x00007f68884e8c8d in php_plain_files_stream_opener (wrapper=0x7f6888e0de60
<php_plain_files_wrapper>,
path=0x7f687be84298
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
mode=0x7f6888a99051 "rb", options=16512,
opened_path=0x7fff2427e000, context=0x0, __php_stream_call_depth=1,
__zend_filename=0x7f6888a9bcc0 "/home/fedorenko/php7/php-src/main/streams/streams.c",
__zend_lineno=2061, __zend_orig_filename=0x7f6888a98678
"/home/fedorenko/php7/php-src/main/main.c", __zend_orig_lineno=1340)
at /home/fedorenko/php7/php-src/main/streams/plain_wrapper.c:1050
#9 0x00007f68884e20e7 in _php_stream_open_wrapper_ex (path=0x7f687be84298
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
mode=0x7f6888a99051 "rb", options=16520, opened_path=0x7fff2427e000, context=0x0,
__php_stream_call_depth=0,
__zend_filename=0x7f6888a98678 "/home/fedorenko/php7/php-src/main/main.c",
__zend_lineno=1340, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/fedorenko/php7/php-src/main/streams/streams.c:2059
#10 0x00007f68884be6e4 in php_stream_open_for_zend_ex (filename=0x7f687be84338
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
handle=0x7fff2427dfa0, mode=137) at /home/fedorenko/php7/php-src/main/main.c:1340
#11 0x00007f68884be67e in php_stream_open_for_zend (filename=0x7f687be84338
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
handle=0x7fff2427dfa0) at /home/fedorenko/php7/php-src/main/main.c:1332
#12 0x00007f6888579928 in zend_stream_open (filename=0x7f687be84338
"/home/fedorenko/baza/app/src/template_partner/baza.farpost.ru/outerLayout.inc.php",
handle=0x7fff2427dfa0)
at /home/fedorenko/php7/php-src/Zend/zend_stream.c:131
#13 0x00007f6888579ae1 in zend_stream_fixup (file_handle=0x7fff2427dfa0, buf=0x7fff2427dc50,
len=0x7fff2427dc58) at /home/fedorenko/php7/php-src/Zend/zend_stream.c:186
#14 0x00007f68884fbb66 in open_file_for_scanning (file_handle=0x7fff2427dfa0) at
Zend/zend_language_scanner.l:508
#15 0x00007f68884fbed6 in compile_file (file_handle=0x7fff2427dfa0, type=2) at
Zend/zend_language_scanner.l:578
#16 0x00007f68882aa186 in phar_compile_file (file_handle=0x7fff2427dfa0, type=2) at
/home/fedorenko/php7/php-src/ext/phar/phar.c:3311
#17 0x00007f68884fc226 in compile_filename (type=2, filename=0x7f687e4153d0) at
Zend/zend_language_scanner.l:647
#18 0x00007f68885ea358 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER () at
/home/fedorenko/php7/php-src/Zend/zend_vm_execute.h:28971
#19 0x00007f68885aea65 in execute_ex (ex=0x7f687e413030) at
/home/fedorenko/php7/php-src/Zend/zend_vm_execute.h:406
#20 0x00007f68885aeb77 in zend_execute (op_array=0x7f687e485000, return_value=0x0) at
/home/fedorenko/php7/php-src/Zend/zend_vm_execute.h:450
#21 0x00007f6888554cd7 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/home/fedorenko/php7/php-src/Zend/zend.c:1399
---Type <return> to continue, or q <return> to quit---
#22 0x00007f68884c0d74 in php_execute_script (primary_file=0x7fff24280580) at
/home/fedorenko/php7/php-src/main/main.c:2475
#23 0x00007f6888612099 in php_handler (r=0x7f687e7733c0) at
/home/fedorenko/php7/php-src/sapi/apache2handler/sapi_apache2.c:673
#24 0x00007f688cc14880 in ap_run_handler ()
#25 0x00007f688cc14dc9 in ap_invoke_handler ()
#26 0x00007f688cc2a35c in ap_internal_redirect ()
#27 0x00007f687f81acfc in ?? () from /usr/lib/apache2/modules/mod_rewrite.so
#28 0x00007f688cc14880 in ap_run_handler ()
#29 0x00007f688cc14dc9 in ap_invoke_handler ()
#30 0x00007f688cc2a89a in ap_process_async_request ()
#31 0x00007f688cc2ab74 in ap_process_request ()
#32 0x00007f688cc27622 in ?? ()
#33 0x00007f688cc1e370 in ap_run_process_connection ()
#34 0x00007f6889049767 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#35 0x00007f68890499a6 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#36 0x00007f6889049a06 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#37 0x00007f688904a6e0 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#38 0x00007f688cbfac0e in ap_run_mpm ()
#39 0x00007f688cbf43c6 in main ()
---
How can I help you reproduce and fix the problem? :)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70079&edit=1