Turn off failpoint when calling cursor->close()

XMLWordPrintableJSON

      Python tests call WT_CURSOR::close repeatedly, if the call return EBUSY. However, sometimes the underlying cursor object deletes itself, and then returns EBUSY, leaving the python side with a dangling pointer.

      Investigation:

      1. __curfile_close frees the cursor prematurely.
      2. After it calls __wt_cursor_close, it attempts to release dhandle via __wt_session_release_dhandle, which may return EBUSY.
      3. The EBUSY error then propagated all the way to the WT_CURSOR::close caller. The caller is in the Python test_ovfl01.
      4. On subsequent call to WT_CURSOR::close, the underlying cursor is already freed. The Python code holds a garbage pointer at this point and segmentation fault occurs.

      In addition, the first call to __wti_cursor_cache_release does not check the return value.

      To reproduce the problem, run the following shell command (from build directory):

      for i in {1..1000}; do echo "[Round $i]"; python3 ../test/suite/run.py test_ovfl01 -v 2 || break; done

      Solution:

      1. Check if cursor is busy. If yes, return EBUSY without destroying internal state.
      2. Otherwise, proceed as normal.

            Assignee:
            Jie Chen
            Reporter:
            Alex Blekhman
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: