facebook / facebook/rocksdb

pthread_cond_destroy from ::~ThreadPoolImpl() hung forever

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

Description

We use rocksdb to store user accounts and some other configurations. NSS library is implemented to read user accounts from rocksdb.
When bash command is executed it internally calls NSS and it internally loads rocksdb library.

### Expected behavior
The normal exit of bash commands.

### Actual behavior
Bash commands hung forever and gdb points to

#0 0x00007fd42c60e0d7 in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fd42c2f48dc in rocksdb::ThreadPoolImpl::~ThreadPoolImpl() () from /lib64/librocksdb.so.6.6
#2 0x00007fd42c1eac7c in rocksdb::(anonymous namespace)::PosixEnv::~PosixEnv() () from /lib64/librocksdb.so.6.6
#3 0x00007fd42c6bed1c in __run_exit_handlers () from /lib64/libc.so.6
#4 0x00007fd42c6bee50 in exit () from /lib64/libc.so.6
#5 0x000055979c8078a7 in ?? ()
#6 0x000055979c808bc4 in execute_command_internal ()

Rocksdb logs shows DB is shut down properly.
2020/04/22-05:39:32.177735 7ff1cf143800 [/db_impl.cc:392] Shutdown: canceling all background work

Log files are attached.

2020/04/22-05:39:32.177756 7ff1cf143800 [/db_impl.cc:565] Shutdown complete
[LOG.old.1587533972177824.txt](https://github.com/facebook/rocksdb/files/4514235/LOG.old.1587533972177824.txt)
[LOG.old.1587530222322575.txt](https://github.com/facebook/rocksdb/files/4514239/LOG.old.1587530222322575.txt)

### Steps to reproduce the behavior

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.