You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit test sometimes failed because of "pure virtual method called" recently, such as in this ci check.
As recommended by @xxuejie , I try to reproduce it using rr.
Find out the test binary file like /home/ian/codebase/nervos/ckb/target/debug/deps/ckb_sync-60892a517e6c0f11
Run it and record using rr in a loop until the error occurs.
while rr record /home/ian/codebase/nervos/ckb/target/debug/deps/ckb_sync-60892a517e6c0f11; do
sleep 1
done
Remember the last test case before the test quits. Now replay it in the debugger.
rr replay --debugger rust-gdb
gdb> break ckb_sync::synchronizer::tests::test_process_new_block
gdb> run
gdb> next
After several next, the error occurs again, then check the backtrace (attached below).
From the backtrace, we can see that the root cause is RocksDB. The test quits without closing the database first, as mentioned in the comment facebook/rocksdb#649 (comment) . The database is opened by TestNode. The test node does not exit gracefully, which leads to the error.
Environment
Describe the bug
Unit test sometimes failed because of "pure virtual method called" recently, such as in this ci check.
As recommended by @xxuejie , I try to reproduce it using rr.
Find out the test binary file like /home/ian/codebase/nervos/ckb/target/debug/deps/ckb_sync-60892a517e6c0f11
Run it and record using rr in a loop until the error occurs.
Remember the last test case before the test quits. Now replay it in the debugger.
After several
next
, the error occurs again, then check the backtrace (attached below).From the backtrace, we can see that the root cause is RocksDB. The test quits without closing the database first, as mentioned in the comment facebook/rocksdb#649 (comment) . The database is opened by
TestNode
. The test node does not exit gracefully, which leads to the error.Attachments
The text was updated successfully, but these errors were encountered: