facebook / facebook/rocksdb

Dynamically reduce max_background_compactions crashes

Open
#11,971 2 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

### Expected behavior

Update `max_background_compactions` by `db->SetDBOptions()` should always OK.

### Actual behavior

Reduce `max_background_compactions` crashes the process randomly.

```
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
/usr/local/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x237604e]
/usr/local/bin/mysqld(print_fatal_signal(int)+0x2c7) [0x1207587]
/usr/local/bin/mysqld(handle_fatal_signal+0x95) [0x1207625]
/lib64/libpthread.so.0(+0x141d0) [0x7f8766e401d0]
/lib64/libc.so.6(gsignal+0x145) [0x7f8764c78005]
/lib64/libc.so.6(abort+0x116) [0x7f8764c4a894]
/lib64/libstdc++.so.6(+0xa2c19) [0x7f8764ea2c19]
/lib64/libstdc++.so.6(+0xae2fa) [0x7f8764eae2fa]
/lib64/libstdc++.so.6(+0xae365) [0x7f8764eae365]
/lib64/libstdc++.so.6(+0xae5b8) [0x7f8764eae5b8]
/lib64/libstdc++.so.6(std::__throw_system_error(int)+0x85) [0x7f8764ea58ec]
/lib64/libstdc++.so.6(+0xda015) [0x7f8764eda015]
/usr/local/lib/librocksdb.so.8.4(rocksdb::ThreadPoolImpl::Impl::StartBGThreads()+0xd4) [0x7f8766631134]
/usr/local/lib/librocksdb.so.8.4(rocksdb::ThreadPoolImpl::Impl::Submit(std::function&&, std::function&&, void*)+0x70) [0x7f8766631710]
/usr/local/lib/librocksdb.so.8.4(rocksdb::ThreadPoolImpl::Schedule(void (*)(void*), void*, void*, void (*)(void*))+0xcc) [0x7f8766631c2c]
/usr/local/lib/librocksdb.so.8.4(rocksdb::DBImpl::MaybeScheduleFlushOrCompaction()+0x4cb) [0x7f87662811fb]
/usr/local/lib/librocksdb.so.8.4(rocksdb::DBImpl::BackgroundCallCompaction(rocksdb::DBImpl::PrepickedCompaction*, rocksdb::Env::Priority)+0x57b) [0x7f876629aa2b]
/usr/local/lib/librocksdb.so.8.4(rocksdb::DBImpl::BGWorkCompaction(void*)+0x45) [0x7f876629b065]
/usr/local/lib/librocksdb.so.8.4(rocksdb::ThreadPoolImpl::Impl::BGThread(unsigned long)+0x288) [0x7f8766630d18]
/usr/local/lib/librocksdb.so.8.4(rocksdb::ThreadPoolImpl::Impl::BGThreadWrapper(void*)+0x53) [0x7f8766630f13]
/usr/local/lib/libstdc++.so.6(+0xd9cf3) [0x7f8764ed9cf3]
```

### Steps to reproduce the behavior
In MyRocks, Reduce `max_background_compactions` crashes mysqld randomly, especially on heavy write load.

```
set global rocksdb_max_background_compactions = 128;

wait for some time ...

set global rocksdb_max_background_compactions = 64;
```

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.