Details
Description
I observed a constant crash in bg_flusher from big_compaction_task on mac OS:
Crashed Thread: 5
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000007
VM Regions Near 0x7:
-->
__TEXT 00000001097ae000-000000010981f000 [ 452K] r-x/rwx SM=COW /Users/USER/*
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8fa7748a __semwait_signal + 10
1 big_compaction_test 0x00000001098104e9 multi_writers(char const*) + 1449
2 big_compaction_test 0x00000001098117e5 main + 21
3 libdyld.dylib 0x00007fff86ffb5c9 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff8fa77136 __psynch_cvwait + 10
1 big_compaction_test 0x00000001097c8991 compactor_thread(void*) + 1457
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8fa77136 __psynch_cvwait + 10
1 big_compaction_test 0x00000001097c8991 compactor_thread(void*) + 1457
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8fa77136 __psynch_cvwait + 10
1 big_compaction_test 0x00000001097c8991 compactor_thread(void*) + 1457
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8fa77136 __psynch_cvwait + 10
1 big_compaction_test 0x00000001097c8991 compactor_thread(void*) + 1457
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 5 Crashed:
0 big_compaction_test 0x00000001097b08eb avl_next + 107
1 big_compaction_test 0x00000001097b2449 bgflusher_thread(void*) + 537
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 6:
0 libsystem_kernel.dylib 0x00007fff8fa77166 __psynch_mutexwait + 10
1 big_compaction_test 0x00000001097b2428 bgflusher_thread(void*) + 504
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 7:
0 libsystem_kernel.dylib 0x00007fff8fa77136 __psynch_cvwait + 10
1 big_compaction_test 0x00000001097b2514 bgflusher_thread(void*) + 740
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 8:
0 libsystem_kernel.dylib 0x00007fff8fa77166 __psynch_mutexwait + 10
1 big_compaction_test 0x00000001097b2254 bgflusher_thread(void*) + 36
2 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
3 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
4 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 9:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097f73ed _hbtrie_insert(hbtrie*, void*, int, void*, void*, unsigned char) + 3853
4 big_compaction_test 0x00000001097f4eed hbtrie_insert + 61
5 big_compaction_test 0x00000001097efd82 _fdb_wal_flush_func(void*, wal_item*) + 546
6 big_compaction_test 0x000000010980535d _wal_do_flush(wal_item*, fdb_status (void*, wal_item*), void*) + 61
7 big_compaction_test 0x00000001098036a3 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 1139
8 big_compaction_test 0x000000010980321f wal_flush + 63
9 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
10 big_compaction_test 0x0000000109810ffa _writer_thread(void*) + 1482
11 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
12 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
13 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 10:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097f73ed _hbtrie_insert(hbtrie*, void*, int, void*, void*, unsigned char) + 3853
4 big_compaction_test 0x00000001097f4eed hbtrie_insert + 61
5 big_compaction_test 0x00000001097efffa _fdb_wal_flush_func(void*, wal_item*) + 1178
6 big_compaction_test 0x000000010980535d _wal_do_flush(wal_item*, fdb_status (void*, wal_item*), void*) + 61
7 big_compaction_test 0x00000001098036a3 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 1139
8 big_compaction_test 0x000000010980321f wal_flush + 63
9 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
10 big_compaction_test 0x0000000109810ffa _writer_thread(void*) + 1482
11 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
12 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
13 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 11:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097c72f6 _btreeblk_read(void*, unsigned long long, int) + 918
4 big_compaction_test 0x00000001097c4412 btreeblk_read(void*, unsigned long long) + 34
5 big_compaction_test 0x00000001097b83c2 btree_init_from_bid + 146
6 big_compaction_test 0x00000001097f4af8 _hbtrie_find(hbtrie*, void*, int, void*, list*, unsigned char) + 2184
7 big_compaction_test 0x00000001097f4d65 hbtrie_find_offset + 149
8 big_compaction_test 0x00000001097f05b0 _fdb_wal_get_old_offset(void*, wal_item*) + 80
9 big_compaction_test 0x0000000109803507 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 727
10 big_compaction_test 0x000000010980321f wal_flush + 63
11 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
12 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
13 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
14 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
15 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 12:
0 big_compaction_test 0x00000001097c704a _btreeblk_read(void*, unsigned long long, int) + 234
1 big_compaction_test 0x00000001097c4412 btreeblk_read(void*, unsigned long long) + 34
2 big_compaction_test 0x00000001097b83c2 btree_init_from_bid + 146
3 big_compaction_test 0x00000001097f4af8 _hbtrie_find(hbtrie*, void*, int, void*, list*, unsigned char) + 2184
4 big_compaction_test 0x00000001097f4d65 hbtrie_find_offset + 149
5 big_compaction_test 0x00000001097f05b0 _fdb_wal_get_old_offset(void*, wal_item*) + 80
6 big_compaction_test 0x0000000109803507 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 727
7 big_compaction_test 0x000000010980321f wal_flush + 63
8 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
9 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
10 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
11 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
12 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 13:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097c72f6 _btreeblk_read(void*, unsigned long long, int) + 918
4 big_compaction_test 0x00000001097c4412 btreeblk_read(void*, unsigned long long) + 34
5 big_compaction_test 0x00000001097b83c2 btree_init_from_bid + 146
6 big_compaction_test 0x00000001097f4af8 _hbtrie_find(hbtrie*, void*, int, void*, list*, unsigned char) + 2184
7 big_compaction_test 0x00000001097f4d65 hbtrie_find_offset + 149
8 big_compaction_test 0x00000001097f05b0 _fdb_wal_get_old_offset(void*, wal_item*) + 80
9 big_compaction_test 0x0000000109803507 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 727
10 big_compaction_test 0x000000010980321f wal_flush + 63
11 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
12 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
13 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
14 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
15 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 14:
0 big_compaction_test 0x00000001097c02ba _cmp_binary64(void*, void*, void*) + 682
1 big_compaction_test 0x00000001097b9902 _btree_find_entry(btree*, bnode*, void*) + 418
2 big_compaction_test 0x00000001097b9ebc btree_insert + 956
3 big_compaction_test 0x00000001097f71b3 _hbtrie_insert(hbtrie*, void*, int, void*, void*, unsigned char) + 3283
4 big_compaction_test 0x00000001097f4eed hbtrie_insert + 61
5 big_compaction_test 0x00000001097efffa _fdb_wal_flush_func(void*, wal_item*) + 1178
6 big_compaction_test 0x000000010980535d _wal_do_flush(wal_item*, fdb_status (void*, wal_item*), void*) + 61
7 big_compaction_test 0x00000001098036a3 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 1139
8 big_compaction_test 0x000000010980321f wal_flush + 63
9 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
10 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
11 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
12 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
13 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 15:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097c72f6 _btreeblk_read(void*, unsigned long long, int) + 918
4 big_compaction_test 0x00000001097c4412 btreeblk_read(void*, unsigned long long) + 34
5 big_compaction_test 0x00000001097b9386 btree_find + 342
6 big_compaction_test 0x00000001097f7081 _hbtrie_insert(hbtrie*, void*, int, void*, void*, unsigned char) + 2977
7 big_compaction_test 0x00000001097f4eed hbtrie_insert + 61
8 big_compaction_test 0x00000001097efd82 _fdb_wal_flush_func(void*, wal_item*) + 546
9 big_compaction_test 0x000000010980535d _wal_do_flush(wal_item*, fdb_status (void*, wal_item*), void*) + 61
10 big_compaction_test 0x00000001098036a3 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 1139
11 big_compaction_test 0x000000010980321f wal_flush + 63
12 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
13 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
14 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
15 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
16 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 16:
0 libsystem_kernel.dylib 0x00007fff8fa725da syscall_thread_switch + 10
1 libsystem_platform.dylib 0x00007fff8eef482d _OSSpinLockLockSlow + 63
2 big_compaction_test 0x000000010980e6ca memleak_alloc + 74
3 big_compaction_test 0x00000001097c72f6 _btreeblk_read(void*, unsigned long long, int) + 918
4 big_compaction_test 0x00000001097c4412 btreeblk_read(void*, unsigned long long) + 34
5 big_compaction_test 0x00000001097b9386 btree_find + 342
6 big_compaction_test 0x00000001097f7081 _hbtrie_insert(hbtrie*, void*, int, void*, void*, unsigned char) + 2977
7 big_compaction_test 0x00000001097f4eed hbtrie_insert + 61
8 big_compaction_test 0x00000001097efd82 _fdb_wal_flush_func(void*, wal_item*) + 546
9 big_compaction_test 0x000000010980535d _wal_do_flush(wal_item*, fdb_status (void*, wal_item*), void*) + 61
10 big_compaction_test 0x00000001098036a3 _wal_flush(filemgr*, void*, fdb_status (void*, wal_item*), unsigned long long (void*, wal_item*), wal_flush_items*, bool) + 1139
11 big_compaction_test 0x000000010980321f wal_flush + 63
12 big_compaction_test 0x00000001097e58c1 fdb_set + 2673
13 big_compaction_test 0x00000001098110ac _writer_thread(void*) + 1660
14 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
15 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
16 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13
Thread 17:
0 libsystem_kernel.dylib 0x00007fff8fa76a82 __getdirentries64 + 10
1 libsystem_c.dylib 0x00007fff8b46ce04 readdir$INODE64 + 35
2 big_compaction_test 0x00000001097ca50d compactor_get_actual_filename + 669
3 big_compaction_test 0x00000001097db14e _fdb_open + 510
4 big_compaction_test 0x00000001097dae9b fdb_open + 651
5 big_compaction_test 0x0000000109811557 _compactor_thread(void*) + 263
6 libsystem_pthread.dylib 0x00007fff898b9268 _pthread_body + 131
7 libsystem_pthread.dylib 0x00007fff898b91e5 _pthread_start + 176
8 libsystem_pthread.dylib 0x00007fff898b741d thread_start + 13