Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9836

Fix segfault accessing file handle in test_tiered08

    • Type: Icon: Build Failure Build Failure
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      We appear to have a race of some sort in test_tiered08. We get a segfault accessing a WT_FH during __wt_read(). The problem is that the file handle has been freed.

      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __wt_read (buf=0xaaab02145640, len=4096, offset=1748992, fh=0xabababababababab, 
          session=0xaaab00c91770) at ../src/include/os_fhandle_inline.h:116
      116	    ret = fh->handle->fh_read(fh->handle, (WT_SESSION *)session, offset, len, buf);
      [Current thread is 1 (Thread 0xffffb3a5a010 (LWP 107361))]
      (gdb) print fh
      $1 = (WT_FH *) 0xabababababababab
      

      Here is the stack trace:

      (gdb) bt
      #0  __wt_read (buf=0xaaab02145640, len=4096, offset=1748992, fh=0xabababababababab, 
          session=0xaaab00c91770) at ../src/include/os_fhandle_inline.h:116
      #1  __wt_block_read_off (session=session@entry=0xaaab00c91770, block=<optimized out>, 
          block@entry=0xffff30d65580, buf=buf@entry=0xfffff63e40b8, objectid=15, offset=1748992, 
          size=4096, checksum=104540736) at ../src/block/block_read.c:195
      #2  0x0000ffffb2ae8de4 in __wt_bm_read (bm=0xaaab00465ad0, session=0xaaab00c91770, 
          buf=0xfffff63e40b8, addr=<optimized out>, addr_size=<optimized out>)
          at ../src/block/block_read.c:41
      #3  0x0000ffffb2af0968 in __bm_read (bm=<optimized out>, session=<optimized out>, 
          buf=<optimized out>, addr=<optimized out>, addr_size=<optimized out>)
          at ../src/block_cache/block_mgr.c:486
      #4  0x0000ffffb2aeed58 in __wt_blkcache_read (session=session@entry=0xaaab00c91770, 
          buf=buf@entry=0xfffff63e40b8, addr=addr@entry=0xfffff63e40e1 "\301j\201\344\006;\n", 
          addr_size=10) at ../src/block_cache/block_io.c:111
      #5  0x0000ffffb2b3f600 in __page_read (session=session@entry=0xaaab00c91770, 
          ref=ref@entry=0xaaab00f51d50, flags=flags@entry=128) at ../src/btree/bt_read.c:183
      #6  0x0000ffffb2b40184 in __wt_page_in_func (session=session@entry=0xaaab00c91770, 
          ref=ref@entry=0xaaab00f51d50, flags=flags@entry=128, 
          func=func@entry=0xffffb2d14270 <__PRETTY_FUNCTION__.39457> "__wt_row_search", 
          line=line@entry=438) at ../src/btree/bt_read.c:307
      #7  0x0000ffffb2b8460c in __wt_page_swap_func (line=438, 
          func=0xffffb2d14270 <__PRETTY_FUNCTION__.39457> "__wt_row_search", flags=128, 
          want=0xaaab00f51d50, held=0xffffa00aa2c0, session=0xaaab00c91770)
          at ../src/include/btree_inline.h:2150
      #8  __wt_row_search (cbt=cbt@entry=0xaaab058b2bc0, srch_key=srch_key@entry=0xaaab058b2cd8, 
          insert=insert@entry=true, leaf=leaf@entry=0x0, leaf_safe=leaf_safe@entry=false, 
          leaf_foundp=leaf_foundp@entry=0x0) at ../src/btree/row_srch.c:438
      #9  0x0000ffffb2b0f9c4 in __cursor_row_search (leaf_foundp=0x0, leaf=0x0, insert=true, 
          cbt=0xaaab058b2bc0) at ../src/btree/bt_cursor.c:501
      #10 __wt_btcur_insert (cbt=cbt@entry=0xaaab058b2bc0) at ../src/btree/bt_cursor.c:1161
      #11 0x0000ffffb2bc169c in __curfile_insert (cursor=0xaaab058b2bc0) at ../src/cursor/cur_file.c:384
      #12 0x0000ffffb2db1c14 in _wrap_Cursor_insert (self=<optimized out>, args=<optimized out>)
          at lang/python/CMakeFiles/wiredtiger_python.dir/wiredtigerPYTHON_wrap.c:4083
      

       

      spinlock-pthread-adaptive-test on ubuntu2004-arm64

      Host: i-0455ef82f673f3709
      Project: wiredtiger
      Commit: fe32af98

      Task Logs:

      spinlock-pthread-adaptive-test task_log

      Logs:

      Test failure
      ERROR: test_tiered08.test_tiered08.test_tiered08(dirstore) (subunit.RemotedTestCase)
      test_tiered08.test_tiered08.test_tiered08(dirstore)
      ----------------------------------------------------------------------
      testtools.testresult.real._StringException: lost connection during test 'test_tiered08.test_tiered08.test_tiered08(dirstore)'
      ----------------------------------------------------------------------
      Ran 10518 tests in 1960.675s
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_ubuntu2004_arm64_spinlock_pthread_adaptive_test_fe32af9801bbfe192afeca271072250f35af6160_22_09_06_22_48_04/0?type=T#L43005
      
      Evergreen YAML Script Failure
      Command failed: shell script encountered problem: exit code 1
      
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_ubuntu2004_arm64_spinlock_pthread_adaptive_test_fe32af9801bbfe192afeca271072250f35af6160_22_09_06_22_48_04/0?type=T#L43012
      
      Segmentation Failure
      Program terminated with signal SIGSEGV, Segmentation fault.
      
      Link: https://evergreen.mongodb.com/task_log_raw/wiredtiger_ubuntu2004_arm64_spinlock_pthread_adaptive_test_fe32af9801bbfe192afeca271072250f35af6160_22_09_06_22_48_04/0?type=T#L43037
      

      logs

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Xgen-BuildBaron-User xgen-buildbaron-user
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: