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

Fix cursor operation hung on WT_PREPARE_CONFLICT

    • 5
    • Storage - Ra 2020-05-18

      There's a format failure that's characterized by threads hanging on a cursor next/prev call because it's returning WT_PREPARE_CONFLICT.

      The symptom is format timing out:

      t: process 24157 running
      format run more than 15 minutes past the maximum time
      format run dumping cache and transaction state, then aborting the process
      

      with worker thread stacks that look like this:

      (gdb) where
      #0  0x00007ff2677dee57 in sched_yield () at ../sysdeps/unix/syscall-template.S:78
      #1  0x00005654a5705562 in __wt_yield () at src/os_posix/os_yield.c:25
      #2  0x00005654a565fdf3 in read_op (cursor=0x7ff24cb779a0, op=NEXT, exactp=0x0) at format.i:45
      #3  0x00005654a56636cd in nextprev (tinfo=0x5654a7ef1000, cursor=0x7ff24cb779a0, next=true)
          at ops.c:1185
      #4  0x00005654a5662c42 in ops (arg=0x5654a7ef1000) at ops.c:943
      #5  0x00007ff267ad36db in start_thread (arg=0x7ff25ffff700) at pthread_create.c:463
      #6  0x00007ff2677fc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      (gdb) frame 2
      #2  0x00005654a565fdf3 in read_op (cursor=0x7ff24cb779a0, op=NEXT, exactp=0x0) at format.i:45
      45	            __wt_yield();
      (gdb) l
      40	     * repeat reads that succeeded before, they should be repeatable.)
      41	     */
      42	    switch (op) {
      43	    case NEXT:
      44	        while ((ret = cursor->next(cursor)) == WT_PREPARE_CONFLICT)
      45	            __wt_yield();
      46	        break;
      47	    case PREV:
      48	        while ((ret = cursor->prev(cursor)) == WT_PREPARE_CONFLICT)
      49	            __wt_yield();
      (gdb) p ret
      $1 = -31808
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: