Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64356 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80230 invoked from network); 19 Dec 2012 15:15:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2012 15:15:28 -0000 Received: from [127.0.0.1] ([127.0.0.1:6627]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 82/71-04341-F0AD1D05 for ; Wed, 19 Dec 2012 10:15:27 -0500 Authentication-Results: pb1.pair.com smtp.mail=jani.ollikainen@mmd.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jani.ollikainen@mmd.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mmd.net from 80.83.1.197 cause and error) X-PHP-List-Original-Sender: jani.ollikainen@mmd.net X-Host-Fingerprint: 80.83.1.197 dyn-197.hel.mmd.net Received: from [80.83.1.197] ([80.83.1.197:24148] helo=smtp.pronetko.fi) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/40-61627-6BCB1D05 for ; Wed, 19 Dec 2012 08:10:15 -0500 Received: from [10.0.0.7] (k7.pronetko.fi [::ffff:10.0.0.7]) (AUTH: PLAIN bestis@pronetko.fi, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by smtp.pronetko.fi with ESMTPSA; Wed, 19 Dec 2012 15:00:59 +0200 id 000000000109801B.50D1BA8B.000058C9 Message-ID: <50D1BCD5.3030001@mmd.net> Date: Wed, 19 Dec 2012 15:10:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752 From: jani.ollikainen@mmd.net (Jani Ollikainen) Hi, I did come up with a problem in my server crashing with SIGBUS. After long testing/tracing found: https://bugs.php.net/bug.php?id=52752 Which seems to be totally the same! But for different enviroment. Unfortunately that bug report seems to have only some workaround to disable mmap(). I have Centos 6 / x86_64, PHP 5.3.3. As it's OLD and on "Feedback" state and this is LONG. So i decided to send this email and also hope that some developer will check that out. It's not just 32bit, CentoOS5 and old PHP. test3.php might need couple of runs to get bus error, sometimes it just runs and most times it crashes and fast. Also the suggested workaround to disable MMAP seems to work. But what's the performance loss in that? And disabling it would need recompile and dunno about getting RedHat to change their PHP to disable MMAP because of this. Real fix/patch would be nice and really appreciated! :) Will comment shorter one to that bug, but for the stuff that interests the developers: So how's the latest 5.3.19: Core was generated by `sapi/cli/php test3.php'. Program terminated with signal 7, Bus error. #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1709 1709 switch (*YYCURSOR++) { (gdb) list 1704 } 1705 1706 1707 "#"|"//" { 1708 while (YYCURSOR < YYLIMIT) { 1709 switch (*YYCURSOR++) { 1710 case '\r': 1711 if (*YYCURSOR == '\n') { 1712 YYCURSOR++; 1713 } #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1709 #1 0x0000000000636640 in zendlex (zendlval=0x7fff2476cb90) at /root/php-5.3.19/Zend/zend_compile.c:4975 #2 0x0000000000620e66 in zendparse () at /root/php-5.3.19/Zend/zend_language_parser.c:3285 #3 0x000000000062bb52 in compile_file (file_handle=0x7fff2476ce80, type=) at Zend/zend_language_scanner.l:364 #4 0x00000000005362d1 in phar_compile_file (file_handle=0x7fff2476ce80, type=2) at /root/php-5.3.19/ext/phar/phar.c:3394 #5 0x000000000062b3de in compile_filename (type=2, filename=0x185ac58) at Zend/zend_language_scanner.l:407 #6 0x000000000067c63e in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ( execute_data=0x7fe9b5916050) at /root/php-5.3.19/Zend/zend_vm_execute.h:1967 #7 0x0000000000675a30 in execute (op_array=0x184f358) at /root/php-5.3.19/Zend/zend_vm_execute.h:107 #8 0x000000000064f86f in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-5.3.19/Zend/zend.c:1259 #9 0x00000000005fcd67 in php_execute_script (primary_file=0x7fff24770780) at /root/php-5.3.19/main/main.c:2316 #10 0x00000000006da002 in main (argc=2, argv=0x7fff24770a18) at /root/php-5.3.19/sapi/cli/php_cli.c:1189 So it's still there and no need to blame my PHP 5.3.3. So how about PHP 5.4.9? Core was generated by `sapi/cli/php test3.php'. Program terminated with signal 7, Bus error. #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1904 1904 switch (*YYCURSOR++) { (gdb) list 1899 } 1900 1901 1902 "#"|"//" { 1903 while (YYCURSOR < YYLIMIT) { 1904 switch (*YYCURSOR++) { 1905 case '\r': 1906 if (*YYCURSOR == '\n') { 1907 YYCURSOR++; 1908 } (gdb) bt #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1904 #1 0x000000000063fd90 in zendlex (zendlval=0x7fff4739ebf0) at /root/php-5.4.9/Zend/zend_compile.c:6707 #2 0x0000000000628ba4 in zendparse () at /root/php-5.4.9/Zend/zend_language_parser.c:3430 #3 0x0000000000634d4d in compile_file (file_handle=0x7fff4739ef40, type=) at Zend/zend_language_scanner.l:582 #4 0x0000000000539ae1 in phar_compile_file (file_handle=0x7fff4739ef40, type=2) at /root/php-5.4.9/ext/phar/phar.c:3388 #5 0x00000000006344ae in compile_filename (type=2, filename=0x7f66ed826d20) at Zend/zend_language_scanner.l:625 #6 0x00000000006acb6b in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ( execute_data=0x7f66ed7ea060) at /root/php-5.4.9/Zend/zend_vm_execute.h:2608 #7 0x00000000006c98a0 in execute (op_array=0x7f66ed81f938) at /root/php-5.4.9/Zend/zend_vm_execute.h:410 #8 0x00000000006608cd in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-5.4.9/Zend/zend.c:1309 #9 0x0000000000603e27 in php_execute_script (primary_file=0x7fff473a2680) at /root/php-5.4.9/main/main.c:2482 #10 0x000000000070aeac in do_cli (argc=2, argv=0x7fff473a2a88) at /root/php-5.4.9/sapi/cli/php_cli.c:988 #11 0x000000000070b608 in main (argc=2, argv=0x7fff473a2a88) at /root/php-5.4.9/sapi/cli/php_cli.c:1364 Still there.. so how about trunk? Core was generated by `sapi/cli/php test3.php'. Program terminated with signal 7, Bus error. #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1917 1917 switch (*YYCURSOR++) { (gdb) list 1912 } 1913 1914 1915 "#"|"//" { 1916 while (YYCURSOR < YYLIMIT) { 1917 switch (*YYCURSOR++) { 1918 case '\r': 1919 if (*YYCURSOR == '\n') { 1920 YYCURSOR++; 1921 } (gdb) bt #0 lex_scan (zendlval=) at Zend/zend_language_scanner.l:1917 #1 0x0000000000641c30 in zendlex (zendlval=0x7fff34ca46c0) at /root/php-trunk-201212191230/Zend/zend_compile.c:6881 #2 0x000000000062a713 in zendparse () at /root/php-trunk-201212191230/Zend/zend_language_parser.c:3428 #3 0x0000000000636d75 in compile_file (file_handle=0x7fff34ca4a30, type=) at Zend/zend_language_scanner.l:585 #4 0x000000000053a921 in phar_compile_file (file_handle=0x7fff34ca4a30, type=2) at /root/php-trunk-201212191230/ext/phar/phar.c:3388 #5 0x000000000063641e in compile_filename (type=2, filename=0x7f6444584978) at Zend/zend_language_scanner.l:628 #6 0x00000000006d48eb in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ( execute_data=0x7f64445481e0) at /root/php-trunk-201212191230/Zend/zend_vm_execute.h:2695 #7 0x00000000006d4b40 in execute_ex (execute_data=0x7f64445481e0) at /root/php-trunk-201212191230/Zend/zend_vm_execute.h:356 #8 0x00000000006634d9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-trunk-201212191230/Zend/zend.c:1309 #9 0x0000000000605ed9 in php_execute_script (primary_file=0x7fff34ca8180) at /root/php-trunk-201212191230/main/main.c:2468 #10 0x0000000000710d7c in do_cli (argc=2, argv=0x7fff34ca8588) at /root/php-trunk-201212191230/sapi/cli/php_cli.c:988 #11 0x00000000007114d8 in main (argc=2, argv=0x7fff34ca8588) at /root/php-trunk-201212191230/sapi/cli/php_cli.c:1364