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

Investigate asserting that the cursors passed to truncate belong to the correct session.

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • StorEng - Refinement Pipeline

    Description

      Accidentally repro'd this while writing a python test however as the test is very complex it isn't valuable to add it to the ticket.

      The call stack looks like:

      Thread 1 "python" received signal SIGSEGV, Segmentation fault.
      0x00007ffff4eca382 in __wt_log_op (session=0xd58210) at ../src/include/log_inline.h:43
      43          if (!F_ISSET(S2BT(session), WT_BTREE_LOGGED) &&
      (gdb) bt
      #0  0x00007ffff4eca382 in __wt_log_op (session=0xd58210) at ../src/include/log_inline.h:43
      #1  0x00007ffff4ed0594 in __wt_btcur_range_truncate (start=0xe10900, stop=0xe77260)
          at ../src/btree/bt_cursor.c:2121
      #2  0x00007ffff50a68bc in __wt_schema_range_truncate (session=0xd57dd0, start=0xe10900,
          stop=0xe77260) at ../src/schema/schema_truncate.c:173
      #3  0x00007ffff50b720e in __wt_session_range_truncate (session=0xd57dd0, uri=0x0,
          start=0xe10900, stop=0xe77260) at ../src/session/session_api.c:1454
      #4  0x00007ffff50b7e57 in __session_truncate (wt_session=0xd57dd0, uri=0x0, start=0xe10900,
          stop=0xe77260, config=0x0) at ../src/session/session_api.c:1521
      #5  0x00007ffff53cd9d6 in _wrap_Session_truncate (self=0x7ffff5e3f1d0, args=0x7ffff44c4830)
          at lang/python/CMakeFiles/wiredtiger_python.dir/wiredtigerPYTHON_wrap.c:7135
       

      Effectively truncate calls __wt_log_op to determine whether the truncate should be logged. Inside of __wt_log_op we call S2BT which tries to get the btree from the session->dhandle->handle which can be NULL. Thus we segfault.

      Attachments

        Activity

          People

            backlog-server-storage-engines Backlog - Storage Engines Team
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: