Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created unit test for #325 #326

Merged
merged 1 commit into from
Jul 13, 2017
Merged

Conversation

pmconrad
Copy link
Contributor

This test, without BM's fix, reproduces the crash from 2017-07-10.

@oxarbitrage oxarbitrage merged commit 6f7fb42 into bitshares:develop Jul 13, 2017
@oxarbitrage
Copy link
Member

oxarbitrage commented Jul 13, 2017

Hi Peter, i tested your test unit and it is working as expected.

for the record here is some output. i created 2 installations folders, one with bytemaster patch and the other without it. test unit of this pull request added to both versions.

running test in the version with patch:

root@NC-PH-1346-07:~/bitshares/pull326/1/bitshares-core/tests# ./chain_test -t database_tests
Random number generator seeded to 1499943969
GRAPHENE_TESTING_GENESIS_TIMESTAMP is 1431700000
Running 2 test cases...
369177ms th_a       object_database.cpp:94        open                 ] Opening object database from /tmp/graphene-tmp/fb09-7134-be6d-dd2e ...
369177ms th_a       object_database.cpp:100       open                 ] Done opening object database.
369179ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Ass
ert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"201
7-07-13T11:06:09"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","hostname":"","
thread_name":"th_a","timestamp":"2017-07-13T11:06:09"},"format":"","data":{}}]}
369198ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":3070001,"name":"pop_empty_chain","message":
"there are no blocks to pop","stack":[{"context":{"level":"error","file":"db_block.cpp","line":423,"method":"pop_block","hostname":"","thread_name":"th_a","times
tamp":"2017-07-13T11:06:09"},"format":"there are no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","h
ostname":"","thread_name":"th_a","timestamp":"2017-07-13T11:06:09"},"format":"","data":{}}]}
369214ms th_a       object_database.cpp:94        open                 ] Opening object database from /tmp/graphene-tmp/b861-0359-0fa6-a0e8 ...
369214ms th_a       object_database.cpp:100       open                 ] Done opening object database.
369218ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Ass
ert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"201
7-07-13T11:06:09"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","hostname":"","
thread_name":"th_a","timestamp":"2017-07-13T11:06:09"},"format":"","data":{}}]}
369252ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":3070001,"name":"pop_empty_chain","message":
"there are no blocks to pop","stack":[{"context":{"level":"error","file":"db_block.cpp","line":423,"method":"pop_block","hostname":"","thread_name":"th_a","times
tamp":"2017-07-13T11:06:09"},"format":"there are no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","h
ostname":"","thread_name":"th_a","timestamp":"2017-07-13T11:06:09"},"format":"","data":{}}]}

*** No errors detected
root@NC-PH-1346-07:~/bitshares/pull326/1/bitshares-core/tests#

test output in the version without patch:

root@NC-PH-1346-07:~/bitshares/pull326/2/bitshares-core/tests# ./chain_test -t database_tests
Random number generator seeded to 1499944254
GRAPHENE_TESTING_GENESIS_TIMESTAMP is 1431700000
Running 2 test cases...

654697ms th_a       object_database.cpp:94        open                 ] Opening object database from /tmp/graphene-tmp/ade1-a78c-cd06-cc7f ...
654697ms th_a       object_database.cpp:100       open                 ] Done opening object database.
654699ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Ass
ert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"201
7-07-13T11:10:54"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","hostname":"","
thread_name":"th_a","timestamp":"2017-07-13T11:10:54"},"format":"","data":{}}]}
654717ms th_a       db_management.cpp:170         close                ] Database close unexpected exception: {"code":3070001,"name":"pop_empty_chain","message":
"there are no blocks to pop","stack":[{"context":{"level":"error","file":"db_block.cpp","line":423,"method":"pop_block","hostname":"","thread_name":"th_a","times
tamp":"2017-07-13T11:10:54"},"format":"there are no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":431,"method":"pop_block","h
ostname":"","thread_name":"th_a","timestamp":"2017-07-13T11:10:54"},"format":"","data":{}}]}
654733ms th_a       object_database.cpp:94        open                 ] Opening object database from /tmp/graphene-tmp/97fb-c05c-0a85-1f91 ...
654733ms th_a       object_database.cpp:100       open                 ] Done opening object database.
unknown location(0): fatal error in "flat_index_test": memory access violation at address: 0x00000008: no mapping at fault address
/root/bitshares/pull326/2/bitshares-core/tests/common/database_fixture.cpp(214): last checkpoint

*** 1 failure detected in test suite "Master Test Suite"
root@NC-PH-1346-07:~/bitshares/pull326/2/bitshares-core/tests# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants