Bug #70334 [NEW]: Php SoapServer crashed after second SoapFault
| From: | miracle at rpz dot name | Date: | Sun, 23 Aug 2015 12:47:25 +0000 |
| Subject: | Bug #70334 [NEW]: Php SoapServer crashed after second SoapFault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-195440@lists.php.net to get a copy of this message | ||
From: miracle at rpz dot name
Operating system: Any
PHP version: 5.6.12
Package: SOAP related
Bug Type: Bug
Bug description:Php SoapServer crashed after second SoapFault
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 bug report at https://bugs.php.net/bug.php?id=70334&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70334&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70334&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70334&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70334&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70334&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70334&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70334&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70334&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70334&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70334&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70334&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70334&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70334&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70334&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70334&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70334&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70334&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70334&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70334&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70334&r=mysqlcfg