• M
    Exit and Join the background compaction threads while running rocksdb tests · 6594fef7
    Mayank Agarwal 提交于
    Summary:
    The background compaction threads are never exitted and therefore caused
    memory-leaks while running rpcksdb tests. Have changed the PosixEnv destructor to exit and join them and changed the tests likewise
    The memory leaked has reduced from 320 bytes to 64 bytes in all the tests. The 64
    bytes is relating to
    pthread_exit, but still have to figure out why. The stack-trace right now with
    table_test.cc = 64 bytes in 1 blocks are possibly lost in loss record 4 of 5
       at 0x475D8C: malloc (jemalloc.c:914)
       by 0x400D69E: _dl_map_object_deps (dl-deps.c:505)
       by 0x4013393: dl_open_worker (dl-open.c:263)
       by 0x400F015: _dl_catch_error (dl-error.c:178)
       by 0x4013B2B: _dl_open (dl-open.c:569)
       by 0x5D3E913: do_dlopen (dl-libc.c:86)
       by 0x400F015: _dl_catch_error (dl-error.c:178)
       by 0x5D3E9D6: __libc_dlopen_mode (dl-libc.c:47)
       by 0x5048BF3: pthread_cancel_init (unwind-forcedunwind.c:53)
       by 0x5048DC9: _Unwind_ForcedUnwind (unwind-forcedunwind.c:126)
       by 0x5046D9F: __pthread_unwind (unwind.c:130)
       by 0x50413A4: pthread_exit (pthreadP.h:289)
    
    Test Plan: make all check
    
    Reviewers: dhruba, sheki, haobo
    
    Reviewed By: dhruba
    
    CC: leveldb, chip
    
    Differential Revision: https://reviews.facebook.net/D9573
    6594fef7
env_posix.cc 29.1 KB