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

Consider anything other than fscanf success to be EOF

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2, WT3.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage 2018-01-15

      Run #18965 of random-abort dropped core.

      The console output is here: http://build.wiredtiger.com:8080/job/wiredtiger-test-recovery-stress/18965/consoleFull

      The core dump is on the aws-jenkins machine, here: /mnt/fast/jenkins/workspace/wiredtiger-test-recovery-stress/jenkins-wiredtiger-test-recovery-stress-18965.4fcff5072261052ad9c75a6e1eba80a1bc54e5dc.tgz.

      The core dump is:

      gdb test_random_abort WT_TEST.random-abort/*core*
      where
      #0  0x00007efccf48f1d7 in raise () from /lib64/libc.so.6
      #1  0x00007efccf4908c8 in abort () from /lib64/libc.so.6
      #2  0x0000000000404315 in testutil_die (e=0, fmt=0x5854f2 "fscanf")
          at ../../../test/utility/misc.c:58
      #3  0x0000000000403e10 in main (argc=0, argv=0x7ffd6af9f200)
          at ../../../test/csuite/random_abort/main.c:395
      (gdb) frame 3
      #3  0x0000000000403e10 in main (argc=0, argv=0x7ffd6af9f200)
          at ../../../test/csuite/random_abort/main.c:395
      395					testutil_die(errno, "fscanf");
      (gdb) l
      390			 * write-no-sync, we expect every key to have been recovered.
      391			 */
      392			for (last_key = UINT64_MAX;; ++count, last_key = key) {
      393				ret = fscanf(fp, "%" SCNu64 "\n", &key);
      394				if (ret != EOF && ret != 1)
      395					testutil_die(errno, "fscanf");
      396				if (ret == EOF)
      397					break;
      398				/*
      399				 * If we're unlucky, the last line may be a partially
      (gdb) p ret
      $10 = 0
      (gdb) p errno
      $11 = 0
      

      which is a minor bug, fscanf returns 0 if there is input but it's unable to do the expected conversion. We should probably fix that to not assume errno has been set in that case, or we could use a different conversion function.

      I didn't chase any further, presumably there's a problem with the input fscanf was reading.

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: