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

WiredTiger shutdown attempts to clear dhandle config for a NULL dhandle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      Storage - Ra 2021-05-03

      Description

      WiredTiger clears config from a dhandle by calling: conn_dhandle_config_clear, this automatically uses the dhandle provided by the session. i.e. session->dhandle, in one scenario that dhandle was NULL resulting in a segfault.

      It appears that this is the case when we are in the shutdown path and walking all dhandles associated with the session. See callstack below:

      #1  0x00007fc797d6aa84 in __conn_dhandle_destroy (session=session@entry=0x7fc79d44c000, dhandle=<optimized out>,
          dhandle@entry=0x7fc7a02d3000) at src/third_party/wiredtiger/src/conn/conn_dhandle.c:135
      #2  0x00007fc797d6c733 in __wt_conn_dhandle_discard_single (session=session@entry=0x7fc79d44c000,
          final=final@entry=true, mark_dead=<optimized out>) at src/third_party/wiredtiger/src/conn/conn_dhandle.c:779
      #3  0x00007fc797d6c85f in __wt_conn_dhandle_discard (session=session@entry=0x7fc79d44c000)
          at src/third_party/wiredtiger/src/conn/conn_dhandle.c:816
      #4  0x00007fc797d6ffe2 in __wt_connection_close (conn=conn@entry=0x7fc79d2d0800)
          at src/third_party/wiredtiger/src/conn/conn_open.c:107
      #5  0x00007fc797d61543 in __conn_close (wt_conn=0x7fc79d2d0800, config=<optimized out>)
      

      It's possible that the conn_dhandle_config_clear could just get the dhandle as an argument instead of pulling it out of the session, however first I think the full cause should be understood.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-storage-engines Backlog - Storage Engines Team
              Reporter:
              luke.pearson Luke Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: