web services - Segmentation fault in SOAP after upgrade PHP from v5.4.45 to v5.6.21 -


i'm receiving segmentation fault after upgrade of php version v5.4.45 v5.6.21. i've read documentation upgrading php, , there's no mentioning of breaking changes in soap.

i tested in test environment has same versions. however, in our production environment, fails. call failing talks soap service , uses soapclient in php.

i'm not familiar debugging these kind of stack traces, understanding, looks it's in soap library somewhere fails.

versions of software running on server (both test , production environment):

  • php 5.6.21
  • mysql 5.5.49 mysql community server (gpl) remi
  • centos: centos-release-6-6.el6.centos.12.2.x86_64

stack trace debug symbols:

program terminated signal 11, segmentation fault. #0  master_to_zval_int (encode=0x2d9, data=0x7fb62db0aee0) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:585 585             if (encode->to_zval) { #1  0x00007fb6167d04f2 in model_to_zval_object (ret=0x7fb62ebc4738, model=0x7fb62fba4ca8, data=0x7fb62fbdac50, sdl=0x7fb62db91f30) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1403 #2  0x00007fb6167d01f6 in model_to_zval_object (ret=0x7fb62ebc4738, model=0x7fb62fba4c28, data=0x7fb62fbdac50, sdl=0x7fb62db91f30) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1459 #3  0x00007fb6167d0877 in to_zval_object_ex (type=<value optimized out>, data=0x7fb62fbdac50, pce=<value optimized out>) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1589 #4  0x00007fb6167ce163 in master_to_zval_int (encode=0x7fb62e7836f0, data=0x7fb62fbdac50) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:586 #5  0x00007fb6167d04f2 in model_to_zval_object (ret=0x7fb62ebc4340, model=0x7fb62fba49e8, data=0x7fb62fbdabd0, sdl=0x7fb62db91f30) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1403 #6  0x00007fb6167d01f6 in model_to_zval_object (ret=0x7fb62ebc4340, model=0x7fb62fba4968, data=0x7fb62fbdabd0, sdl=0x7fb62db91f30) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1459 #7  0x00007fb6167d0877 in to_zval_object_ex (type=<value optimized out>, data=0x7fb62fbdabd0, pce=<value optimized out>) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:1589 #8  0x00007fb6167ce163 in master_to_zval_int (encode=0x7fb62e783738, data=0x7fb62fbdabd0) @ /usr/src/debug/php-5.6.21/ext/soap/php_encoding.c:586 #9  0x00007fb6167e32df in parse_packet_soap (this_ptr=<value optimized out>, buffer=<value optimized out>, buffer_size=<value optimized out>, fn=0x7fb62f990b80, fn_name=<value optimized out>, return_value=0x7fb62ebc6428, soap_headers=0x0) @ /usr/src/debug/php-5.6.21/ext/soap/php_packet_soap.c:328 #10 0x00007fb6167c37e8 in do_soap_call (this_ptr=0x7fb62ebbe470, function=<value optimized out>, function_len=<value optimized out>, arg_count=1, real_args=0x7fb62fa1b750, return_value=0x7fb62ebc6428, location=0x7fb62db932b8 "https://winorgws.flt.no/prod/srv/wswebuser.asmx", soap_action=<value optimized out>, call_uri=<value optimized out>, soap_headers=0x0, output_headers=0x0) @ /usr/src/debug/php-5.6.21/ext/soap/soap.c:2780 #11 0x00007fb6167c41ec in zim_soapclient___call (ht=<value optimized out>, return_value=0x7fb62ebc6428, return_value_ptr=<value optimized out>, this_ptr=0x7fb62ebbe470, return_value_used=<value optimized out>) @ /usr/src/debug/php-5.6.21/ext/soap/soap.c:2950 #12 0x00007fb62102ab69 in dtrace_execute_internal (execute_data_ptr=<value optimized out>, fci=<value optimized out>, return_value_used=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:97 #13 0x00007fb62102d904 in zend_call_function (fci=0x7fffc3a8b840, fci_cache=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_execute_api.c:849 #14 0x00007fb6210535c7 in zend_call_method (object_pp=0x7fffc3a8b960, obj_ce=<value optimized out>, fn_proxy=0x7fb62d7c2d88, function_name=0x7fb6211417f2 "__call", function_name_len=<value optimized out>, retval_ptr_ptr=0x7fffc3a8b978, param_count=2, arg1=0x7fb62ebc6368, arg2=0x7fb62ebc63c8) @ /usr/src/debug/php-5.6.21/zend/zend_interfaces.c:97 #15 0x00007fb621065ae2 in zend_std_call_user_call (ht=<value optimized out>, return_value=0x7fb62ebc3dc0, return_value_ptr=0x7fb62c4108a0, this_ptr=0x7fb62ebbe470, return_value_used=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_object_handlers.c:931 #16 0x00007fb62102ab69 in dtrace_execute_internal (execute_data_ptr=<value optimized out>, fci=<value optimized out>, return_value_used=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:97 #17 0x00007fb6210b9b15 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:560 #18 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c410d18) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #19 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c410d18) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #20 0x00007fb6210ba184 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:592 #21 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c4106d0) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #22 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c4106d0) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #23 0x00007fb6210ba184 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:592 #24 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c410218) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #25 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c410218) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #26 0x00007fb62102d703 in zend_call_function (fci=0x7fffc3a8c070, fci_cache=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_execute_api.c:829 #27 0x00007fb620f7db57 in zif_call_user_func_array (ht=<value optimized out>, return_value=0x7fb62fa20608, return_value_ptr=<value optimized out>, this_ptr=<value optimized out>, return_value_used=<value optimized out>) @ /usr/src/debug/php-5.6.21/ext/standard/basic_functions.c:4786 #28 0x00007fb62102ab69 in dtrace_execute_internal (execute_data_ptr=<value optimized out>, fci=<value optimized out>, return_value_used=<value optimized out>) #29 0x00007fb6210b9b15 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:560 #30 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c40fb28) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #31 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c40fb28) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #32 0x00007fb6210ba184 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:592 #33 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c40f398) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #34 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c40f398) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #35 0x00007fb6210ba184 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:592 #36 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c40eff8) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #37 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c40eff8) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #38 0x00007fb6210ba184 in zend_do_fcall_common_helper_spec (execute_data=<value optimized out>) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:592 #39 0x00007fb6210a95e8 in execute_ex (execute_data=0x7fb62c40e6c8) @ /usr/src/debug/php-5.6.21/zend/zend_vm_execute.h:363 #40 0x00007fb62102ac9e in dtrace_execute_ex (execute_data=0x7fb62c40e6c8) @ /usr/src/debug/php-5.6.21/zend/zend_dtrace.c:73 #41 0x00007fb62103a3ec in zend_execute_scripts (type=8, retval=0x0, file_count=3) @ /usr/src/debug/php-5.6.21/zend/zend.c:1341 #42 0x00007fb620fd885a in php_execute_script (primary_file=0x7fffc3a8ec80) @ /usr/src/debug/php-5.6.21/main/main.c:2613 #43 0x00007fb6210e15fd in php_handler (r=0x7fb62d8a9188) @ /usr/src/debug/php-5.6.21/sapi/apache2handler/sapi_apache2.c:667 #44 0x00007fb62c504cd0 in ap_run_handler (r=0x7fb62d8a9188) @ /usr/src/debug/httpd-2.2.15/server/config.c:158 #45 0x00007fb62c50858e in ap_invoke_handler (r=0x7fb62d8a9188) @ /usr/src/debug/httpd-2.2.15/server/config.c:376 #46 0x00007fb62c513c50 in ap_process_request (r=0x7fb62d8a9188) #47 0x00007fb62c510ac8 in ap_process_http_connection (c=0x7fb62d7fc1d8) @ /usr/src/debug/httpd-2.2.15/modules/http/http_core.c:190 #48 0x00007fb62c50c7d8 in ap_run_process_connection (c=0x7fb62d7fc1d8) @ /usr/src/debug/httpd-2.2.15/server/connection.c:43 #49 0x00007fb62c518ad7 in child_main (child_num_arg=<value optimized out>) @ /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:667 #50 0x00007fb62c518dea in make_child (s=0x7fb62d35a880, slot=2) @ /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:763 #51 0x00007fb62c51911b in startup_children (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) @ /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:781 #52 ap_mpm_run (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) @ /usr/src/debug/httpd-2.2.15/server/mpm/prefork/prefork.c:1002 #53 0x00007fb62c4f09b0 in main (argc=1, argv=0x7fffc3a8f248) @ /usr/src/debug/httpd-2.2.15/server/main.c:763 

can me in right direction finding out what's wrong, or tell me what's wrong if know? there maybe other differences create issue? example php.ini file? know there's difference in setup of date.timezone, example.

update 1:

i managed walk around in trace file , found out there expected response server. it's somewhere when tries parse response fails. know, document may wrong. think it's higher possibility it's wrong in document or application code wrong, bug in php itself.

update 2:

when accessing local variables of different frames, can see we're getting valid soap response server. @ least know server responding should. error happen after we've received response , looks it's when library trying parse response.

accessing frame #9 gives this:

#9  0x00007fb6167e32df in parse_packet_soap (this_ptr=<value optimized out>, buffer=<value optimized out>, buffer_size=<value optimized out>, fn=0x7fb62f990b80, fn_name=<value optimized out>, return_value=0x7fb62ebc6428, soap_headers=0x0) @ /usr/src/debug/php-5.6.21/ext/soap/php_packet_soap.c:328     param = 0x7fb62fba65a0     val = <value optimized out>     tmp = <value optimized out>     h_param = 0x7fb62fba65e8     name = <value optimized out>     ns = 0x7fb62fba52d8 "http://www.winorg.no/webservices"     fnb = 0x7fb62f990678     res_count = 1     envelope_ns = 0x7fb600000000 <address 0x7fb600000000 out of bounds>     response = 0x7fb62db0aaa0     trav = <value optimized out>     env = <value optimized out>     head = <value optimized out>     body = <value optimized out>     resp = 0x7fb62fbdabd0     cur = <value optimized out>     fault = <value optimized out>     attr = <value optimized out>     param_count = 0     soap_version = <value optimized out>     hdrs = 0x0 

accessing frame #10 (last application code frame) gives this:

#10 0x00007fb6167c37e8 in do_soap_call (this_ptr=0x7fb62ebbe470, function=<value optimized out>, function_len=<value optimized out>, arg_count=1, real_args=0x7fb62fa1b750, return_value=0x7fb62ebc6428, location=0x7fb62db932b8 "https://winorgws.flt.no/prod/srv/wswebuser.asmx", soap_action=<value optimized out>, call_uri=<value optimized out>, soap_headers=0x0, output_headers=0x0) @ /usr/src/debug/php-5.6.21/ext/soap/soap.c:2780     uri = 0x7fb6210138d0     action = <value optimized out>     __orig_bailout = 0x7fffc3a8b460     __bailout = {{__jmpbuf = {0, 6085802679289766135, 0, 140420459902800, 140420459902808, 140736476001800,           -6085882503037591305, -6117803975593172745}, __mask_was_saved = 0, __saved_mask = {__val = {0, 140420218837248,             1, 140736476001456, 0, 2, 0, 256, 140420214706271, 140736476001852, 1, 140736476001520, 0, 140420218837248, 0,             140420218837824}}}}     __orig_bailout = 0x7fffc3a8d980     __bailout = {{__jmpbuf = {140420444841072, 6085802679289766135, 0, 140420459902800, 140420459902808, 140736476001800,           -6085882503037591305, -6117803975453187849}, __mask_was_saved = 0, __saved_mask = {__val = {140420214708469,             206158430248, 140736476001696, 140736476001488, 140420403240512, 140420218837248, 140420427649664,             140736476001856, 140736476001868, 140736476001824, 140736476001848, 140736476001552, 140420444873432,             140420444873672, 140736476001760, 140420215755228}}}}     tmp = 0x7fb62ebc1ad8     trace = 0x7fb621435900     sdl = 0x7fb62db91f30     old_sdl = 0x0     fn = <value optimized out>     request = <value optimized out>     ret = 1     soap_version = 2     response = {value = {lval = 140420461530552, dval = 6.9376926015418089e-310, str = {           val = 0x7fb62fba8db8 "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsi=\"http://www.w3.org/2001/xmlschema-instance\" xmlns:xsd=\"http://www.w3.org/2001/xmlsch"...,           len = 7635}, ht = 0x7fb62fba8db8, obj = {handle = 800755128, handlers = 0x1dd3}, ast = 0x7fb62fba8db8},       refcount__gc = 1, type = 6 '\006', is_ref__gc = 0 '\000'}     old_encoding = 0x0     old_class_map = 0x0     old_features = 0     old_typemap = 0x0     typemap = <value optimized out>     _old_handler = 0 '\000'     _old_error_code = 0x0     _old_error_object = 0x0     _old_soap_version = 1     _old_in_compilation = 0 '\000'     _old_in_execution = 1 '\001'     _old_current_execute_data = 0x7fffc3a8b720     _old_stack_top = 0x7fb62c410e88     _bailout = 0 

here can see indeed have response. won't post full response here contains sensitive data.

i see response somehow escaped backslashes. guess normal. it?


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -