Segmentation fault while accessing service via proxy

damien.levang.comalia.com's picture
Hi everybody, We're having a very hard time trying to configure our client to access a web service through a wsdl generated proxy using a certificate. The client code was generated using wsdl2php.php, the certificate is genuine and seems to pass the authentication, the service is up and running and looks like it's trying to send a response but every time we try to access it the client freezes right after SSL certificate verification which seems to be ok as we can see in the wsf_php_client.log: [Wed Aug 18 12:03:52 2010] [debug] /home/comalia/wso2-wsf-php-src-2.0.0/src/wsf_wsdl.c(911) [WSF/PHP] soap version SOAP12 [Wed Aug 18 12:03:52 2010] [debug] /home/comalia/wso2-wsf-php-src-2.0.0/src/wsf_wsdl.c(932) [WSF/PHP] soap version in wsdl mode is 2 [Wed Aug 18 12:03:52 2010] [debug] op_client.c(881) Start:axis2_op_client_infer_transport [Wed Aug 18 12:03:52 2010] [debug] op_client.c(944) End:axis2_op_client_infer_transport [Wed Aug 18 12:03:52 2010] [debug] phase.c(210) Invoke the handler AddressingOutHandler within the phase MessageOut [Wed Aug 18 12:03:52 2010] [info] Starting addressing out handler [Wed Aug 18 12:03:52 2010] [debug] addr_out_handler.c(133) No action present. Stop processing addressing [Wed Aug 18 12:03:52 2010] [debug] http_transport_sender.c(245) ctx_epr:https://81.255.92.77:443/pidiG2R1/servicescxf/ServiceChgEtatPidiS2F1 [Wed Aug 18 12:03:52 2010] [debug] http_transport_sender.c(798) using axis2 native http sender. [Wed Aug 18 12:03:52 2010] [debug] http_sender.c(416) msg_ctx_id:urn:uuid:e7ceadce-aaaf-1df1-3b64-00080dd942f8 [Wed Aug 18 12:03:53 2010] [info] [ssl client] No passphrase specified for key file /var/www/html/cvs/dlevang/gesica_b2b_telecom/webservices/certificat/comalia/biclef.pem and server cert /var/www/html/cvs/dlevang/gesica_b2b_telecom/webservices/certificat/comalia/serverIntegration.pem [Wed Aug 18 12:03:53 2010] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer If we run a strace on the client script we can see that it always finishes on a "Segmentation fault", we tried running the sample script "/samples/wsdl_mode/MtomClient.php" and we end up with exactly the same error, we tried to reinstall the WSF package several times but whatever we do the segmentation fault keeps coming back. We tried different versions on different servers: redhat enterprise 5 / ubuntu 10.04 apache2 php 5.1.6 / 5.3.2 wsf 2.0.0 / wsf 2.1.0 I tried using gdb for more debug info and here is what shows up on the backtrace: (gdb) backtrace #0 0x00204161 in axutil_stream_read (stream=0x0, env=0x83b1250, buffer=0xbfffbd69, count=1) at stream.c:725 #1 0x00d057ea in axis2_http_client_recieve_header (client=0x84c3000, env=0x83b1250) at http_client.c:578 #2 0xd03cbfbf in ?? () #3 0x084c3000 in ?? () #4 0x083b1250 in ?? () #5 0x0849fa18 in ?? () #6 0x00000000 in ?? () My guess is that the headers comnig from the server are causing this but I have no clue as to how I can prevent it. Any help would be greatly appreciated (sources attached) Thanks for your time
AttachmentSize
updateEtatOTG2R1_1.txt4.8 KB
bqtran.gmail.com's picture

I am also getting this seg fault

In addition to confirming the above error on Ubuntu 10.04.1 / apache 2.2.14 / php 5.3.2 / wsf 2.1.0, I also ran into seg faults when trying to follow this tutorial: http://dimuthuc.blogspot.com/2008/01/tutorial2-hello-world-using-web-service.html . wsf_php_server.log shows that everything seems to work well until it starts output: the last messages in the log file are "[debug] phase.c(202) Invoke the handler AddressingOutHandler within the phase MessageOut", followed by "[info] Starting addressing out handler". I can see the response being formed and deserialized correctly in wsf_php_client.log, but apache's error.log shows the child thread exiting with a seg fault (11). I also noticed this seems to occur when I use the getProxy() command, ie: $client = new WSClient(array("wsdl" => "http://localhost:85/Webservice.php?wsdl2")); $proxy = $client->getProxy(); Not sure how to fix this issue. Thoughts?
damien.levang.comalia.com's picture

OK I found the problem, the

OK I found the problem, the headers sent by the server where too long compared to their allocated size in the http_client.c script thus resulting in a segfault...
mikael.ribas.vivadia.com's picture

Looking for a solution

Have you fixed this problem ?
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
KeellsSuper is a leading supermarket chain with 50-plus outlets in Sri Lanka, and it offers the only online supermarket in the country. In 2005, JKH implemented SAP ERP across it’s 70 subsidiaries...
Thursday, February 16th 2012, 09.00 AM (PST)

Thursday, February 16th 2012, 10.00 AM (GMT)