Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start server with --rocksdb-table-cache-numshardbits=100000000 segfaults #739

Open
george-lorch opened this issue Oct 18, 2017 · 1 comment

Comments

@george-lorch
Copy link

#0 0x00000000014b185c in rocksdb::VersionSet::Recover (this=0x7ffff5640a00, column_families=std::vector of length 2, capacity 2 = {...}, read_only=false)
at /ssd/percona/myrocks/facebook-mysql-5.6/rocksdb/db/version_set.cc:2970
#1 0x0000000001417ee9 in rocksdb::DBImpl::Recover (this=0x7ffff5789c00, column_families=std::vector of length 2, capacity 2 = {...}, read_only=false, error_if_log_file_exist=false, error_if_data_exists_in_logs=false)
at /ssd/percona/myrocks/facebook-mysql-5.6/rocksdb/db/db_impl_open.cc:350
#2 0x000000000141b7e1 in rocksdb::DB::Open (db_options=..., dbname="./.rocksdb", column_families=std::vector of length 2, capacity 2 = {...}, handles=0x7fffffffc980, dbptr=0x7fffffffc528)
at /ssd/percona/myrocks/facebook-mysql-5.6/rocksdb/db/db_impl_open.cc:996
#3 0x000000000164e549 in rocksdb::TransactionDB::Open (db_options=..., txn_db_options=..., dbname="./.rocksdb", column_families=std::vector of length 2, capacity 2 = {...}, handles=0x7fffffffc980,
dbptr=0x27ecee0 myrocks::rdb) at /ssd/percona/myrocks/facebook-mysql-5.6/rocksdb/utilities/transactions/pessimistic_transaction_db.cc:228
#4 0x00000000012d2dc2 in myrocks::rocksdb_init_func (p=0x7ffff54bac00) at /ssd/percona/myrocks/facebook-mysql-5.6/storage/rocksdb/ha_rocksdb.cc:4209
#5 0x0000000000d6f774 in ha_initialize_handlerton (plugin=0x7fffd23fbf48) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/handler.cc:655
#6 0x0000000000f68016 in plugin_initialize (plugin=0x7fffd23fbf48) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_plugin.cc:1163
#7 0x0000000000f68aa1 in plugin_init (argc=0x27b47b0 <remaining_argc>, argv=0x7ffff55dec60, flags=0) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/sql_plugin.cc:1465
#8 0x0000000000d44088 in init_server_components () at /ssd/percona/myrocks/facebook-mysql-5.6/sql/mysqld.cc:5853
#9 0x0000000000d47266 in mysqld_main (argc=18, argv=0x7ffff55dec60) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/mysqld.cc:7198
#10 0x0000000000d3902d in main (argc=5, argv=0x7fffffffd8f8) at /ssd/percona/myrocks/facebook-mysql-5.6/sql/main.cc:25

This seems like another 'rational defaults and limits' kind of thing where the option should probably have some rational ceiling.

@george-lorch
Copy link
Author

george-lorch commented Nov 1, 2017

Besides this being a 'rational limit' issue, it also looks like there may be a problem down in rocksdb. It looks like there is a check in LRUCache that limits it to 19 bits, anything greater fails to create a cache and returns a nullptr. This nullptr is passed without validation into the constructor of VersionSet within the DBImpl constructor, and eventually makes its way to the constructor for ColumnFamilySet and gets placed in the table_cache_ member of ColumFamilySet, which seems to assume everywhere that it is a valid instance when it is not. So I think that there needs to be some validation somewhere along this path, maybe in the DBImpl constructor that checks this and fails in some manner consistent with rocksdb internals rather than a SEGFAULT long after the fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant