facebook / facebook/rocksdb

Crash in db_bench if using custom environments and fillseqdeterministic

Open
#6,986 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

If using a custom environment in db_bench, the program may crash on exit. The problem is caused if we have an open environment *and* a database at exit. In this case, the environment is destroyed (via the std::shared_ptr env_guard) prior to the database being destroyed. The database may have some background jobs still running (for things like compaction) that dereference the environment that was just deleted.

To reproduce this, I was running db_bench against an AWS/RocksDB Cloud environment and running with --benchmark=fillseq,fillseqdeterministic.

Note that it does not happen if fillseqdeterministic is executed by itself (since the command exits before opening the database).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.