Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21986

Failed to repair mongo after system crash

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: WiredTiger
    • None
    • ALL

      The system was crushed, i could only return to virtual snapchot and get DB files

      but when i insert it and start mong with --repair key , i got read checksum error

      c:\Program Files\MongoDB\bin>.\mongod --dbpath "c:\Program Files\MongoDB\Data" --repair --storageEngine wiredTiger
      2015-12-22T14:50:54.029+0400 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=3G,session_max=20000,e
      viction=(threads_max=4),statistics=(fast),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
      2015-12-22T14:50:54.036+0400 E STORAGE  [initandlisten] WiredTiger (0) [1450781454:36877][8020:140713109689168], file:Wi
      redTiger.wt, connection: read checksum error [24576B @ 421888, 996688094 != 1475298810]
      2015-12-22T14:50:54.040+0400 E STORAGE  [initandlisten] WiredTiger (0) [1450781454:39879][8020:140713109689168], file:Wi
      redTiger.wt, connection: WiredTiger.wt: encountered an illegal file format or internal value
      2015-12-22T14:50:54.041+0400 E STORAGE  [initandlisten] WiredTiger (-31804) [1450781454:41865][8020:140713109689168], fi
      le:WiredTiger.wt, connection: the process must exit and restart: WT_PANIC: WiredTiger library panic
      2015-12-22T14:50:54.042+0400 I -        [initandlisten] Fatal Assertion 28558
      2015-12-22T14:50:55.215+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\stacktrace_win.cpp(175)
                       mongo::printStackTrace+0x43
      2015-12-22T14:50:55.217+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\log.cpp(135)
                       mongo::logContext+0x97
      2015-12-22T14:50:55.219+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\util\assert_util.cpp(165)
                       mongo::fassertFailed+0x80
      2015-12-22T14:50:55.221+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\storage\wiredtiger\wiredtiger_uti
      l.cpp(297)       mongo::`anonymous namespace'::mdb_handle_error+0xb5
      2015-12-22T14:50:55.223+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(2
      91)              __wt_eventv+0x3fc
      2015-12-22T14:50:55.225+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(3
      16)              __wt_err+0x32
      2015-12-22T14:50:55.226+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(5
      14)              __wt_illegal_value+0x5e
      2015-12-22T14:50:55.228+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\block\block_rea
      d.c(214)         __wt_block_read_off+0x177
      2015-12-22T14:50:55.230+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\block\block_rea
      d.c(47)          __wt_bm_preload+0xe3
      2015-12-22T14:50:55.232+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\btree\bt_handle
      .c(540)          __btree_preload+0x9f
      2015-12-22T14:50:55.233+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\btree\bt_handle
      .c(110)          __wt_btree_open+0x22f
      2015-12-22T14:50:55.235+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\conn\conn_dhand
      le.c(454)        __conn_btree_open+0x7b
      2015-12-22T14:50:55.237+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\conn\conn_dhand
      le.c(506)        __wt_conn_btree_get+0xcf
      2015-12-22T14:50:55.239+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\session\session
      _dhandle.c(408)  __wt_session_get_btree+0x3e2
      2015-12-22T14:50:55.240+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\meta\meta_table
      .c(43)           __wt_metadata_open+0x35
      2015-12-22T14:50:55.242+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\third_party\wiredtiger\src\conn\conn_api.c
      (1775)           wiredtiger_open+0x6ba
      2015-12-22T14:50:55.244+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\storage\wiredtiger\wiredtiger_kv_
      engine.cpp(117)  mongo::WiredTigerKVEngine::WiredTigerKVEngine+0x4e3
      2015-12-22T14:50:55.246+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\storage\wiredtiger\wiredtiger_ini
      t.cpp(66)        mongo::`anonymous namespace'::WiredTigerFactory::create+0x9f
      2015-12-22T14:50:55.248+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\global_environment_d.cpp(107)
                       mongo::GlobalEnvironmentMongoD::setGlobalStorageEngine+0x40f
      2015-12-22T14:50:55.249+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(489)
                       mongo::_initAndListen+0x488
      2015-12-22T14:50:55.251+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(651)
                       mongo::initAndListen+0x27
      2015-12-22T14:50:55.253+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(896)
                       mongoDbMain+0x206
      2015-12-22T14:50:55.254+0400 I CONTROL  [initandlisten] mongod.exe    ...\src\mongo\db\db.cpp(694)
                       wmain+0x35
      2015-12-22T14:50:55.256+0400 I CONTROL  [initandlisten] mongod.exe    f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c(623)
                       __tmainCRTStartup+0x10f
      2015-12-22T14:50:55.258+0400 I CONTROL  [initandlisten] KERNEL32.DLL
                       BaseThreadInitThunk+0xd
      2015-12-22T14:50:55.259+0400 I CONTROL  [initandlisten]
      2015-12-22T14:50:55.260+0400 I -        [initandlisten]
      
      ***aborting after fassert() failure
      

      As i see, it is possible to recover data (some fixed WiredTiger.wt and sizeStorer.wt help to repair)
      How can i correct these files?

        1. sizeStorer.wt
          52 kB
        2. WiredTiger.turtle
          0.9 kB
        3. WiredTiger.turtle.new
          0.9 kB
        4. WiredTiger.wt
          1.06 MB
        5. WiredTiger.wt.new
          1.06 MB

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            Unit22 Timur Mamezhanov [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: