#33394 [NoF->Asn]: Socket Timeout on SOAP request causes general exception in Apache process

From: Date: Wed, 07 Dec 2005 13:16:36 +0000
Subject: #33394 [NoF->Asn]: Socket Timeout on SOAP request causes general exception in Apache process
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-89889@lists.php.net to get a copy of this message
ID: 33394 Updated by: tony2001@php.net Reported By: neale at nealeupstone dot com -Status: No Feedback +Status: Assigned Bug Type: SOAP related Operating System: Windows XP PHP Version: 5.0.4 -Assigned To: +Assigned To: dmitry New Comment: Assigned to the maintainer. Previous Comments: ------------------------------------------------------------------------ [2005-12-07 14:05:32] s dot strampelli at isinet dot it I want to proose a fix for this bug. In etc/soap/http.c (about line 177) if (!get_http_headers(stream, &http_headers, &http_header_size TSRMLS_CC) || http_headers == NULL) { php_stream_close(stream); stream = NULL; } efree(http_headers); I think the bug is the call of efree without checking if http_headers is not null ------------------------------------------------------------------------ [2005-06-26 01:00:04] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-06-18 14:27:14] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-06-18 14:19:00] neale at nealeupstone dot com Description: ------------ If I make a SOAP request (method call) that times out on the server (with default_socket_timeout=5), I get the following (c0000005) Exception consistently 5 seconds after attempting the connection: AppName: apache.exe AppVer: 2.0.53.0 ModName: php5ts.dll ModVer: 5.0.4.4 Offset: 00007704 (=> address 00a07704) It's an attempt to access memory at 0fffffff8 (i.e. -8) (if I recall correctly.. Windows only gave me that info the once). This is linked with default_socket_timeout, as if I set default_socket_timeout=10, the exception happens 10 seconds later. No data is returned to the browser from the PHP script. Reproduce code: --------------- How I reproduce this is to set a breakpoint in a method on a Java based service. Relevant PHP configs are: default_socket_timeout = 5 [soap] ; Enables or disables WSDL caching feature. soap.wsdl_cache_enabled=1 ; Sets the directory name where SOAP extension will put cache files. soap.wsdl_cache_dir="/tmp" ; (time to live) Sets the number of second while cached file will be used ; instead of original one. soap.wsdl_cache_ttl=86400 Expected result: ---------------- A SoapException would be thrown ? Certainly, the PHP script could be expected to continue rather than die. Actual result: -------------- PHP script dies ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33394&edit=1

« previous php.bugs (#89889) next »