首页 > 解决方案 > Valgrind 报告 RocksDB 中的内存泄漏

问题描述

我正在尝试在 Mac 上使用 Callgrind / KCacheGrind 来分析 RocksDB 的性能。我正在valgrind --tool=callgrind ./simple_example示例文件夹中 RocksDB 附带的示例程序之一上运行该命令。不过,我似乎遇到了内存泄漏,这使我无法进行我最终想要做的性能分析。

==54628== Callgrind, a call-graph generating cache profiler
==54628== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
==54628== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==54628== Command: ./simple_example
==54628== 
==54628== For interactive control, run 'callgrind_control -h'.
==54628== 
==54628== Process terminating with default action of signal 11 (SIGSEGV)
==54628==  Access not within mapped region at address 0x18
==54628==    at 0x1016D25BA: _pthread_body (in /usr/lib/system/libsystem_pthread.dylib)
==54628==    by 0x1016D250C: _pthread_start (in /usr/lib/system/libsystem_pthread.dylib)
==54628==    by 0x1016D1BF8: thread_start (in /usr/lib/system/libsystem_pthread.dylib)
==54628==  If you believe this happened as a result of a stack
==54628==  overflow in your program's main thread (unlikely but
==54628==  possible), you can try to increase the size of the
==54628==  main thread stack using the --main-stacksize= flag.
==54628==  The main thread stack size used in this run was 8388608.
--54628:0:schedule VG_(sema_down): read returned -4
==54628== 
==54628== Events    : Ir
==54628== Collected : 14961779
==54628== 
==54628== I   refs:      14,961,779
Segmentation fault: 11

标签: profilingvalgrindrocksdb

解决方案


推荐阅读