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

Stop checkpoint thread before closing connection in Python tests

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.0, 4.4.2, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2020-08-24

      Description

      While trying to repro a separate issue, I noticed that tests that use checkpoint_thread occasionally hit a C assertion if they're failing in Python.

      The issue is that we spin up a separate checkpoint thread but if we fail in Python before reaching the ckpt.join(), we'll close the connection mid-checkpoint which is not allowed. Our API doesn't allow users to be doing things with the engine from other threads if they're closing the connection.

      (lldb) bt
      * thread #1, name = 'python', stop reason = signal SIGABRT
        * frame #0: 0x00007ffff7a22f47 libc.so.6`__GI_raise(sig=2) at raise.c:51
          frame #1: 0x00007ffff7a248b1 libc.so.6`__GI_abort at abort.c:79
          frame #2: 0x00007ffff594d65f libwiredtiger-10.0.0.so`__wt_abort(session=0x00005555561d27e0) at os_abort.c:30
          frame #3: 0x00007ffff59b752e libwiredtiger-10.0.0.so`__session_rollback_transaction(wt_session=0x00005555561d27e0, config=0x0000000000000000) at session_api.c:1724
          frame #4: 0x00007ffff587589d libwiredtiger-10.0.0.so`__conn_close(wt_conn=0x0000555555ed0630, config=0x0000000000000000) at conn_api.c:1034
          frame #5: 0x00007ffff5c8f623 _wiredtiger.so`_wrap_Connection_close(self=0x0000000000000000, args=0x00007ffff6c523d0) at wiredtiger_wrap.c:8724
      

      And more specifically:

              WT_ASSERT(session, (s)->id == 0 || (s)->api_tid == 0 || (s)->api_tid == __tmp_api_tid); \
      

        Attachments

          Activity

            People

            Assignee:
            alex.cameron Alex Cameron (Inactive)
            Reporter:
            alex.cameron Alex Cameron (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: