reeze / php-leveldb

The PHP Binding for LevelDB
Other
240 stars 44 forks source link

make test failure #5

Closed cardine closed 6 years ago

cardine commented 11 years ago

Hi,

When I run "make test", when trying to install, I get the following:

PHP_VERSION : 5.3.21 ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux upgrade.XXXXXXXXX 2.6.18-308.11.1.el5 #1 SMP Tue Jul 10 08:48:43 EDT 2012 x86_64 INI actual : /home/XXXXXXX/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini More .INIs : CWD : /home/XXXXXXX/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb Extra dirs :

VALGRIND : Not used

TIME START 2013-02-19 04:30:37

PASS leveldb - basic: get(), set(), put(), delete() [tests/001-basic.phpt] PASS leveldb - db management [tests/002-db-management.phpt] PASS leveldb - open base dir [tests/003-openbasedir.phpt] PASS leveldb - write batch [tests/004-write-batch.phpt] PASS leveldb - iterate thought db [tests/005-iterator.phpt] FAIL leveldb - iterate thought db by foreach [tests/006-iterator-foreach.phpt] PASS leveldb - db close [tests/007-db-close.phpt] PASS leveldb - options open options [tests/008-options.phpt] FAIL leveldb - custom comparator [tests/009-comparator.phpt] FAIL leveldb - compression [tests/010-compression.phpt] PASS leveldb - getApproximateSizes [tests/011-getApproximateSizes.phpt] PASS leveldb - getProperty [tests/012-getProperty.phpt] PASS leveldb - compactRange [tests/013-compactRange.phpt] PASS leveldb - iterator destroy [tests/014-iterator-destroy.phpt] PASS leveldb - Fixed bug segfault when double construct iterator [tests/015-double-iterator.phpt] FAIL leveldb - different iterators should not affect each other [tests/016-different-iterators-should-differ.phpt] PASS leveldb - LevelDB::getIterator() [tests/017-db-getIterator.phpt]

FAIL leveldb - snapshot [tests/018-snapshot.phpt]

TIME END 2013-02-19 04:30:42

TEST RESULT SUMMARY

Exts skipped : 0

Exts tested : 46

Number of tests : 18 18 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 5 ( 27.8%) ( 27.8%) Expected fail : 0 ( 0.0%) ( 0.0%)

Tests passed : 13 ( 72.2%) ( 72.2%)

Time taken : 5 seconds

FAILED TEST SUMMARY

leveldb - iterate thought db by foreach [tests/006-iterator-foreach.phpt] leveldb - custom comparator [tests/009-comparator.phpt] leveldb - compression [tests/010-compression.phpt] leveldb - different iterators should not affect each other [tests/016-different-iterators-should-differ.phpt]

leveldb - snapshot [tests/018-snapshot.phpt]

You may have found a problem in PHP. This report can be automatically sent to the PHP QA team at http://qa.php.net/reports and http://news.php.net/php.qa.reports This gives us a better understanding of PHP's behavior. If you don't want to send the report immediately you can choose option "s" to save it. You can then email it to qa-reports@lists.php.net later.

When I try to run the demo API call, I get the following error:

Fatal error: Uncaught exception 'LevelDBException' with message 'Invalid open option: comparator, () is not callable' in /home/XXXXXXX/public_html/xxx/leveldb.php:28 Stack trace: #0 /home/XXXXXXX/public_html/xxx/leveldb.php(28): LevelDB->__construct('newdb.db', Array, Array, Array) #1 {main} thrown in /home/XXXXXXX/public_html/xxx/leveldb.php on line 28

reeze commented 11 years ago

hi will you please provide the failure tests diff ?eg
tests/006-iterator-foreach.diff

Reeze Sent with sparrow

在 2013年2月19日星期二,18:34,cardine 写道:

Hi, When I run "make test", when trying to install, I get the following: PHP_VERSION : 5.3.21 ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux upgrade.XXXXXXXXX 2.6.18-308.11.1.el5 #1 (https://github.com/reeze/php-leveldb/issues/1) SMP Tue Jul 10 08:48:43 EDT 2012 x86_64 INI actual : /home/XXXXXXX/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini More .INIs : CWD : /home/XXXXXXX/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb Extra dirs :
VALGRIND : Not used TIME START 2013-02-19 04:30:37 PASS leveldb - basic: get(), set(), put(), delete() [tests/001-basic.phpt] PASS leveldb - db management [tests/002-db-management.phpt] PASS leveldb - open base dir [tests/003-openbasedir.phpt] PASS leveldb - write batch [tests/004-write-batch.phpt] PASS leveldb - iterate thought db [tests/005-iterator.phpt] FAIL leveldb - iterate thought db by foreach [tests/006-iterator-foreach.phpt] PASS leveldb - db close [tests/007-db-close.phpt] PASS leveldb - options open options [tests/008-options.phpt] FAIL leveldb - custom comparator [tests/009-comparator.phpt] FAIL leveldb - compression [tests/010-compression.phpt] PASS leveldb - getApproximateSizes [tests/011-getApproximateSizes.phpt] PASS leveldb - getProperty [tests/012-getProperty.phpt] PASS leveldb - compactRange [tests/013-compactRange.phpt] PASS leveldb - iterator destroy [tests/014-iterator-destroy.phpt] PASS leveldb - Fixed bug segfault when double construct iterator [tests/015-double-iterator.phpt] FAIL leveldb - different iterators should not affect each other [tests/016-different-iterators-should-differ.phpt] PASS leveldb - LevelDB::getIterator() [tests/017-db-getIterator.phpt]
FAIL leveldb - snapshot [tests/018-snapshot.phpt] TIME END 2013-02-19 04:30:42

TEST RESULT SUMMARY Exts skipped : 0 Exts tested : 46 Number of tests : 18 18 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 5 ( 27.8%) ( 27.8%) Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 13 ( 72.2%) ( 72.2%) Time taken : 5 seconds

FAILED TEST SUMMARY leveldb - iterate thought db by foreach [tests/006-iterator-foreach.phpt] leveldb - custom comparator [tests/009-comparator.phpt] leveldb - compression [tests/010-compression.phpt] leveldb - different iterators should not affect each other [tests/016-different-iterators-should-differ.phpt]
leveldb - snapshot [tests/018-snapshot.phpt] You may have found a problem in PHP. This report can be automatically sent to the PHP QA team at http://qa.php.net/reports and http://news.php.net/php.qa.reports This gives us a better understanding of PHP's behavior. If you don't want to send the report immediately you can choose option "s" to save it. You can then email it to qa-reports@lists.php.net (mailto:qa-reports@lists.php.net) later.
When I try to run the demo API call, I get the following error: Fatal error: Uncaught exception 'LevelDBException' with message 'Invalid open option: comparator, () is not callable' in /home/XXXXXXX/public_html/xxx/leveldb.php:28 Stack trace: #0 /home/XXXXXXX/public_html/xxx/leveldb.php(28): LevelDB->__construct('newdb.db', Array, Array, Array) #1 (https://github.com/reeze/php-leveldb/issues/1) {main} thrown in /home/XXXXXXX/public_html/xxx/leveldb.php on line 28

— Reply to this email directly or view it on GitHub (https://github.com/reeze/php-leveldb/issues/5).

cardine commented 11 years ago

For 006-iterator-foreach:

002- => 003- 10 => 10 004- First => First 005- Last => Last 006- Second => Second 007- Third => Third

009-comparator: 004- 6 005- 5 006- 4 007- 3 008- 2 009- 1 010- * custom comparator can only open with the same comparator again * 011- Invalid argument: php_leveldb.custom_comparator%s leveldb.BytewiseComparator 012- bool(true) 013- * custom comparator which throw exception * 014- Oops! 015- ==DONE==

010-compression: 002+ 002- ==DONE== 003+ Fatal error: Uncaught exception 'LevelDBException' with message 'Invalid argument: php_leveldb.custom_comparator does not match existing comparator : leveldb.B$ 004+ Stack trace: 005+ #0 /home/xxxx/public_html/xxxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php(8): LevelDB->__construct('/home/xxxx/p...', Array) 006+ #1 {main} 007+ thrown in /home/xxxx/public_html/spin/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php on line 8

016-different-iterators-should-differ: 001+ 001- 1 => 1 002- 2 => 2 003- 3 => 3 004- 4 => 4 005- NULL 006- NULL 007- string(1) "3" 008- string(1) "1" 009- ==DONE==

reeze commented 11 years ago

@cardine Hi, the Fatal exception in your report is a bug, the default options value 'comparator' parameter is null, you don't have to specify it with options value in the example, you could open the db with the default options to bypass the bug for now.

I mean you could try open without options or remove the 'comparator' => NULL

I will fix that soon, thank you,

as for the test failure, It seems the db is created with default comparator but opened with custom comparotor, will you please try: rm -rf php-leveldb/tests/*test-db and try to re-run make test?

reeze commented 11 years ago

And the other tests failed, seems they are segfault

after run the test, please try:

$ ulimit -c unlimited $ ./php-leveldb/tests/006-iterator-foreach.sh

if there is a core please provide backtrace, thank you

cardine commented 11 years ago

Hi,

as for the test failure, It seems the db is created with default comparator but opened with custom comparotor, will you please try: rm -rf php-leveldb/tests/*test-db and try to re-run make test? I did this and ran it again, but it came back the same.

Here is the info:

* Loop through in foreach style * ./tests/006-iterator-foreach.sh: line 3: 23357 Segmentation fault (core dumped) /usr/local/bin/php -n -c '/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=32767" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "ignore_repeated_errors=0" -d "precision=14" -d "memory_limit=128M" -d "extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/" -d "extension=leveldb.so" -d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -d "mbstring.func_overload=0" -f "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/006-iterator-foreach.php" 2>&1

If there is anything else I need to give you let me know.

cardine commented 11 years ago

Also, when making the change to the PHP code, I now get this error:

Fatal error: Uncaught exception 'LevelDBException' with message 'IO error: ./leveldb/db.db/LOCK: No such file or directory' in /home/xxx/public_html/xxx/leveldb.php:30 Stack trace: #0 /home/xxx/public_html/xxx/leveldb.php(30): LevelDB->__construct('./leveldb/db.db', Array, Array, Array) #1 {main} thrown in /home/xxx/public_html/xxx/leveldb.php on line 30

I have 'create_if_missing' => true so this should not be an issue.

reeze commented 11 years ago

seems it didn't get segment fault,

you should see a core.$PID file or something similar in your php-leveldb folder,

please try this: $ gdb -c ./core.$PID gdb > bt full

and paste the backtrace please.

please tell me which OS(distribution or so) and version you are using, maybe I could setup a virtual machine for better debugging

cardine commented 11 years ago

Here is what I get when I do this, although I'm not sure how helpful it will be:

gdb -c ./core.23568 GNU gdb (GDB) CentOS (7.0.1-45.el5.centos) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. [New Thread 23568]

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff81dfc000 Core was generated by `/usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/p'. Program terminated with signal 11, Segmentation fault.

0 0x0000000000765807 in ?? ()

(gdb) bt full

0 0x0000000000765807 in ?? ()

No symbol table info available. (gdb)

If there is anything else I need to do to make this output more useful to you let me know.

I am using CentOS release 5.8 (Final)

reeze commented 11 years ago

Please try run:

$ gdb /usr/local/bin/php -c core. 23568 again

cardine commented 11 years ago

I think (hope) this will be more helpful:

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff81dfc000 Core was generated by `/usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/p'. Program terminated with signal 11, Segmentation fault.

0 ZEND_FE_FETCH_SPEC_VAR_HANDLER (execute_data=0x2aaf53974050)

at /home/cpeasyapache/src/php-5.3.21/Zend/zend_vm_execute.h:9053

9053 if (EG(exception)) { (gdb) bt full

0 ZEND_FE_FETCH_SPEC_VAR_HANDLER (execute_data=0x2aaf53974050)

at /home/cpeasyapache/src/php-5.3.21/Zend/zend_vm_execute.h:9053
    opline = 0x1e93fa0
    array = 0x1e98ba0
    value = <value optimized out>
    str_key = <value optimized out>
    str_key_len = <value optimized out>
    int_key = <value optimized out>
    fe_ht = <value optimized out>
    iter = 0x1e97138
    key_type = <value optimized out>
    use_key = 0 '\000'

1 0x00000000007615ae in execute (op_array=0x1eb63e0) at /home/cpeasyapache/src/php-5.3.21/Zend/zend_vm_execute.h:107

    ret = <value optimized out>
    execute_data = 0x2aaf53974050
    nested = 1 '\001'
    original_in_execution = 0 '\000'

2 0x000000000073a9c9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)

at /home/cpeasyapache/src/php-5.3.21/Zend/zend.c:1259
    files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fff81d8ef20, reg_save_area = 0x7fff81d8ee30}}
    i = 1
    file_handle = 0x7fff81d923f0
    orig_op_array = 0x0
    orig_retval_ptr_ptr = 0x0

3 0x00000000006e7578 in php_execute_script (primary_file=0x7fff81d923f0)

at /home/cpeasyapache/src/php-5.3.21/main/main.c:2316
    __orig_bailout = 0x7fff81d921d0
    __bailout = {{__jmpbuf = {14826528, 5581964229407802486, 1, 0, 32202208, 0, 5581964229407930902,
          5582037035557675357}, __mask_was_saved = 0, __saved_mask = {__val = {48, 7, 29747584, 9416, 270669397870,
            32202672, 229440404087961, 32202768, 7639649, 0, 0, 206158430214, 140735371874432, 32202640,
            140735371874432, 32202640}}}}
    prepend_file_p = 0x0
    append_file_p = 0x8
    prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0,

    value = <value optimized out>
    str_key = <value optimized out>
    str_key_len = <value optimized out>
    int_key = <value optimized out>
    fe_ht = <value optimized out>
    iter = 0x1e97138
    key_type = <value optimized out>
    use_key = 0 '\000'

1 0x00000000007615ae in execute (op_array=0x1eb63e0) at /home/cpeasyapache/src/php-5.3.21/Zend/zend_vm_execute.h:107

    ret = <value optimized out>
    execute_data = 0x2aaf53974050
    nested = 1 '\001'
    original_in_execution = 0 '\000'

2 0x000000000073a9c9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)

at /home/cpeasyapache/src/php-5.3.21/Zend/zend.c:1259
    files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fff81d8ef20, reg_save_area = 0x7fff81d8ee30}}
    i = 1
    file_handle = 0x7fff81d923f0
    orig_op_array = 0x0
    orig_retval_ptr_ptr = 0x0

3 0x00000000006e7578 in php_execute_script (primary_file=0x7fff81d923f0)

at /home/cpeasyapache/src/php-5.3.21/main/main.c:2316
    __orig_bailout = 0x7fff81d921d0
    __bailout = {{__jmpbuf = {14826528, 5581964229407802486, 1, 0, 32202208, 0, 5581964229407930902,
          5582037035557675357}, __mask_was_saved = 0, __saved_mask = {__val = {48, 7, 29747584, 9416, 270669397870,
            32202672, 229440404087961, 32202768, 7639649, 0, 0, 206158430214, 140735371874432, 32202640,
            140735371874432, 32202640}}}}
    prepend_file_p = 0x0
    append_file_p = 0x8
    prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0,

---Type to continue, or q to quit--- stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'} append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'} old_cwd = 0x7fff81d8ef30 "" retval = 0

4 0x00000000007c3a6c in main (argc=64, argv=0x7fff81d92668) at /home/cpeasyapache/src/php-5.3.21/sapi/cli/php_cli.c:1189

    __bailout = {{__jmpbuf = {29745099, 5582037035550709038, 24, 140735371883611, 732, 0, 5581964229407802470,
          5582037035556747922}, __mask_was_saved = 0, __saved_mask = {__val = {270664764679, 37, 46932379117648, 37,
            46, 814159578, 270664765700, 37, 140735371879040, 814159578, 270664764679, 140735371879464,
            46932379117616, 33, 46, 221883709}}}}
    exit_status = 0
    c = <value optimized out>
    file_handle = {type = ZEND_HANDLE_MAPPED,
      filename = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php", opened_path = 0x0, handle = {fd = 32046872, fp = 0x1e8ff18, stream = {handle = 0x1e8ff18, isatty = 0, mmap = {
            len = 1469, pos = 0, map = 0x2aaf539f7000, buf = 0x2aaf539f7000 <Address 0x2aaf539f7000 out of bounds>,
            old_handle = 0x1eb5790, old_closer = 0x74fb50 <zend_stream_stdio_closer>},
          reader = 0x750130 <zend_stream_stdio_reader>, fsizer = 0x750070 <zend_stream_stdio_fsizer>,
          closer = 0x7500c0 <zend_stream_mmap_closer>}}, free_filename = 0 '\000'}
    behavior = 1
    reflection_what = 0x0
    orig_optind = 1
    orig_optarg = 0x0
    arg_free = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    arg_excp = <value optimized out>
    script_file = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    translated_path = 0x1eb5de0 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    interactive = <value optimized out>
    module_started = 1

execute_data = 0x2aaf53974050 nested = 1 '\001' original_in_execution = 0 '\000'

2 0x000000000073a9c9 in zend_execute_scripts (type=8, retval=0x0, file_count=3)

at /home/cpeasyapache/src/php-5.3.21/Zend/zend.c:1259
    files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fff81d8ef20, reg_save_area = 0x7fff81d8ee30}}
    i = 1
    file_handle = 0x7fff81d923f0
    orig_op_array = 0x0
    orig_retval_ptr_ptr = 0x0

3 0x00000000006e7578 in php_execute_script (primary_file=0x7fff81d923f0)

at /home/cpeasyapache/src/php-5.3.21/main/main.c:2316
    __orig_bailout = 0x7fff81d921d0
    __bailout = {{__jmpbuf = {14826528, 5581964229407802486, 1, 0, 32202208, 0, 5581964229407930902,
          5582037035557675357}, __mask_was_saved = 0, __saved_mask = {__val = {48, 7, 29747584, 9416, 270669397870,
            32202672, 229440404087961, 32202768, 7639649, 0, 0, 206158430214, 140735371874432, 32202640,
            140735371874432, 32202640}}}}
    prepend_file_p = 0x0
    append_file_p = 0x8
    prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0,

---Type to continue, or q to quit--- stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'} append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, closer = 0}}, free_filename = 0 '\000'} old_cwd = 0x7fff81d8ef30 "" retval = 0

4 0x00000000007c3a6c in main (argc=64, argv=0x7fff81d92668) at /home/cpeasyapache/src/php-5.3.21/sapi/cli/php_cli.c:1189

    __bailout = {{__jmpbuf = {29745099, 5582037035550709038, 24, 140735371883611, 732, 0, 5581964229407802470,
          5582037035556747922}, __mask_was_saved = 0, __saved_mask = {__val = {270664764679, 37, 46932379117648, 37,
            46, 814159578, 270664765700, 37, 140735371879040, 814159578, 270664764679, 140735371879464,
            46932379117616, 33, 46, 221883709}}}}
    exit_status = 0
    c = <value optimized out>
    file_handle = {type = ZEND_HANDLE_MAPPED,
      filename = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php", opened_path = 0x0, handle = {fd = 32046872, fp = 0x1e8ff18, stream = {handle = 0x1e8ff18, isatty = 0, mmap = {
            len = 1469, pos = 0, map = 0x2aaf539f7000, buf = 0x2aaf539f7000 <Address 0x2aaf539f7000 out of bounds>,
            old_handle = 0x1eb5790, old_closer = 0x74fb50 <zend_stream_stdio_closer>},
          reader = 0x750130 <zend_stream_stdio_reader>, fsizer = 0x750070 <zend_stream_stdio_fsizer>,
          closer = 0x7500c0 <zend_stream_mmap_closer>}}, free_filename = 0 '\000'}
    behavior = 1
    reflection_what = 0x0
    orig_optind = 1
    orig_optarg = 0x0
    arg_free = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    arg_excp = <value optimized out>
    script_file = 0x7fff81d93460 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    translated_path = 0x1eb5de0 "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php"
    interactive = <value optimized out>
    module_started = 1

---Type to continue, or q to quit--- request_started = 1 lineno = 1 exec_direct = 0x0 exec_run = 0x0 exec_begin = 0x0 exec_end = 0x0 param_error = hide_argv = 0 ini_entries_len =

reeze commented 11 years ago

hmm, since I could exame the variables and I can't reproduce in my box by use the same php and compile options, I will download centos and try to reproduce it later,

will you please try modify the 006-iterator-foreach.sh and the other failed tests by

  1. add: export USE_ZEND_ALLOC=0

after: the first line.

  1. add a prefix of valgrind to analyse, eg:

from: /usr/local/bin/php -n -c ....... to: valgrind /usr/local/bin/php -n -c .......

and rerun the 006-iterator-foreach.sh file, the output log may be more helpful to find out where the problem is.

cardine commented 11 years ago

Unfortunately this did not provide useful info:

gdb valgrind /usr/local/bin/php -n -c core.23568

Excess command line arguments ignored. (/usr/local/bin/php) GNU gdb (GDB) CentOS (7.0.1-45.el5.centos) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/valgrind...done.

warning: core file may not match specified executable file. [New Thread 23568] Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff81dfc000 Core was generated by `/usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/p'. Program terminated with signal 11, Segmentation fault.

0 0x0000000000765807 in ?? ()

(gdb) bt full

0 0x0000000000765807 in ?? ()

No symbol table info available.

1 0x0000000000000008 in ?? ()

No symbol table info available.

2 0x00002aaf4f518c1d in ?? ()

No symbol table info available.

3 0x000000000000000f in ?? ()

No symbol table info available.

4 0x00002aaf4f2fc1bd in ?? ()

No symbol table info available.

5 0x0000000001e93f28 in ?? ()

No symbol table info available.

6 0x000000000076a33a in ?? ()

No symbol table info available.

7 0x0000000001e93e38 in ?? ()

No symbol table info available.

8 0x0000000001e97138 in ?? ()

No symbol table info available.

9 0x0000000000000000 in ?? ()

No symbol table info available. (gdb)


Also do you want me to add the zend line in the 006-iterator-foreach.sh file or in the phpt file? I added it in the 006-iterator-foreach.sh file but just wanted to make sure that is what you meant.

Appreciate you looking into this.

reeze commented 11 years ago

Hi, update the sh file without gdb, just valgrind /usr/local/bin :)

Yes after the modify it looks like: $ cat tests/006-iterator-foreach.sh

!/bin/sh

export USE_ZEND_ALLOC=0 valgrind /usr/local/bin/php -n -c .....

$ ./tests/006-iterator-foreach.sh this may output many logs, that might be helpful.

reeze commented 11 years ago

BTW: please provide:

$ /usr/local/bin/php -i

Maybe there are conflict with some extensions

cardine commented 11 years ago

Here is the valgrind output: valgrind /usr/local/bin/php -n -c core.23568 ==16067== Memcheck, a memory error detector ==16067== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==16067== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==16067== Command: /usr/local/bin/php -n -c core.23568 ==16067== PHP: syntax error, unexpected '(' in /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/core.23568 on line 1 ==16067== ==16067== HEAP SUMMARY: ==16067== in use at exit: 3,005,103 bytes in 19,031 blocks ==16067== total heap usage: 20,232 allocs, 1,201 frees, 76,289,283 bytes allocated ==16067== ==16067== LEAK SUMMARY: ==16067== definitely lost: 0 bytes in 0 blocks ==16067== indirectly lost: 0 bytes in 0 blocks ==16067== possibly lost: 811,997 bytes in 5,914 blocks ==16067== still reachable: 2,193,106 bytes in 13,117 blocks ==16067== suppressed: 0 bytes in 0 blocks ==16067== Rerun with --leak-check=full to see details of leaked memory ==16067== ==16067== For counts of detected and suppressed errors, rerun with: -v ==16067== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)

If there is any other info I need to get from valgrind let me know.

Here is the PHP output: phpinfo() PHP Version => 5.3.21

System => Linux upgrade.xxxxxxxxx.com 2.6.18-308.11.1.el5 #1 SMP Tue Jul 10 08:48:43 EDT 2012 x86_64 Build Date => Feb 18 2013 06:26:54 Configure Command => './configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-dba=shared' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mm=/opt/mm/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysqlconfig' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-qdbm=/usr/local/lib/' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /usr/local/lib Loaded Configuration File => /usr/local/lib/php.ini Scan this dir for additional .ini files => (none) Additional .ini files parsed => (none) PHP API => 20090626 PHP Extension => 20090626 Zend Extension => 220090626 Zend Extension Build => API220090626,NTS PHP Extension Build => API20090626,NTS Debug Build => no Thread Safety => disabled Zend Memory Manager => enabled Zend Multibyte Support => disabled IPv6 Support => enabled Registered PHP Streams => compress.zlib, compress.bzip2, dict, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp, php, file, glob, data, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters => zlib.
, bzip2., convert.iconv., mcrypt., mdecrypt., string.rot13, string.toupper, string.tolower, string.striptags, convert., consumed, dechunk

This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.


Configuration

bcmath

BCMath support => enabled

Directive => Local Value => Master Value bcmath.scale => 0 => 0

bz2

BZip2 Support => Enabled Stream Wrapper support => compress.bzip2:// Stream Filter support => bzip2.decompress, bzip2.compress BZip2 Version => 1.0.3, 15-Feb-2005

calendar

Calendar support => enabled

Core

PHP Version => 5.3.21

Directive => Local Value => Master Value allow_call_time_pass_reference => On => On allow_url_fopen => On => On allow_url_include => Off => Off always_populate_raw_post_data => Off => Off arg_separator.input => & => & arg_separator.output => & => & asp_tags => Off => Off auto_append_file => no value => no value auto_globals_jit => On => On auto_prepend_file => no value => no value browscap => no value => no value default_charset => no value => no value default_mimetype => text/html => text/html define_syslog_variables => Off => Off disable_classes => no value => no value disable_functions => dl => dl display_errors => STDOUT => STDOUT display_startup_errors => Off => Off doc_root => no value => no value docref_ext => no value => no value docref_root => no value => no value enable_dl => Off => Off error_append_string => no value => no value error_log => error_log => error_log error_prepend_string => no value => no value error_reporting => 22519 => 22519 exit_on_timeout => Off => Off expose_php => On => On extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20090626 => /usr/local/lib/php/extensions/no-debug-non-zts-20090626 file_uploads => On => On highlight.bg => #FFFFFF => #FFFFFF highlight.comment => #FF8000 => #FF8000 highlight.default => #0000BB => #0000BB highlight.html => #000000 => #000000 highlight.keyword => #007700 => #007700 highlight.string => #DD0000 => #DD0000 html_errors => Off => Off ignore_repeated_errors => Off => Off ignore_repeated_source => Off => Off ignore_user_abort => Off => Off implicit_flush => On => On include_path => .:/usr/lib/php:/usr/local/lib/php => .:/usr/lib/php:/usr/local/lib/php log_errors => On => On log_errors_max_len => 1024 => 1024 magic_quotes_gpc => On => On magic_quotes_runtime => Off => Off magic_quotes_sybase => Off => Off mail.add_x_header => Off => Off mail.force_extra_parameters => no value => no value mail.log => no value => no value max_execution_time => 0 => 0 max_file_uploads => 20 => 20 max_input_nesting_level => 64 => 64 max_input_time => -1 => -1 max_input_vars => 1000 => 1000 memory_limit => 1024M => 1024M open_basedir => no value => no value output_buffering => 0 => 0 output_handler => no value => no value post_max_size => 8M => 8M precision => 12 => 12 realpath_cache_size => 16K => 16K realpath_cache_ttl => 120 => 120 register_argc_argv => On => On register_globals => Off => Off register_long_arrays => On => On report_memleaks => On => On report_zend_debug => Off => Off request_order => no value => no value safe_mode => Off => Off safe_mode_exec_dir => no value => no value safe_mode_gid => Off => Off safe_mode_include_dir => no value => no value sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i serialize_precision => 100 => 100 short_open_tag => On => On SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off track_errors => Off => Off unserialize_callback_func => no value => no value upload_max_filesize => 80M => 80M upload_tmp_dir => no value => no value user_dir => no value => no value user_ini.cache_ttl => 300 => 300 user_ini.filename => .user.ini => .user.ini variables_order => EGPCS => EGPCS xmlrpc_error_number => 0 => 0 xmlrpc_errors => Off => Off y2k_compliance => On => On zend.enable_gc => On => On

ctype

ctype functions => enabled

curl

cURL support => enabled cURL Information => 7.24.0 Age => 3 Features AsynchDNS => No Debug => No GSS-Negotiate => No IDN => Yes IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => No krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp Host => x86_64-unknown-linux-gnu SSL Version => OpenSSL/0.9.8b ZLib Version => 1.2.3

date

date/time support => enabled "Olson" Timezone Database Version => 2012.10 Timezone Database => internal Default timezone => America/Chicago

Directive => Local Value => Master Value date.default_latitude => 31.7667 => 31.7667 date.default_longitude => 35.2333 => 35.2333 date.sunrise_zenith => 90.583333 => 90.583333 date.sunset_zenith => 90.583333 => 90.583333 date.timezone => America/Chicago => America/Chicago

dom

DOM/XML => enabled DOM/XML API Version => 20031129 libxml Version => 2.9.0 HTML Support => enabled XPath Support => enabled XPointer Support => enabled Schema Support => enabled RelaxNG Support => enabled

eAccelerator

eAccelerator support => enabled Version => 0.9.6.1 Caching Enabled => false Optimizer Enabled => false Check mtime Enabled => false

Directive => Local Value => Master Value eaccelerator.allowed_admin_path => no value => no value eaccelerator.cache_dir => /tmp/eaccelerator => /tmp/eaccelerator eaccelerator.check_mtime => 1 => 1 eaccelerator.debug => 0 => 0 eaccelerator.enable => 1 => 1 eaccelerator.filter => no value => no value eaccelerator.log_file => no value => no value eaccelerator.optimizer => 1 => 1 eaccelerator.shm_max => 0 => 0 eaccelerator.shm_only => 0 => 0 eaccelerator.shm_prune_period => 0 => 0 eaccelerator.shm_size => 16 => 16 eaccelerator.shm_ttl => 0 => 0

ereg

Regex Library => Bundled library enabled

exif

EXIF Support => enabled EXIF Version => 1.4 $Id$ Supported EXIF Version => 0220 Supported filetypes => JPEG,TIFF

Directive => Local Value => Master Value exif.decode_jis_intel => JIS => JIS exif.decode_jis_motorola => JIS => JIS exif.decode_unicode_intel => UCS-2LE => UCS-2LE exif.decode_unicode_motorola => UCS-2BE => UCS-2BE exif.encode_jis => no value => no value exif.encode_unicode => ISO-8859-15 => ISO-8859-15

filter

Input Validation and Filtering => enabled Revision => $Id: 209a1c3c98c04a5474846e7bbe8ca72054ccfd4f $

Directive => Local Value => Master Value filter.default => unsafe_raw => unsafe_raw filter.default_flags => no value => no value

ftp

FTP support => enabled

gd

GD Support => enabled GD Version => bundled (2.0.34 compatible) FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.2.1 GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled libJPEG Version => 6b PNG Support => enabled libPNG Version => 1.2.10 WBMP Support => enabled XPM Support => enabled libXpm Version => 30411 XBM Support => enabled

Directive => Local Value => Master Value gd.jpeg_ignore_warning => 0 => 0

gettext

GetText Support => enabled

hash

hash support => enabled Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support => enabled iconv implementation => glibc iconv library version => 2.5

Directive => Local Value => Master Value iconv.input_encoding => ISO-8859-1 => ISO-8859-1 iconv.internal_encoding => ISO-8859-1 => ISO-8859-1 iconv.output_encoding => ISO-8859-1 => ISO-8859-1

imap

IMAP c-Client Version => 2007f SSL Support => enabled Kerberos Support => enabled

json

json support => enabled json version => 1.2.1

leveldb

leveldb support => enabled leveldb version => 0.1.2-dev

libxml

libXML support => active libXML Compiled Version => 2.9.0 libXML Loaded Version => 20900 libXML streams => enabled

mbstring

Multibyte Support => enabled Multibyte string engine => libmbfl HTTP input encoding translation => disabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled Multibyte regex (oniguruma) backtrack check => On Multibyte regex (oniguruma) version => 4.7.1

Directive => Local Value => Master Value mbstring.detect_order => no value => no value mbstring.encoding_translation => Off => Off mbstring.func_overload => 0 => 0 mbstring.http_input => pass => pass mbstring.http_output => pass => pass mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml+xml) => ^(text/|application/xhtml+xml) mbstring.internal_encoding => no value => no value mbstring.language => neutral => neutral mbstring.strict_detection => Off => Off mbstring.substitute_character => no value => no value

mcrypt

mcrypt support => enabled mcrypt_filter support => enabled Version => 2.5.8 Api No => 20021217 Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream

Directive => Local Value => Master Value mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value

mysql

MySQL Support => enabled Active Persistent Links => 0 Active Links => 0 Client API version => 5.1.66 MYSQL_MODULE_TYPE => external MYSQL_SOCKET => /var/lib/mysql/mysql.sock MYSQL_INCLUDE => -I/usr/include/mysql MYSQL_LIBS => -L/usr/lib64 -lmysqlclient

Directive => Local Value => Master Value mysql.allow_local_infile => On => On mysql.allow_persistent => On => On mysql.connect_timeout => 60 => 60 mysql.default_host => no value => no value mysql.default_password => no value => no value mysql.default_port => no value => no value mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock mysql.default_user => no value => no value mysql.max_links => Unlimited => Unlimited mysql.max_persistent => Unlimited => Unlimited mysql.trace_mode => Off => Off

mysqli

MysqlI Support => enabled Client API library version => 5.1.66 Active Persistent Links => 0 Inactive Persistent Links => 0 Active Links => 0 Client API header version => 5.1.66 MYSQLI_SOCKET => /var/lib/mysql/mysql.sock

Directive => Local Value => Master Value mysqli.allow_local_infile => On => On mysqli.allow_persistent => On => On mysqli.default_host => no value => no value mysqli.default_port => 3306 => 3306 mysqli.default_pw => no value => no value mysqli.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock mysqli.default_user => no value => no value mysqli.max_links => Unlimited => Unlimited mysqli.max_persistent => Unlimited => Unlimited mysqli.reconnect => Off => Off

openssl

OpenSSL support => enabled OpenSSL Library Version => OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 OpenSSL Header Version => OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 8.21 2011-12-12

Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled PDO drivers => sqlite, mysql, sqlite2

pdo_mysql

PDO Driver for MySQL => enabled Client API version => 5.1.66

Directive => Local Value => Master Value pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock

pdo_sqlite

PDO Driver for SQLite 3.x => enabled SQLite Library => 3.7.7.1

Phar

Phar: PHP Archive support => enabled Phar EXT version => 2.0.1 Phar API version => 1.1.1 SVN revision => $Id: 7b7d559811a842dc9e7d33777a8f993aa2b9933d $ Phar-based phar archives => enabled Tar-based phar archives => enabled ZIP-based phar archives => enabled gzip compression => enabled bzip2 compression => enabled OpenSSL support => enabled

Phar based on pear/PHP_Archive, original concept by Davey Shafik. Phar fully realized by Gregory Beaver and Marcus Boerger. Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle. Directive => Local Value => Master Value phar.cache_list => no value => no value phar.readonly => On => On phar.require_hash => On => On

posix

Revision => $Id: 5a2da3946b96c5afbf3aff8db8a8681f8bedee85 $

pspell

PSpell Support => enabled

Reflection

Reflection => enabled Version => $Id: 4af6c4c676864b1c0bfa693845af0688645c37cf $

session

Session Support => enabled Registered save handlers => files user mm sqlite Registered serializer handlers => php php_binary wddx

Directive => Local Value => Master Value session.auto_start => Off => Off session.bug_compat_42 => On => On session.bug_compat_warn => On => On session.cache_expire => 180 => 180 session.cache_limiter => nocache => nocache session.cookie_domain => no value => no value session.cookie_httponly => Off => Off session.cookie_lifetime => 0 => 0 session.cookie_path => / => / session.cookie_secure => Off => Off session.entropy_file => no value => no value session.entropy_length => 0 => 0 session.gc_divisor => 100 => 100 session.gc_maxlifetime => 1440 => 1440 session.gc_probability => 1 => 1 session.hash_bits_per_character => 4 => 4 session.hash_function => 0 => 0 session.name => PHPSESSID => PHPSESSID session.referer_check => no value => no value session.save_handler => files => files session.save_path => /tmp => /tmp session.serialize_handler => php => php session.use_cookies => On => On session.use_only_cookies => On => On session.use_trans_sid => 0 => 0

SimpleXML

Simplexml support => enabled Revision => $Id: 02ab7893b36d51e9c59da77d7e287eb3b35e1e32 $ Schema support => enabled

soap

Soap Client => enabled Soap Server => enabled

Directive => Local Value => Master Value soap.wsdl_cache => 1 => 1 soap.wsdl_cache_dir => /tmp => /tmp soap.wsdl_cache_enabled => 1 => 1 soap.wsdl_cache_limit => 5 => 5 soap.wsdl_cache_ttl => 86400 => 86400

sockets

Sockets Support => enabled

SPL

SPL support => enabled Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support => enabled PECL Module version => 2.0-dev $Id$ SQLite Library => 2.8.17 SQLite Encoding => iso8859

Directive => Local Value => Master Value sqlite.assoc_case => 0 => 0

sqlite3

SQLite3 support => enabled SQLite3 module version => 0.7-dev SQLite Library => 3.7.7.1

Directive => Local Value => Master Value sqlite3.extension_dir => no value => no value

standard

Dynamic Library Support => enabled Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value assert.active => 1 => 1 assert.bail => 0 => 0 assert.callback => no value => no value assert.quiet_eval => 0 => 0 assert.warning => 1 => 1 auto_detect_line_endings => 0 => 0 default_socket_timeout => 180 => 180 from => no value => no value safe_mode_allowed_envvars => PHP => PHP_ safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH url_rewriter.tags => a=href,area=href,frame=src,input=src,form=,fieldset= => a=href,area=href,frame=src,input=src,form=,fieldset= user_agent => no value => no value

tidy

Tidy support => enabled libTidy Release => 25 March 2009 Extension Version => 2.0 ($Id$)

Directive => Local Value => Master Value tidy.clean_output => 0 => 0 tidy.default_config => no value => no value

tokenizer

Tokenizer Support => enabled

wddx

WDDX Support => enabled WDDX Session Serializer => enabled

xml

XML Support => active XML Namespace Support => active EXPAT Version => expat_1.95.8

xmlreader

XMLReader => enabled

xmlrpc

core library version => xmlrpc-epi v. 0.51 php extension version => 0.51 author => Dan Libby homepage => http://xmlrpc-epi.sourceforge.net open sourced by => Epinions.com

xmlwriter

XMLWriter => enabled

xsl

XSL => enabled libxslt Version => 1.1.27 libxslt compiled against libxml Version => 2.9.0 EXSLT => enabled libexslt Version => 1.1.27

zlib

ZLib Support => enabled Stream Wrapper support => compress.zlib:// Stream Filter support => zlib.inflate, zlib.deflate Compiled Version => 1.2.3 Linked Version => 1.2.3

Directive => Local Value => Master Value zlib.output_compression => Off => Off zlib.output_compression_level => -1 => -1 zlib.output_handler => no value => no value

Additional Modules

Module Name ionCube Loader

Environment

Variable => Value MANPATH => /usr/lib/courier-imap/man: HOSTNAME => upgrade.xxxxxxxxx.com SHELL => /bin/bash TERM => screen HISTSIZE => 1000 SSH_CLIENT => 108.3.191.153 61755 22 OLDPWD => /backup/xxx/xxx SSH_TTY => /dev/pts/0 USER => root LSCOLORS => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.zip=01;31:.z=01;31:.Z=01;31:.gz=01;31:.bz2=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.avi=01;35:.fli=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.flac=01;35:.mp3=01;35:.mpc=01;35:.ogg=01;35:_.wav=01;35: TERMCAP => SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ :li#47:co#173:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\ :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\ :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\ :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\ :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :vb=\Eg:G0:as=\E(0:ae=\E(B:\ :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\ :po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:k0=\E[10~:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:\ :F2=\E[24~:F3=\EO2P:F4=\EO2Q:F5=\EO2R:F6=\EO2S:\ :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:kb=:\ :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:_4=\E[3;2~:\ :_7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\ :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:kH=\E[4~:\ :@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:\ :kd=\EOB:kr=\EOC:kl=\EOD:km: PATH => /usr/local/jdk/bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/usr/local/bin:/usr/X11R6/bin MAIL => /var/spool/mail/root STY => 10631.pts-0.upgrade PWD => /backup INPUTRC => /etc/inputrc JAVA_HOME => /usr/local/jdk EDITOR => pico LANG => en_US.UTF-8 HOME => /root SHLVL => 2 LS_OPTIONS => --color=tty -F -a -b -T 0 LOGNAME => root CVS_RSH => ssh VISUAL => pico WINDOW => 3 SSH_CONNECTION => 108.3.191.153 61755 xx.xx.xx.xxx 22 CLASSPATH => .:/usr/local/jdk/lib/classes.zip LESSOPEN => |/usr/bin/lesspipe.sh %s G_BROKENFILENAMES => 1 HISTTIMEFORMAT => [%m.%d.%y] %T
=> /usr/local/bin/php

PHP Variables

Variable => Value _SERVER["MANPATH"] => /usr/lib/courier-imap/man: _SERVER["HOSTNAME"] => upgrade.xxxxxxxxx.com _SERVER["SHELL"] => /bin/bash _SERVER["TERM"] => screen _SERVER["HISTSIZE"] => 1000 _SERVER["SSH_CLIENT"] => 108.3.191.153 61755 22 _SERVER["OLDPWD"] => /backup/xxx/xxx _SERVER["SSH_TTY"] => /dev/pts/0 _SERVER["USER"] => root _SERVER["LSCOLORS"] => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.zip=01;31:.z=01;31:.Z=01;31:.gz=01;31:.bz2=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.avi=01;35:.fli=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.flac=01;35:.mp3=01;35:.mpc=01;35:.ogg=01;35:_.wav=01;35: _SERVER["TERMCAP"] => SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ :li#47:co#173:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\ :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\ :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\ :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\ :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :vb=\Eg:G0:as=\E(0:ae=\E(B:\ :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\ :po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:k0=\E[10~:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:\ :F2=\E[24~:F3=\EO2P:F4=\EO2Q:F5=\EO2R:F6=\EO2S:\ :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:kb=:\ :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:_4=\E[3;2~:\ :_7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\ :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:kH=\E[4~:\ :@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:\ :kd=\EOB:kr=\EOC:kl=\EOD:km: _SERVER["PATH"] => /usr/local/jdk/bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/usr/local/bin:/usr/X11R6/bin _SERVER["MAIL"] => /var/spool/mail/root _SERVER["STY"] => 10631.pts-0.upgrade _SERVER["PWD"] => /backup _SERVER["INPUTRC"] => /etc/inputrc _SERVER["JAVA_HOME"] => /usr/local/jdk _SERVER["EDITOR"] => pico _SERVER["LANG"] => en_US.UTF-8 _SERVER["HOME"] => /root _SERVER["SHLVL"] => 2 _SERVER["LS_OPTIONS"] => --color=tty -F -a -b -T 0 _SERVER["LOGNAME"] => root _SERVER["CVS_RSH"] => ssh _SERVER["VISUAL"] => pico _SERVER["WINDOW"] => 3 _SERVER["SSH_CONNECTION"] => 108.3.191.153 61755 xx.xx.xx.xxx 22 _SERVER["CLASSPATH"] => .:/usr/local/jdk/lib/classes.zip _SERVER["LESSOPEN"] => |/usr/bin/lesspipe.sh %s _SERVER["G_BROKEN_FILENAMES"] => 1 _SERVER["HISTTIMEFORMAT"] => [%m.%d.%y] %T
SERVER[""] => /usr/local/bin/php _SERVER["PHP_SELF"] => _SERVER["SCRIPT_NAME"] => _SERVER["SCRIPT_FILENAME"] => _SERVER["PATH_TRANSLATED"] => _SERVER["DOCUMENT_ROOT"] => _SERVER["REQUEST_TIME"] => 1361365377 _SERVER["argv"] => Array ( )

_SERVER["argc"] => 0 _ENV["MANPATH"] => /usr/lib/courier-imap/man: _ENV["HOSTNAME"] => upgrade.xxxxxxxxx.com _ENV["SHELL"] => /bin/bash _ENV["TERM"] => screen _ENV["HISTSIZE"] => 1000 _ENV["SSH_CLIENT"] => 108.3.191.153 61755 22 _ENV["OLDPWD"] => /backup/xxx/xxx _ENV["SSH_TTY"] => /dev/pts/0 _ENV["USER"] => root _ENV["LSCOLORS"] => no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.zip=01;31:.z=01;31:.Z=01;31:.gz=01;31:.bz2=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.avi=01;35:.fli=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.flac=01;35:.mp3=01;35:.mpc=01;35:.ogg=01;35:_.wav=01;35: _ENV["TERMCAP"] => SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ :li#47:co#173:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\ :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\ :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\ :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\ :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :vb=\Eg:G0:as=\E(0:ae=\E(B:\ :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\ :po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:k0=\E[10~:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:\ :F2=\E[24~:F3=\EO2P:F4=\EO2Q:F5=\EO2R:F6=\EO2S:\ :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:kb=:\ :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:_4=\E[3;2~:\ :_7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\ :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:kH=\E[4~:\ :@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:\ :kd=\EOB:kr=\EOC:kl=\EOD:km: _ENV["PATH"] => /usr/local/jdk/bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/usr/local/bin:/usr/X11R6/bin _ENV["MAIL"] => /var/spool/mail/root _ENV["STY"] => 10631.pts-0.upgrade _ENV["PWD"] => /backup _ENV["INPUTRC"] => /etc/inputrc _ENV["JAVA_HOME"] => /usr/local/jdk _ENV["EDITOR"] => pico _ENV["LANG"] => en_US.UTF-8 _ENV["HOME"] => /root _ENV["SHLVL"] => 2 _ENV["LS_OPTIONS"] => --color=tty -F -a -b -T 0 _ENV["LOGNAME"] => root _ENV["CVS_RSH"] => ssh _ENV["VISUAL"] => pico _ENV["WINDOW"] => 3 _ENV["SSH_CONNECTION"] => 108.3.191.153 61755 xx.xx.xx.xxx 22 _ENV["CLASSPATH"] => .:/usr/local/jdk/lib/classes.zip _ENV["LESSOPEN"] => |/usr/bin/lesspipe.sh %s _ENV["G_BROKEN_FILENAMES"] => 1 _ENV["HISTTIMEFORMAT"] => [%m.%d.%y] %T
ENV[""] => /usr/local/bin/php

PHP License This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.

reeze commented 11 years ago

hey, @cardine

I mean run valgrind with the php tests but not the core :)

you could try make test again, and modify the *.sh file add USE_ZEND_ALLOC and valgrind prefix to /usr/local/bin/php

cardine commented 11 years ago

Hi,

Do you mean running commands like these: valgrind /usr/local/bin/php -n -c 006-iterator-foreach.sh

or

valgrind make test

or something else?

I'm sorry for being a little dense, I don't have that much experience with valgrind or debugging C code.

reeze commented 11 years ago
  1. re run make test, that should be some failed tests
  2. vim tests/006-iterator-foreach.sh
    1. add one line: export USE_ZEND_ALLOC=0 below the first line
    2. add a prefix to the origin (now the 4th line), after the prefix, it should looks like:
#!/bin/sh
export USE_ZEND_ALLOC=0

valgrind /usr/local/bin/php -c -n ..... (original line....)

Then run the sh file like $ ./tests/006-iterator-foreach.sh

cardine commented 11 years ago

What the file looked like before running it:

!/bin/sh

export USE_ZEND_ALLOC=0 valgrind /usr/local/bin/php -c -n '/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini' -d "out$

The output: ==21336== Memcheck, a memory error detector ==21336== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==21336== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==21336== Command: /usr/local/bin/php -c -n /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/ -d extension=leveldb.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/006-iterator-foreach.php ==21336== Could not open input file: /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini ==21336== ==21336== HEAP SUMMARY: ==21336== in use at exit: 113 bytes in 4 blocks ==21336== total heap usage: 23,195 allocs, 23,191 frees, 2,934,461 bytes allocated ==21336== ==21336== LEAK SUMMARY: ==21336== definitely lost: 0 bytes in 0 blocks ==21336== indirectly lost: 0 bytes in 0 blocks ==21336== possibly lost: 0 bytes in 0 blocks ==21336== still reachable: 113 bytes in 4 blocks ==21336== suppressed: 0 bytes in 0 blocks ==21336== Rerun with --leak-check=full to see details of leaked memory ==21336== ==21336== For counts of detected and suppressed errors, rerun with: -v ==21336== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)


However I tried it with another file and got something that looks more useful:

==21495== Memcheck, a memory error detector ==21495== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==21495== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==21495== Command: /usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/ -d extension=leveldb.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php ==21495== * could not use invalid custom comparator * Invalid open option: comparator, invaid_func() is not callable * valid custom comparator * ==21495== Invalid read of size 8 ==21495== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21495== by 0x7615AD: execute (zend_vm_execute.h:107) ==21495== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21495== by 0x6E7577: php_execute_script (main.c:2316) ==21495== by 0x7C3A6B: main (php_cli.c:1189) ==21495== Address 0x3d0 is not stack'd, malloc'd or (recently) free'd ==21495== ==21495== ==21495== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==21495== Access not within mapped region at address 0x3D0 ==21495== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21495== by 0x7615AD: execute (zend_vm_execute.h:107) ==21495== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21495== by 0x6E7577: php_execute_script (main.c:2316) ==21495== by 0x7C3A6B: main (php_cli.c:1189) ==21495== If you believe this happened as a result of a stack ==21495== overflow in your program's main thread (unlikely but ==21495== possible), you can try to increase the size of the ==21495== main thread stack using the --main-stacksize= flag. ==21495== The main thread stack size used in this run was 8388608. ==21495== ==21495== HEAP SUMMARY: ==21495== in use at exit: 3,178,058 bytes in 19,925 blocks ==21495== total heap usage: 24,982 allocs, 5,057 frees, 3,868,393 bytes allocated ==21495== ==21495== LEAK SUMMARY: ==21495== definitely lost: 0 bytes in 0 blocks ==21495== indirectly lost: 0 bytes in 0 blocks ==21495== possibly lost: 269,576 bytes in 6,235 blocks ==21495== still reachable: 2,908,482 bytes in 13,690 blocks ==21495== suppressed: 0 bytes in 0 blocks ==21495== Rerun with --leak-check=full to see details of leaked memory ==21495== ==21495== For counts of detected and suppressed errors, rerun with: -v ==21495== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4) ./009-comparator.sh: line 4: 21495 Segmentation fault valgrind /usr/local/bin/php -n -c '/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=32767" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "ignore_repeated_errors=0" -d "precision=14" -d "memory_limit=128M" -d "extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/" -d "extension=leveldb.so" -d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -d "mbstring.func_overload=0" -f "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/009-comparator.php" 2>&1


And this one:

==21579== Memcheck, a memory error detector ==21579== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==21579== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==21579== Command: /usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/ -d extension=leveldb.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php ==21579==

Warning: LevelDB::__construct(): Invalid compression type in /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php on line 8

Fatal error: Uncaught exception 'LevelDBException' with message 'Invalid argument: php_leveldb.custom_comparator does not match existing comparator : leveldb.BytewiseComparator' in /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php:8 Stack trace:

0 /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php(8): LevelDB->__construct('/home/xxx/p...', Array)

1 {main}

thrown in /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/010-compression.php on line 8 ==21579== ==21579== HEAP SUMMARY: ==21579== in use at exit: 6,192 bytes in 34 blocks ==21579== total heap usage: 24,607 allocs, 24,573 frees, 4,028,262 bytes allocated ==21579== ==21579== LEAK SUMMARY: ==21579== definitely lost: 608 bytes in 4 blocks ==21579== indirectly lost: 984 bytes in 7 blocks ==21579== possibly lost: 3,991 bytes in 17 blocks ==21579== still reachable: 609 bytes in 6 blocks ==21579== suppressed: 0 bytes in 0 blocks ==21579== Rerun with --leak-check=full to see details of leaked memory ==21579== ==21579== For counts of detected and suppressed errors, rerun with: -v ==21579== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)


And this one: ==21662== Memcheck, a memory error detector ==21662== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==21662== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==21662== Command: /usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/ -d extension=leveldb.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/016-different-iterators-should-differ.php ==21662== ==21662== Invalid read of size 8 ==21662== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21662== by 0x7615AD: execute (zend_vm_execute.h:107) ==21662== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21662== by 0x6E7577: php_execute_script (main.c:2316) ==21662== by 0x7C3A6B: main (php_cli.c:1189) ==21662== Address 0x3d0 is not stack'd, malloc'd or (recently) free'd ==21662== ==21662== ==21662== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==21662== Access not within mapped region at address 0x3D0 ==21662== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21662== by 0x7615AD: execute (zend_vm_execute.h:107) ==21662== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21662== by 0x6E7577: php_execute_script (main.c:2316) ==21662== by 0x7C3A6B: main (php_cli.c:1189) ==21662== If you believe this happened as a result of a stack ==21662== overflow in your program's main thread (unlikely but ==21662== possible), you can try to increase the size of the ==21662== main thread stack using the --main-stacksize= flag. ==21662== The main thread stack size used in this run was 8388608. ==21662== ==21662== HEAP SUMMARY: ==21662== in use at exit: 3,172,283 bytes in 19,925 blocks ==21662== total heap usage: 24,877 allocs, 4,952 frees, 3,884,297 bytes allocated ==21662== ==21662== LEAK SUMMARY: ==21662== definitely lost: 0 bytes in 0 blocks ==21662== indirectly lost: 0 bytes in 0 blocks ==21662== possibly lost: 273,615 bytes in 6,276 blocks ==21662== still reachable: 2,898,668 bytes in 13,649 blocks ==21662== suppressed: 0 bytes in 0 blocks ==21662== Rerun with --leak-check=full to see details of leaked memory ==21662== ==21662== For counts of detected and suppressed errors, rerun with: -v ==21662== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4) ./016-different-iterators-should-differ.sh: line 3: 21662 Killed valgrind /usr/local/bin/php -n -c '/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=32767" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "ignore_repeated_errors=0" -d "precision=14" -d "memory_limit=128M" -d "extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/" -d "extension=leveldb.so" -d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -d "mbstring.func_overload=0" -f "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/016-different-iterators-should-differ.php" 2>&1


And last one: ==21700== Memcheck, a memory error detector ==21700== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==21700== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==21700== Command: /usr/local/bin/php -n -c /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/ -d extension=leveldb.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/018-snapshot.php ==21700== string(69) "Invalid snapshot parameter, it must be an instance of LevelDBSnapshot" ==21700== Invalid read of size 8 ==21700== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21700== by 0x7615AD: execute (zend_vm_execute.h:107) ==21700== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21700== by 0x6E7577: php_execute_script (main.c:2316) ==21700== by 0x7C3A6B: main (php_cli.c:1189) ==21700== Address 0x3d0 is not stack'd, malloc'd or (recently) free'd ==21700== ==21700== ==21700== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==21700== Access not within mapped region at address 0x3D0 ==21700== at 0x765807: ZEND_FE_FETCH_SPEC_VAR_HANDLER (zend_vm_execute.h:9053) ==21700== by 0x7615AD: execute (zend_vm_execute.h:107) ==21700== by 0x73A9C8: zend_execute_scripts (zend.c:1259) ==21700== by 0x6E7577: php_execute_script (main.c:2316) ==21700== by 0x7C3A6B: main (php_cli.c:1189) ==21700== If you believe this happened as a result of a stack ==21700== overflow in your program's main thread (unlikely but ==21700== possible), you can try to increase the size of the ==21700== main thread stack using the --main-stacksize= flag. ==21700== The main thread stack size used in this run was 8388608. ==21700== ==21700== HEAP SUMMARY: ==21700== in use at exit: 3,178,058 bytes in 19,998 blocks ==21700== total heap usage: 25,011 allocs, 5,013 frees, 3,891,179 bytes allocated ==21700== ==21700== LEAK SUMMARY: ==21700== definitely lost: 0 bytes in 0 blocks ==21700== indirectly lost: 0 bytes in 0 blocks ==21700== possibly lost: 271,459 bytes in 6,283 blocks ==21700== still reachable: 2,906,599 bytes in 13,715 blocks ==21700== suppressed: 0 bytes in 0 blocks ==21700== Rerun with --leak-check=full to see details of leaked memory ==21700== ==21700== For counts of detected and suppressed errors, rerun with: -v ==21700== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4) ./018-snapshot.sh: line 3: 21700 Killed valgrind /usr/local/bin/php -n -c '/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tmp-php.ini' -d "output_handler=" -d "open_basedir=" -d "safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d "error_reporting=32767" -d "display_errors=1" -d "display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d "track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d "docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d "error_append_string=" -d "auto_prepend_file=" -d "auto_append_file=" -d "magic_quotes_runtime=0" -d "ignore_repeated_errors=0" -d "precision=14" -d "memory_limit=128M" -d "extension_dir=/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/modules/" -d "extension=leveldb.so" -d "session.auto_start=0" -d "tidy.clean_output=0" -d "zlib.output_compression=Off" -d "mbstring.func_overload=0" -f "/home/xxx/public_html/xxx/leveldb/leveldb-1.7.0/php-leveldb/tests/018-snapshot.php" 2>&1

reeze commented 11 years ago

The log tells the same as gdb backtrace, it crash at PHP core code, I'm installing CentOS, hope I could reproduce it

reeze commented 11 years ago

I installed CentOS5.9(I could't find 5.8) I build php myself. But I couldn't reproduce the crash.

could you please try: build a new PHP from source coude from php.net and use the php to test again.

Which repo do you install the php from?

cardine commented 11 years ago

PHP was built from the binaries that come with and are supported by cPanel. I can rebuild from one of those by running:

/scripts/easyapache --build

Would this be ok?

reeze commented 11 years ago

Hm. I didn't have similar environment, since I can not reproduce it, It's not easy to debug.

could you please try lastest version of PHP 5.3.22, if possible could you try 5.4 too? since the crash is PHP related and I couldn't find which code could cause the PHP crash.

cardine commented 11 years ago

I have upgraded to PHP 5.4.2.2 using EasyApache

Now here is what happens when I run make test after re-installing everything:

FAILED TEST SUMMARY

leveldb - iterate thought db by foreach [tests/006-iterator-foreach.phpt] leveldb - different iterators should not affect each other [tests/016-different-iterators-should-differ.phpt]

leveldb - snapshot [tests/018-snapshot.phpt]

Let me know what I need to do to assist you in debugging so that LevelDB will work.

reeze commented 11 years ago

Sorry it's been so long to update the issue. I just fixed issues related to iterator because of wrong data type, it caused stack error. so could please try the master branch?