At commit b113fc4, one of the tests (see below) is passing most of the times, but failing every now and then. It seems to be always the same test, and always at the same point.
Since it is non-deterministic, it is likely due to an unsafe block code. I'm also considering a wrong ref-counting in TermIndexMapU. The fact that it happens in the default_graph test, and not in any other test involving TermIndexMapU, might indicate that it has to do with the special treatment GraphId::Default has in TermIndexMapU.
Test id: graph::adapter::test::dataset::default_graph::test_retain
Stack trace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
3: std::panicking::default_hook
at src/libstd/panicking.rs:208
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:474
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:381
6: rust_begin_unwind
at src/libstd/panicking.rs:308
7: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
8: core::panicking::panic
at src/libcore/panicking.rs:49
9: core::option::Option<T>::unwrap
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libcore/macros.rs:12
10: <sophia::graph::inmem::_term_index_map_u::TermIndexMapU<T,F> as sophia::term::index_map::TermIndexMap>::dec_ref
at sophia/src/graph/inmem/_term_index_map_u.rs:144
11: <sophia::dataset::inmem::_hash_dataset::HashDataset<I> as sophia::dataset::indexed::IndexedDataset>::remove_indexed
at sophia/src/dataset/inmem/_hash_dataset.rs:158
12: <sophia::dataset::inmem::_hash_dataset::HashDataset<I> as sophia::dataset::_traits::MutableDataset>::remove
at sophia/src/dataset/indexed.rs:102
13: <sophia::dataset::adapter::DatasetGraph<D,E,sophia::term::graph_id::GraphId<F>> as sophia::graph::_traits::MutableGraph>::remove
at sophia/src/dataset/adapter.rs:151
14: <sophia::graph::_sinks::Remover<G> as sophia::triple::stream::TripleSink>::feed
at sophia/src/graph/_sinks.rs:60
15: sophia::triple::stream::TripleSource::in_sink
at sophia/src/triple/stream.rs:55
16: sophia::graph::_traits::MutableGraph::remove_all
at sophia/src/graph/_traits.rs:450
17: sophia::graph::_traits::MutableGraph::retain
at sophia/src/graph/_traits.rs:524
18: sophia::graph::adapter::test::dataset::default_graph::test_retain
at sophia/src/graph/test.rs:261
19: sophia::graph::adapter::test::dataset::default_graph::test_retain::{{closure}}
at sophia/src/graph/test.rs:256
20: core::ops::function::FnOnce::call_once
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libcore/ops/function.rs:231
21: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/liballoc/boxed.rs:704
22: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:85
23: test::run_test::run_test_inner::{{closure}}
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panicking.rs:272
at /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c/src/libstd/panic.rs:394
at src/libtest/lib.rs:1468
At commit b113fc4, one of the tests (see below) is passing most of the times, but failing every now and then. It seems to be always the same test, and always at the same point.
Since it is non-deterministic, it is likely due to an unsafe block code. I'm also considering a wrong ref-counting in
TermIndexMapU
. The fact that it happens in thedefault_graph
test, and not in any other test involvingTermIndexMapU
, might indicate that it has to do with the special treatment GraphId::Default has inTermIndexMapU
.Test id:
graph::adapter::test::dataset::default_graph::test_retain
Stack trace: