Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.6.1
    • Labels:
      None
    • # Replies:
      13
    • Last comment by Customer:
      true

      Description

      Hi!

      We have a DB that seems to have broken transaction logs.
      When I'm trying to open it with recovery I get:

      [1431957174:264796][25384:0x7fd791c6c700]: wt/WiredTigerLog.0000000014: No such file or directory
      [1431957174:264918][25384:0x7fd791c6c700], WT_CURSOR.search: wt/WiredTigerLog.0000000014: No such file or directory
      [1431957174:264951][25384:0x7fd791c6c700], WT_CURSOR.set_value: memory allocation: Cannot allocate memory
      [1431957174:270061][25384:0x7fd791c6c700]: wt/WiredTigerLog.0000000014: No such file or directory
      

      But nevertheless it seems to succeeded and I can open cursor and iterate thought its single table.

      AFAIU this 'memory allocation' error results from attempt to allocate seemingly invalid amount of 18446744073709551604 (0xfffffffffffffff4) bytes with the following stack:

      #2  0x00007f5f07b8e11f in __wt_realloc (session=0x7f5f0708c580, bytes_allocated_ret=0x7f5f072062e0, bytes_to_allocate=18446744073709551604, retp=0x7f5f072062d8) at src/os_posix/os_alloc.c:102
      #3  0x00007f5f07bc5005 in __wt_buf_grow_worker (session=<optimized out>, buf=0x7f5f072062c0, size=<optimized out>) at src/support/scratch.c:48
      #4  0x00007f5f07b6accb in __wt_buf_grow (size=18446744073709551604, buf=0x7f5f072062c0, session=<optimized out>) at ./src/include/buf.i:18
      #5  __wt_buf_initsize (session=<optimized out>, buf=0x7f5f072062c0, size=18446744073709551604) at ./src/include/buf.i:61
      #6  0x00007f5f07b6e400 in __wt_cursor_set_valuev (cursor=0x7f5f072061c0, ap=0x7fff23761100) at src/cursor/cur_std.c:429
      #7  0x00007f5f07b6e4fd in __wt_cursor_set_value (cursor=<optimized out>) at src/cursor/cur_std.c:377
      #8  0x00007f5f07b6613b in __curlog_kv (session=0x7f5f0708c580, cursor=0x7f5f072061c0) at src/cursor/cur_log.c:212
      #9  0x00007f5f07b666d9 in __curlog_search (cursor=0x7f5f072061c0) at src/cursor/cur_log.c:276
      #10 0x00007f5f07b76a7a in __wt_log_needs_recovery (session=<optimized out>, ckp_lsn=0x7fff23761440, rec=0x7fff2376147c) at src/log/log.c:70
      #11 0x00007f5f07bcc001 in __wt_txn_recover (session=0x7f5f0708c580) at src/txn/txn_recover.c:489
      #12 0x00007f5f07b54fb6 in __wt_connection_workers (session=0x7f5f0708c000, cfg=0x7fff23761650) at src/conn/conn_open.c:237
      #13 0x00007f5f07b4eca6 in wiredtiger_open (home=0x7fff237616e0 "\357\033\275\a_\177", event_handler=<optimized out>, config=0x7fff237617d8 "", wt_connp=0x7fff237618a8) at src/conn/conn_api.c:2000
      #14 0x00000000004007bb in main () at open_db.c:27
      

      I will attach tarball with DB and small C program that opens it.

      1. open_db.c
        0.9 kB
        Dmitri Shubin
      2. wt.tar.gz
        3.65 MB
        Dmitri Shubin

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: Handle ENOENT from log_scan in callers. WT-1936
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/1bbe59ae3e244188cbf5a9cf5198ecb0ac2303c0

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: Handle ENOENT from log_scan in callers. WT-1936 Branch: develop https://github.com/wiredtiger/wiredtiger/commit/1bbe59ae3e244188cbf5a9cf5198ecb0ac2303c0
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: Skip writing log record on idle checkpoint. WT-1936
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/aba336025575f15d2ba47f260c41bb1c67a3ad0e

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: Skip writing log record on idle checkpoint. WT-1936 Branch: develop https://github.com/wiredtiger/wiredtiger/commit/aba336025575f15d2ba47f260c41bb1c67a3ad0e
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'}

          Message: Add test for idle checkpoints. WT-1936
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/8fac3a7326ef3e924fb4b08ab45c22d57a2c834f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'sueloverso', u'name': u'Susan LoVerso', u'email': u'sue@wiredtiger.com'} Message: Add test for idle checkpoints. WT-1936 Branch: develop https://github.com/wiredtiger/wiredtiger/commit/8fac3a7326ef3e924fb4b08ab45c22d57a2c834f
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Check whether the metadata has been modified to figure out whether a checkpoint did any work.

          refs WT-1936
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/ff56ae5dd686cce4fab92be541a2692602a4c682

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Check whether the metadata has been modified to figure out whether a checkpoint did any work. refs WT-1936 Branch: develop https://github.com/wiredtiger/wiredtiger/commit/ff56ae5dd686cce4fab92be541a2692602a4c682
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Map ENOENT to WT_NOTFOUND in log cursors.

          refs WT-1936
          Branch: develop
          https://github.com/wiredtiger/wiredtiger/commit/fb313ca71cb54cc1536febe28b8a50134c1dcd59

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Map ENOENT to WT_NOTFOUND in log cursors. refs WT-1936 Branch: develop https://github.com/wiredtiger/wiredtiger/commit/fb313ca71cb54cc1536febe28b8a50134c1dcd59

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 44 weeks ago
                Date of 1st Reply: