Skip to content

Commit

Permalink
Testing the ASAN failure
Browse files Browse the repository at this point in the history
Summary:
I saw this intermittent ASAN failure
==662590== ERROR: AddressSanitizer: SEGV on unknown address 0x000000000098 (pc 0x00000112fc64 sp 0x7f0324c71710 bp 0x7f0324c71760 T21)
AddressSanitizer can not provide additional info.
    #0 0x112fc63 in my_pthread_fastmutex_lock /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/mysys/thr_mutex.c:479
    #1 0x18fb4b0 in _ZN23Dropped_indices_manager14remove_indicesERKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEP12Dict_manager /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/include/mysql/psi/mysql_thread.h:688
    #2 0x18b031a in _Z17drop_index_threadPv /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/storage/rocksdb/ha_rocksdb.cc:4927
    #3 0x7f0337d611e8 in _ZN6__asan10AsanThread11ThreadStartEv ??:0
    #4 0x7f03376dbfa7 in start_thread ??:0
    #5 0x7f0335a5f5bc in __clone ??:0
Thread T21 created by T0 here:
    #0 0x7f0337d5121b in pthread_create ??:0
    #1 0x18aec6a in _ZL17rocksdb_init_funcPv /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/storage/rocksdb/ha_rocksdb.cc:1765
    #2 0x60a039 in _Z24ha_initialize_handlertonP13st_plugin_int /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/sql/handler.cc:673
    #3 0xab04e0 in _ZL17plugin_initializeP13st_plugin_int /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/sql/sql_plugin.cc:1137
    #4 0xac8fe3 in _Z11plugin_initPiPPci /data/users/jenkins/workspace/myrocks-prod/BUILD_TYPE/ASan/CLIENT_MODE/Sync/PAGE_SIZE/32/TEST_SET/MixedOther/label/mysql/mysql/sql/sql_plugin.cc:1431
    #5 0x5ef74c in _ZL22init_server_componentsv .cc:5482
    #6 0x5f0cce in _Z11mysqld_mainiPPc .cc:6254
    #7 0x7f033597defe in __libc_start_main ??:0
    #8 0x5d86a8 in _start /home/engshare/third-party2/glibc/2.17/src/glibc-2.17/csu/../sysdeps/x86_64/start.S:123
==662590== ABORTING
It looks like the Dropped_indices_manager mutex is accessed by the thread after the mutex was cleaned up. I'm moving the cleanup of the manager to the thread in hopes that this will fix the failure.

Test Plan: ran rocksdb suite, nothing failed

Reviewers: hermanlee4

Reviewed By: hermanlee4

Differential Revision: https://reviews.facebook.net/D42909
  • Loading branch information
maykov authored and Herman Lee committed Sep 11, 2015
1 parent 7cb6ad8 commit b7f2a03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/rocksdb/rdb_dropped_indices.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void Dropped_indices_manager::add_indices(RDBSE_KEYDEF** key_descr,
map_insert(key_descr, n_keys, "Begin");

RDBSE_TABLE_DEF* old_tbl = ddl_manager->find(
(uchar*)DROP_INDEX_TABLE_NAME, strlen(DROP_INDEX_TABLE_NAME), false);
(uchar*)DROP_INDEX_TABLE_NAME, strlen(DROP_INDEX_TABLE_NAME), true);
DBUG_ASSERT(old_tbl != nullptr);
mysql_mutex_lock(&old_tbl->mutex);
RDBSE_TABLE_DEF* tbl = new RDBSE_TABLE_DEF;
Expand Down Expand Up @@ -179,7 +179,7 @@ void Dropped_indices_manager::remove_indices(
rocksdb::WriteBatch *batch= wb.get();

RDBSE_TABLE_DEF* old_tbl = ddl_manager->find(
(uchar*)DROP_INDEX_TABLE_NAME, strlen(DROP_INDEX_TABLE_NAME), false);
(uchar*)DROP_INDEX_TABLE_NAME, strlen(DROP_INDEX_TABLE_NAME), true);
DBUG_ASSERT(old_tbl != nullptr);
mysql_mutex_lock(&old_tbl->mutex);

Expand Down

0 comments on commit b7f2a03

Please sign in to comment.