Bug #70334 [Opn->Fbk]: Php SoapServer crashed after second SoapFault
| From: | cmb@php.net | Date: | Thu, 29 Jul 2021 11:54:08 +0000 |
| Subject: | Bug #70334 [Opn->Fbk]: Php SoapServer crashed after second SoapFault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235456@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70334&edit=1
ID: 70334
Updated by: cmb@php.net
Reported by: miracle at rpz dot name
Summary: Php SoapServer crashed after second SoapFault
-Status: Open
+Status: Feedback
Type: Bug
Package: SOAP related
Operating System: Any
PHP Version: 5.6.12
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Is this still an issue with any of the actively supported PHP
versions[1]?
[1] <https://www.php.net/supported-versions.php>
Previous Comments:
------------------------------------------------------------------------
[2016-02-05 18:49:46] miracle at rpz dot name
Maybe fixed in #70979
------------------------------------------------------------------------
[2015-10-09 10:31:02] m dot zygmuntowicz at onet dot pl
I've got a similar experience - my soap server function was a simple one returning a string.
Every few calls the server crashes. After looking at the provided backtrace, I have disabled the
"Automatically populating $HTTP_RAW_POST_DATA.." in php ini and the problem seems to be
gone now (at least in my case).
Maybe this tip will help to narrow down the problem.
------------------------------------------------------------------------
[2015-08-23 14:03:42] cmb@php.net
Related To: Bug #70271
------------------------------------------------------------------------
[2015-08-23 12:47:19] miracle at rpz dot name
Description:
------------
On first SoapFault server respond with status 500 (expected behavior).
On next fault server crashed.
Reproduced on windows and linux, with all 5.6.* versions, php-cli and mod_php, works fine on 5.5 and
5.4.
client.php:
<?php
$client = new SoapClient(null, ['uri' => 'http://test-uri', 'location' => 'http://127.0.0.1:8081/server.php']);
try {
$client->unknownMethod(); // expected exception
} catch (Exception $e) {
var_dump($e->getMessage());
}
// any "normal" requests here
try {
$client->unknownMethod(); // server crashed here
} catch (Exception $e) {
var_dump($e->getMessage());
}
?>
$./php ./client.php
string(38) "Function 'unknownMethod' doesn't exist"
string(27) "Error Fetching http headers"
---------------------
server.php:
<?php
$srv = new SoapServer(null, ['uri' => 'http://test-uri/']);
$srv->handle();
?>
$ ./php -S 127.0.0.1:8081 -t /tmp/php-soapserver
PHP 5.6.12 Development Server started at Tue Aug 18 20:28:09 2015
Listening on http://127.0.0.1:8081
Document root is /tmp/php-soapserver
Press Ctrl-C to quit.
[Tue Aug 18 20:28:11 2015] 127.0.0.1:59246 [500]: /server.php - Function 'unknownMethod'
doesn't exist in /tmp/php-soapserver/server.php on line 3
Segmentation fault (core dumped)
(gdb)bt
#0 0x00000000008ca757 in zend_std_object_get_class (object=0x7f3b34a0dc28) at
/tmp/php-soapserver/php-5.6.12/Zend/zend_object_handlers.c:1528
#1 0x000000000089001d in zend_get_class_entry (zobject=0x7f3b34a0dc28) at
/tmp/php-soapserver/php-5.6.12/Zend/zend_API.c:238
#2 0x00000000006b4c84 in soap_error_handler (error_num=8192, error_filename=0xd58393
"Unknown", error_lineno=0,
format=0xd43178 "Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be
removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to
'-1' in php.ini and use the php://input"..., args=0x7fff26f74920)
at /tmp/php-soapserver/php-5.6.12/ext/soap/soap.c:2145
#3 0x000000000088dc11 in zend_error (type=8192,
format=0xd43178 "Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be
removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to
'-1' in php.ini and use the php://input"...) at
/tmp/php-soapserver/php-5.6.12/Zend/zend.c:1133
#4 0x0000000000809669 in php_default_post_reader () at
/tmp/php-soapserver/php-5.6.12/main/php_content_types.c:75
#5 0x000000000080363f in sapi_read_post_data () at /tmp/php-soapserver/php-5.6.12/main/SAPI.c:247
#6 0x0000000000803ff0 in sapi_activate () at /tmp/php-soapserver/php-5.6.12/main/SAPI.c:482
#7 0x00000000007f7f4e in php_request_startup () at /tmp/php-soapserver/php-5.6.12/main/main.c:1632
#8 0x000000000094c626 in php_cli_server_request_startup (server=0x10896c0 <server>,
client=0x2dc21b0)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2100
#9 0x000000000094c932 in php_cli_server_dispatch (server=0x10896c0 <server>,
client=0x2dc21b0)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2170
#10 0x000000000094d157 in php_cli_server_recv_event_read_request (server=0x10896c0 <server>,
client=0x2dc21b0)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2372
#11 0x000000000094d4ea in php_cli_server_do_event_for_each_fd_callback (_params=0x7fff26f74d30,
fd=4, event=1)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2463
#12 0x00000000009489bf in php_cli_server_poller_iter_on_active (poller=0x10896c8 <server+8>,
opaque=0x7fff26f74d30,
callback=0x94d2af <php_cli_server_do_event_for_each_fd_callback>) at
/tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:960
#13 0x000000000094d560 in php_cli_server_do_event_for_each_fd (server=0x10896c0 <server>,
rhandler=0x94d060 <php_cli_server_recv_event_read_request>, whandler=0x94d17e
<php_cli_server_send_event>)
---Type <return> to continue, or q <return> to quit---)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2484
#14 0x000000000094d5c4 in php_cli_server_do_event_loop (server=0x10896c0 <server>)
at /tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2494
#15 0x000000000094d904 in do_cli_server (argc=5, argv=0x2c0f710) at
/tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli_server.c:2595
#16 0x000000000094236c in main (argc=5, argv=0x2c0f710) at
/tmp/php-soapserver/php-5.6.12/sapi/cli/php_cli.c:1381
Duplicate for #70271
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70334&edit=1