facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.
http://myrocks.io
Other
2.5k stars 714 forks source link

handle_fatal_signal (sig=11) in rocksdb::TableCache::FindTable when using rocksdb-table-cache-numshardbits=254 #133

Open RoelVdP opened 8 years ago

RoelVdP commented 8 years ago
2016-01-04 11:01:15 29980 [Note] /sda/FB-02.01.16-mysql-5.6.24-linux-x86_64/bin/mysqld: ready for connections.
Version: '5.6.24-debug'  socket: '/sda/FB-02.01.16-mysql-5.6.24-linux-x86_64/socket.sock'  port: 10529  MySQL Community Server (GPL)
2016-01-04 11:01:25 29980 [Note] RocksDB: Begin filtering dropped index (0,256)
00:01:25 UTC - mysqld got signal 11 ;

+bt
#0  0x00007f05440c0741 in __pthread_kill (threadid=, signo=11) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000000e3d22e in my_write_core (sig=11) at /git/FB-mysql-5.6/mysys/stacktrace.c:422
#2  0x0000000000ab6060 in handle_fatal_signal (sig=11) at /git/FB-mysql-5.6/sql/signal_handler.cc:239
#3  signal handler called
#4  0x0000000000f5051d in rocksdb::TableCache::FindTable (this=0x7f053fcdb1e0, env_options=..., internal_comparator=..., fd=..., handle=0x7f053b3fc2c0, no_io=false, record_read_stats=true, file_read_hist=0x7f053ff48000) at /git/FB-mysql-5.6/rocksdb/db/table_cache.cc:127
#5  0x0000000000f50a13 in rocksdb::TableCache::NewIterator (this=0x7f053fcdb1e0, options=..., env_options=..., icomparator=..., fd=..., table_reader_ptr=0x0, file_read_hist=0x7f053ff48000, for_compaction=false, arena=0x0) at /git/FB-mysql-5.6/rocksdb/db/table_cache.cc:182
#6  0x000000000106353c in rocksdb::BuildTable (dbname="./.rocksdb", env=0x1fd2140 , ioptions=..., env_options=..., table_cache=0x7f053fcdb1e0, iter=0x7f053b3fca88, meta=0x7f053b3fd560, internal_comparator=..., int_tbl_prop_collector_factories=0x7f053fd0d440, column_family_id=0, snapshots=std::vector of length 0, capacity 0, earliest_write_conflict_snapshot=72057594037927935, compression=rocksdb::kNoCompression, compression_opts=..., paranoid_file_checks=false, internal_stats=0x7f053fce1e00, io_priority=rocksdb::Env::IO_HIGH, table_properties=0x7f053b3fd8a8) at /git/FB-mysql-5.6/rocksdb/db/builder.cc:152
#7  0x0000000000f2b5c2 in rocksdb::FlushJob::WriteLevel0Table (this=0x7f053b3fd810, mems=..., edit=0x7f053fc37150, meta=0x7f053b3fd560) at /git/FB-mysql-5.6/rocksdb/db/flush_job.cc:236
#8  0x0000000000f2a93f in rocksdb::FlushJob::Run (this=0x7f053b3fd810, file_meta=0x7f053b3fd790) at /git/FB-mysql-5.6/rocksdb/db/flush_job.cc:147
#9  0x0000000000ecaf3f in rocksdb::DBImpl::FlushMemTableToOutputFile (this=0x7f053fd39000, cfd=0x7f053fd0d400, mutable_cf_options=..., made_progress=0x7f053b3feabf, job_context=0x7f053b3fdff0, log_buffer=0x7f053b3fe1b0) at /git/FB-mysql-5.6/rocksdb/db/db_impl.cc:1478
#10 0x0000000000ed0c04 in rocksdb::DBImpl::BackgroundFlush (this=0x7f053fd39000, made_progress=0x7f053b3feabf, job_context=0x7f053b3fdff0, log_buffer=0x7f053b3fe1b0) at /git/FB-mysql-5.6/rocksdb/db/db_impl.cc:2577
#11 0x0000000000ed0ddf in rocksdb::DBImpl::BackgroundCallFlush (this=0x7f053fd39000) at /git/FB-mysql-5.6/rocksdb/db/db_impl.cc:2599
#12 0x0000000000ed071e in rocksdb::DBImpl::BGWorkFlush (db=0x7f053fd39000) at /git/FB-mysql-5.6/rocksdb/db/db_impl.cc:2515
#13 0x0000000000fee7d7 in rocksdb::ThreadPool::BGThread (this=0x7f053fc532a0, thread_id=0) at /git/FB-mysql-5.6/rocksdb/util/thread_posix.cc:119
#14 0x0000000000fee854 in rocksdb::BGThreadWrapper (arg=0x7f053c86f040) at /git/FB-mysql-5.6/rocksdb/util/thread_posix.cc:143
#15 0x00007f05440bbdc5 in start_thread (arg=0x7f053b3ff700) at pthread_create.c:308
#16 0x00007f054210e21d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Testcase (note especially the required --rocksdb-table-cache-numshardbits=254)
# --no-defaults --default-tmp-storage-engine=MyISAM --rocksdb --skip-innodb --skip-innodb-buffer-page --default-storage-engine=RocksDB --default-storage-engine=RocksDB --rocksdb-table-cache-numshardbits=254
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, d DATETIME) ENGINE=RocksDB; 
INSERT INTO t1 VALUES (1,1),(2,1),(3,2),(4,2),(5,3),(6,3);
DROP TABLE t1;
SELECT 1;  # Shows server is gone
yoshinorim commented 8 years ago

Thanks! I got a different stack trace but could reproduce the segfault.

RoelVdP commented 8 years ago

@yoshinorim thanks! Would be interesting to see the stack trace. Thanks

rven1 commented 8 years ago

I got the same stacktrace as Roel. Will investigate.