Bug #54623 [Asn->Csd]: Segmentation fault after writing to first socket after closing of second socket
| From: | cataphract@php.net | Date: | Sun, 01 May 2011 03:57:46 +0000 |
| Subject: | Bug #54623 [Asn->Csd]: Segmentation fault after writing to first socket after closing of second socket | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160481@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54623&edit=1
ID: 54623
Updated by: cataphract@php.net
Reported by: tiger dot seo at gmail dot com
Summary: Segmentation fault after writing to first socket
after closing of second socket
-Status: Assigned
+Status: Closed
Type: Bug
Package: Sockets related
Operating System: Ubuntu 10.10
PHP Version: 5.3.6
Assigned To: cataphract
Block user comment: N
Private report: N
New Comment:
Fixed in SVN. Thanks for the report.
Previous Comments:
------------------------------------------------------------------------
[2011-05-01 05:57:03] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=310681
Log: - Fixed bug #54623 (Segfault when when writing to a persistent
socket after
closing a copy of the socket).
------------------------------------------------------------------------
[2011-04-30 22:00:22] cataphract@php.net
Looks like a persistent version of bug #24557 (see r136199 and r136088).
------------------------------------------------------------------------
[2011-04-28 17:08:47] tiger dot seo at gmail dot com
Port can be any other, for example with 80 port bug is reproduced
------------------------------------------------------------------------
[2011-04-28 16:58:33] tiger dot seo at gmail dot com
Description:
------------
BTW, my friend with 5.2.6 says that bug doesn`t reproduces in her, but
in version 5.2.10 it does reproduced, and in version 5.3.3 also
reproduced.
Backtrace from GDB:
Starting program: /usr/bin/php memcached.php
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c1cb70 (LWP 11369)]
[Thread 0xb7c1cb70 (LWP 11369) exited]
Program received signal SIGSEGV, Segmentation fault.
0x080ab68a in ?? ()
(gdb) bt
#0 0x080ab68a in ?? ()
#1 0x082c9d0a in ?? ()
#2 0x0823a439 in zif_fwrite ()
#3 0x08334647 in execute_internal ()
#4 0x0092b474 in xdebug_execute_internal
(current_execute_data=0x893d5bc, return_value_used=0) at
/build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1339
#5 0x08360310 in ?? ()
#6 0x08336fde in execute ()
#7 0x0092b123 in xdebug_execute (op_array=0x890bc14) at
/build/buildd/xdebug-2.1.0/build-php5/xdebug.c:1272
#8 0x0830cf06 in zend_execute_scripts ()
#9 0x082b1654 in php_execute_script ()
#10 0x083a41bb in ?? ()
#11 0x00646ce7 in __libc_start_main () from /lib/libc.so.6
#12 0x08066ca1 in _start ()
Test script:
---------------
<?php
$sock = pfsockopen('10.4.8.2', '11211');
$data = "add 1_".md5(time())." 0 10 10\r\n".time()."\r\n";
fwrite($sock, $data);
$sock2 = pfsockopen('10.4.8.2', '11211');
$data2 = "add 2_".md5(time())." 0 10 10\r\n".time()."\r\n";
fwrite($sock2, $data2);
fclose($sock2);
$data = "add 3_".md5(time())." 0 10 10\r\n".time()."\r\n";
fwrite($sock, $data);
Expected result:
----------------
Data normally writed to first socket
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54623&edit=1