Bug #70079 [Fbk->Csd]: Segmentation fault after more than 100 SoapClient calls

From: Date: Thu, 16 Jul 2015 10:37:34 +0000
Subject: Bug #70079 [Fbk->Csd]: Segmentation fault after more than 100 SoapClient calls
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194486@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 Updated by: laruence@php.net Reported by: dmifedorenko at gmail dot com Summary: Segmentation fault after more than 100 SoapClient calls -Status: Feedback +Status: Closed 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) Assigned To: laruence Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=deeb6379cb26d457badae58df4f24bc30a334ebe Log: Fixed bug #70079 (Segmentation fault after more than 100 SoapClient calls) Previous Comments: ------------------------------------------------------------------------ [2015-07-16 07:01:42] dmifedorenko at gmail dot com Yes it does! Thank you, now I can get all 150 issues without error. Can you add patch to PHP7 master please? ------------------------------------------------------------------------ [2015-07-16 06:03:57] laruence@php.net thanks, I got it. could you please help to verify does the following patch fixed the problem? diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index e0a749f..60dd9dd 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -507,6 +507,7 @@ try_again: if (stream) { php_stream_auto_cleanup(stream); add_property_resource(this_ptr, "httpsocket", stream->res); + GC_REFCOUNT(stream->res)++; add_property_long(this_ptr, "_use_proxy", use_proxy); } else { php_url_free(phpurl); @@ -524,6 +525,7 @@ try_again: zend_resource *ret = zend_register_resource(phpurl, le_url); add_property_resource(this_ptr, "httpurl", ret); + GC_REFCOUNT(ret)++; /*zend_list_addref(ret);*/ if (context && thanks ------------------------------------------------------------------------ [2015-07-16 04:57:29] dmifedorenko at gmail dot com We setup public Jira with minimal rights to reproduce problem. I sent you test case file via email, please dont public it for everyone :) Thank you. ------------------------------------------------------------------------ [2015-07-16 02:59:14] laruence@php.net hmm, or maybe you could grant me a ssh access to that box? (if it is possible please sent it to me via mail). thanks ------------------------------------------------------------------------ [2015-07-16 00:05:27] dmifedorenko at gmail dot com Sorry this is right bt from minimal code: --- #0 0x00007f4e23034aea in strlen () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007f4e1f750651 in format_converter (odp=0x7fffea0f4660, fmt=0x7f4e1fd26111 "s(%d) : Freeing 0x%.8lX (%zu bytes), script=%s\n", ap=0x7fffea0f46a8) at /home/fedorenko/php7/php-src/main/snprintf.c:993 #2 0x00007f4e1f7510d8 in strx_printv (ccp=0x7fffea0f46a4, buf=0x7fffea0f4a10 "[Thu Jul 16 10:04:08 2015] Script: '/home/fedorenko/baza/www/test.php'\n", len=512, format=0x7f4e1fd26110 "%s(%d) : Freeing 0x%.8lX (%zu bytes), script=%s\n", ap=0x7fffea0f46a8) at /home/fedorenko/php7/php-src/main/snprintf.c:1248 #3 0x00007f4e1f751310 in ap_php_snprintf (buf=0x7fffea0f4a10 "[Thu Jul 16 10:04:08 2015] Script: '/home/fedorenko/baza/www/test.php'\n", len=512, format=0x7f4e1fd26110 "%s(%d) : Freeing 0x%.8lX (%zu bytes), script=%s\n") at /home/fedorenko/php7/php-src/main/snprintf.c:1293 #4 0x00007f4e1f74bb8f in php_message_handler_for_zend (message=4, data=0x7fffea0f5ac0) at /home/fedorenko/php7/php-src/main/main.c:1435 #5 0x00007f4e1f7e0b55 in zend_message_dispatcher (message=4, data=0x7fffea0f5ac0) at /home/fedorenko/php7/php-src/Zend/zend.c:996 #6 0x00007f4e1f7ad742 in zend_mm_check_leaks (heap=0x7f4e15800040) at /home/fedorenko/php7/php-src/Zend/zend_alloc.c:1905 #7 0x00007f4e1f7ada40 in zend_mm_shutdown (heap=0x7f4e15800040, full=0, silent=0) at /home/fedorenko/php7/php-src/Zend/zend_alloc.c:1973 #8 0x00007f4e1f7ae886 in shutdown_memory_manager (silent=0, full_shutdown=0) at /home/fedorenko/php7/php-src/Zend/zend_alloc.c:2392 #9 0x00007f4e1f74ca66 in php_request_shutdown (dummy=0x0) at /home/fedorenko/php7/php-src/main/main.c:1837 #10 0x00007f4e1f89e816 in php_apache_request_dtor (r=0x7f4e15a0a0a0) at /home/fedorenko/php7/php-src/sapi/apache2handler/sapi_apache2.c:513 #11 0x00007f4e1f89f141 in php_handler (r=0x7f4e15a0a0a0) at /home/fedorenko/php7/php-src/sapi/apache2handler/sapi_apache2.c:685 #12 0x00007f4e23ea1880 in ap_run_handler () #13 0x00007f4e23ea1dc9 in ap_invoke_handler () #14 0x00007f4e23eb789a in ap_process_async_request () #15 0x00007f4e23eb7b74 in ap_process_request () #16 0x00007f4e23eb4622 in ?? () #17 0x00007f4e23eab370 in ap_run_process_connection () #18 0x00007f4e202d6767 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #19 0x00007f4e202d69a6 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #20 0x00007f4e202d6a06 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #21 0x00007f4e202d76e0 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so #22 0x00007f4e23e87c0e in ap_run_mpm () #23 0x00007f4e23e813c6 in main () ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70079 -- Edit this bug report at https://bugs.php.net/bug.php?id=70079&edit=1

« previous php.bugs (#194486) next »