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=<value optimized out>)
    at Zend/zend_language_scanner.l:1709
1709                    switch (*YYCURSOR++) {
(gdb) list
1704    }
1705
1706
1707    <ST_IN_SCRIPTING>"#"|"//" {
1708            while (YYCURSOR < YYLIMIT) {
1709                    switch (*YYCURSOR++) {
1710                            case '\r':
1711                                    if (*YYCURSOR == '\n') {
1712                                            YYCURSOR++;
1713                                    }
#0  lex_scan (zendlval=<value optimized out>)
    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=<value optimized out>) 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=<value optimized out>)
    at Zend/zend_language_scanner.l:1904
1904                    switch (*YYCURSOR++) {
(gdb) list
1899    }
1900
1901
1902    <ST_IN_SCRIPTING>"#"|"//" {
1903            while (YYCURSOR < YYLIMIT) {
1904                    switch (*YYCURSOR++) {
1905                            case '\r':
1906                                    if (*YYCURSOR == '\n') {
1907                                            YYCURSOR++;
1908                                    }
(gdb) bt
#0  lex_scan (zendlval=<value optimized out>)
    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=<value optimized out>) 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=<value optimized out>)
    at Zend/zend_language_scanner.l:1917
1917                    switch (*YYCURSOR++) {
(gdb) list
1912    }
1913
1914
1915    <ST_IN_SCRIPTING>"#"|"//" {
1916            while (YYCURSOR < YYLIMIT) {
1917                    switch (*YYCURSOR++) {
1918                            case '\r':
1919                                    if (*YYCURSOR == '\n') {
1920                                            YYCURSOR++;
1921                                    }
(gdb) bt
#0  lex_scan (zendlval=<value optimized out>)
    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=<value optimized out>) 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



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to