• Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.6.1
    • Affects Version/s: None
    • Component/s: None
    • None

      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. wt.tar.gz
          3.65 MB
        2. open_db.c
          0.9 kB

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            Dmitri Shubin Dmitri Shubin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: