Open GoogleCodeExporter opened 9 years ago
i have a multi-threaded app which seems to be exhibiting the same sort of
"freeing unallocated pointer" problem from inside leveldb. my stack is:
pddb(80102,0x100481000) malloc: *** error for object 0x10000100c: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Process 80102 stopped
* thread #2: tid = 0x7e1911, 0x00007fff90294866
libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
frame #0: 0x00007fff90294866 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill + 10:
-> 0x7fff90294866: jae 0x7fff90294870 ; __pthread_kill + 20
0x7fff90294868: movq %rax, %rdi
0x7fff9029486b: jmpq 0x7fff90291175 ; cerror_nocancel
0x7fff90294870: ret
(lldb) bt
* thread #2: tid = 0x7e1911, 0x00007fff90294866
libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
* frame #0: 0x00007fff90294866 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff869df35c libsystem_pthread.dylib`pthread_kill + 92
frame #2: 0x00007fff8ad0fb1a libsystem_c.dylib`abort + 125
frame #3: 0x00007fff8ec0407f libsystem_malloc.dylib`free + 411
frame #4: 0x0000000100024051 libleveldb.1.15.dylib`leveldb::DeleteCachedBlock(leveldb::Slice const&, void*) + 23
frame #5: 0x000000010002695f libleveldb.1.15.dylib`leveldb::(anonymous namespace)::LRUCache::Unref(leveldb::(anonymous namespace)::LRUHandle*) + 75
frame #6: 0x00000001000266a5 libleveldb.1.15.dylib`leveldb::(anonymous namespace)::ShardedLRUCache::Insert(leveldb::Slice const&, void*, unsigned long, void (*)(leveldb::Slice const&, void*)) + 523
frame #7: 0x0000000100023f62 libleveldb.1.15.dylib`leveldb::Table::BlockReader(void*, leveldb::ReadOptions const&, leveldb::Slice const&) + 588
frame #8: 0x0000000100024208 libleveldb.1.15.dylib`leveldb::Table::InternalGet(leveldb::ReadOptions const&, leveldb::Slice const&, void*, void (*)(void*, leveldb::Slice const&, leveldb::Slice const&)) + 274
frame #9: 0x0000000100018c51 libleveldb.1.15.dylib`leveldb::TableCache::Get(leveldb::ReadOptions const&, unsigned long long, unsigned long long, leveldb::Slice const&, void*, void (*)(void*, leveldb::Slice const&, leveldb::Slice const&)) + 109
frame #10: 0x000000010001ab6d libleveldb.1.15.dylib`leveldb::Version::Get(leveldb::ReadOptions const&, leveldb::LookupKey const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, leveldb::Version::GetStats*) + 931
frame #11: 0x000000010000f155 libleveldb.1.15.dylib`leveldb::DBImpl::Get(leveldb::ReadOptions const&, leveldb::Slice const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) + 337
frame #12: 0x0000000100009dc0 libleveldb.1.15.dylib`leveldb_get + 72
frame #13: 0x0000000100001732 pddb`pddb_worker(arg=0x00000001000033b0) + 130 at pddb.c:761
frame #14: 0x00007fff869de899 libsystem_pthread.dylib`_pthread_body + 138
frame #15: 0x00007fff869de72a libsystem_pthread.dylib`_pthread_start + 137
im running leveldb-1.15 which seems to be "current". any ideas? (this seems
to work fine under linux, but when running on mac osx, it crashes in like 2
min.)
Original comment by circl...@gmail.com
on 20 Apr 2014 at 4:10
Original issue reported on code.google.com by
edd...@gmail.com
on 23 Jul 2013 at 8:11