Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-15075

Assertion failed(pos < file->pos.val), function filemgr_read when 2+ writers in single KV mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 4.0.0
    • forestdb
    • Security Level: Public
    • None
    • Triaged
    • Unknown
    • ForestDB: Oct 26 - Nov 13

    Description

      4 writer threads each with separate handles appending non-overlapping set of keys into same dbfile in single kv instance mode causing an assertion..
      Test case uploaded here: http://review.couchbase.org/51291

      Note that this assertion is NOT seen if all 4 writers are working on different KV stores in multi kv instance mode.

      Stack trace for all threads....
      Assertion in 0x4dff860000 != 0x5399000 in /Users/sundar/forestdb/src/filemgr.cc:1345
      Assertion failed: (pos < file->pos.val), function filemgr_read, file /Users/sundar/forestdb/src/filemgr.cc, line 1345.
      Process 6674 stopped

      • thread #2: tid = 0x4401, 0x00007fff9b543286 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
        frame #0: 0x00007fff9b543286 libsystem_kernel.dylib`__pthread_kill + 10
        libsystem_kernel.dylib`__pthread_kill + 10:
        -> 0x7fff9b543286: jae 0x7fff9b543290 ; __pthread_kill + 20
        0x7fff9b543288: movq %rax, %rdi
        0x7fff9b54328b: jmp 0x7fff9b53ec53 ; cerror_nocancel
        0x7fff9b543290: retq
        (lldb) bt
      • thread #2: tid = 0x4401, 0x00007fff9b543286 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
      • frame #0: 0x00007fff9b543286 libsystem_kernel.dylib`__pthread_kill + 10
        frame #1: 0x00007fff9b4c842f libsystem_pthread.dylib`pthread_kill + 90
        frame #2: 0x00007fff8f545b53 libsystem_c.dylib`abort + 129
        frame #3: 0x00007fff8f50dc39 libsystem_c.dylib`__assert_rtn + 321
        frame #4: 0x0000000100021cdc big_compaction_test`filemgr_read(file=0x0000000100500000, bid=81786976, buf=0x0000000102048c00, log_callback=0x0000000100104d50) + 188 at filemgr.cc:1345
        frame #5: 0x00000001000175e2 big_compaction_test`_btreeblk_read(voidhandle=0x0000000100104b70, bid=81786976, sb_no=-1) + 1298 at btreeblock.cc:406
        frame #6: 0x00000001000147d2 big_compaction_test`btreeblk_read(voidhandle=0x0000000100104b70, bid=81786976) + 34 at btreeblock.cc:435
        frame #7: 0x000000010000a6a4 big_compaction_test`btree_insert(btree=0x00000001001050a0, key=0x0000000100680258, value=0x0000000100680230) + 868 at btree.cc:954
        frame #8: 0x000000010003b16e big_compaction_test`_fdb_wal_flush_func(voidhandle=0x0000000100104c70, item=0x000000010050c4e0) + 1246 at forestdb.cc:1807
        frame #9: 0x000000010004d71d big_compaction_test`_wal_flush(file=0x0000000100500000, dbhandle=0x0000000100104c70, flush_func=0x000000010003ac90, get_old_offset=0x000000010003b540, flush_items=0x00000001006803d8, by_compactor=false)(void*, wal_item*), unsigned long long (void*, wal_item*), avl_tree*, bool) + 925 at wal.cc:812
        frame #10: 0x000000010004d36f big_compaction_test`wal_flush(file=0x0000000100500000, dbhandle=0x0000000100104c70, flush_func=0x000000010003ac90, get_old_offset=0x000000010003b540, flush_items=0x00000001006803d8) + 63 at wal.cc:833
        frame #11: 0x0000000100031660 big_compaction_test`fdb_set(handle=0x0000000100104c70, doc=0x0000000100680e40) + 2496 at forestdb.cc:2812
        frame #12: 0x0000000100059d09 big_compaction_test`_writer_thread(voidargs=0x00007fff5fbff6f8) + 1145 at big_compaction_test.cc:100
        frame #13: 0x00007fff9b4c6268 libsystem_pthread.dylib`_pthread_body + 131
        frame #14: 0x00007fff9b4c61e5 libsystem_pthread.dylib`_pthread_start + 176
        frame #15: 0x00007fff9b4c441d libsystem_pthread.dylib`thread_start + 13

      Attachments

        For Gerrit Dashboard: MB-15075
        # Subject Branch Project Status CR V

        Activity

          People

            sundar Sundar Sridharan (Inactive)
            sundar Sundar Sridharan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty