From: Operating system: Ubuntu 10.10 PHP version: 5.3.6 Package: Sockets related Bug Type: Bug Bug description:Segmentation fault after writing to first socket after closing of second socket
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 bug report at http://bugs.php.net/bug.php?id=54623&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54623&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54623&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54623&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54623&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54623&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54623&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54623&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54623&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54623&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54623&r=support Expected behavior: http://bugs.php.net/fix.php?id=54623&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54623&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54623&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54623&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54623&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54623&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54623&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54623&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54623&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54623&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54623&r=mysqlcfg