Bug #63516 [Com]: The Process exits random with SEGV

From: Date: Thu, 22 May 2014 20:13:00 +0000
Subject: Bug #63516 [Com]: The Process exits random with SEGV
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185897@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63516&edit=1

 ID:                 63516
 Comment by:         sblackstone at gmail dot com
 Reported by:        dpeuscher at gmail dot com
 Summary:            The Process exits random with SEGV
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   openSUSE 11.0 (X86-64)
 PHP Version:        5.4.8
 Block user comment: N
 Private report:     N

 New Comment:

I am able to replicate this bug with WSDL_CACHE_BOTH set as my caching strategy, so far I
haven't seen it with CACHE_NONE..

I am iterating on a long set of objects 25 at a time, and once in a blue moon, it seg faults - the
loop is using exactly the same code for each object - so I think you're looking at a race
condition of some kind.

Below is my stack trace and lines up with the OP. 






Core was generated by `php /var/www/sites/public_crm/scripts/backfiller/backfiller.php
190.4.94.3'.
Program terminated with signal 11, Segmentation fault.
#0  zend_hash_destroy (ht=0xd726170) at /usr/src/debug/php-5.4.28/Zend/zend_hash.c:558
558			p = p->pListNext;
(gdb) bt
#0  zend_hash_destroy (ht=0xd726170) at /usr/src/debug/php-5.4.28/Zend/zend_hash.c:558
#1  0x00002b8b41a8f9b9 in delete_sdl_impl (handle=0xd726170) at
/usr/src/debug/php-5.4.28/ext/soap/php_sdl.c:3426
#2  0x00000000005e6a17 in list_entry_destructor (ptr=<value optimized out>) at
/usr/src/debug/php-5.4.28/Zend/zend_list.c:178
#3  0x00000000005e47d4 in zend_hash_del_key_or_index (ht=0x9d6c70, arKey=0x0, nKeyLength=0, h=234,
flag=<value optimized out>) at /usr/src/debug/php-5.4.28/Zend/zend_hash.c:531
#4  0x00000000005e6cc9 in _zend_list_delete (id=<value optimized out>) at
/usr/src/debug/php-5.4.28/Zend/zend_list.c:57
#5  0x00000000005c8a15 in _zval_dtor (zval_ptr=0x2b8b43706f30) at
/usr/src/debug/php-5.4.28/Zend/zend_variables.h:35
#6  _zval_ptr_dtor (zval_ptr=0x2b8b43706f30) at
/usr/src/debug/php-5.4.28/Zend/zend_execute_API.c:436
#7  0x00000000005e3c78 in zend_hash_destroy (ht=0x2b8b43705300) at
/usr/src/debug/php-5.4.28/Zend/zend_hash.c:560
#8  0x00000000005f79fc in zend_object_std_dtor (object=0x2b8b436cd9e8) at
/usr/src/debug/php-5.4.28/Zend/zend_objects.c:44
#9  0x00000000005f7a79 in zend_objects_free_object_storage (object=0xd726170) at
/usr/src/debug/php-5.4.28/Zend/zend_objects.c:137
#10 0x00000000005fd6a5 in zend_objects_store_del_ref_by_handle_ex (handle=141, handlers=<value
optimized out>) at /usr/src/debug/php-5.4.28/Zend/zend_objects_API.c:226
#11 0x00000000005fd6e3 in zend_objects_store_del_ref (zobject=0x2b8b436ce8f8) at
/usr/src/debug/php-5.4.28/Zend/zend_objects_API.c:178
#12 0x000000000065b70f in ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER (execute_data=0x2b8b3b039390) at
/usr/src/debug/php-5.4.28/Zend/zend_variables.h:35
#13 0x000000000060b8ae in execute (op_array=0x2b8b436e6098) at
/usr/src/debug/php-5.4.28/Zend/zend_vm_execute.h:410
#14 0x00000000005d618e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/usr/src/debug/php-5.4.28/Zend/zend.c:1315
#15 0x000000000057b918 in php_execute_script (primary_file=0x7fff00afd180) at
/usr/src/debug/php-5.4.28/main/main.c:2502
#16 0x000000000067e1ad in do_cli (argc=3, argv=0x7fff00afe4b8) at
/usr/src/debug/php-5.4.28/sapi/cli/php_cli.c:989


Previous Comments:
------------------------------------------------------------------------
[2013-06-07 13:30:43] arjen at react dot com

Does not crash with WSDL_CACHE_DISK,
DOES crash with WSDL_CACHE_MEMORY.

------------------------------------------------------------------------
[2013-06-06 15:59:48] dpeuscher at gmail dot com

Accidentally changed the package to apache2-related, sorry.

------------------------------------------------------------------------
[2013-06-06 15:57:51] dpeuscher at gmail dot com

Have you tried the WSDL_CACHE_DISK caching method instead of WSDL_CACHE_BOTH?

------------------------------------------------------------------------
[2013-06-06 11:25:48] arjen at react dot dom

I can confirm this under 5.4.15, got the same backtrace using the testscript.

------------------------------------------------------------------------
[2012-11-15 14:16:07] dpeuscher at gmail dot com

That was a great hint. I got it isolated! It seams like the problem occurs when the ini-option
wsdl_cache is set to 3 (WSDL_CACHE_BOTH), maybe also 2 (WSDL_CACHE_MEMORY). I 
initialized 5 WSDL-Files that are nearly empty (just to don't throw any exceptions like
"Could not find any usable binding services in WSDL.". They all look like this:

http://pastebin.com/e6QBUkeh (Wasn't allowed to put
it in here because of possible Spam)

with 5 different names. I named them s1.wsdl, ... s5.wsdl. Afterwards I initialized an
ebay-Webservice. The test-Script looks like this:

http://pastebin.com/dWxg1qL7

Sometimes the SEGV appears after 50 calls, sometimes on the first call. It doesn't apper on
WSDL_CACHE_DISK or WSDL_CACHE_NONE.

------------------------------------------------------------------------


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=63516


--
Edit this bug report at https://bugs.php.net/bug.php?id=63516&edit=1


Thread (10 messages)

« previous php.bugs (#185897) next »