Unhandled exception: st13runtime_error, file corruption (?) #3993

issue dexX7 opened this issue on April 2, 2014
  1. dexX7 commented at 2:11 AM on April 2, 2014: contributor

    As usual I had Bitcoin-Qt (v0.9, Win 7 x64) running in the background and sent a transaction via RPC, about 10 minutes later an exception was thrown, ultimately leading to a corrupted wallet.dat file. At that very moment no action was performed and to my best knowledge no other program than bitcoin-qt.exe had access to the wallet.dat. The event logs don't show any incident besides this one during that time.

    Screenshots:

    excep

    debug.log:

    2014-04-01 23:02:46 AddToWallet 763f6e7d66a4b44bd1c6f7c566a98c8fe9465e00e2a048e046f38566f2fbe9fd  new
    2014-04-01 23:02:46 AddToWallet 763f6e7d66a4b44bd1c6f7c566a98c8fe9465e00e2a048e046f38566f2fbe9fd  
    ...
    2014-04-01 23:11:54 socket recv error 10054
    2014-04-01 23:12:38 UpdateTip: new best=000000000000000090b4ce53f41be9c3af7d2b9220a6585926b8fcab59e78457  height=293646  log2_work=77.684919  tx=36044176  date=2014-04-01 23:11:43 progress=0.999997
    2014-04-01 23:12:38 ProcessBlock: ACCEPTED
    2014-04-01 23:12:40 AddToWallet 763f6e7d66a4b44bd1c6f7c566a98c8fe9465e00e2a048e046f38566f2fbe9fd  update
    2014-04-01 23:12:40 *** System error: CDB() : can't open database file wallet.dat, error 2
    2014-04-01 23:12:44 ERROR: ProcessBlock() : AcceptBlock FAILED
    2014-04-01 23:12:44 Requesting shutdown
    2014-04-01 23:12:44 Running Shutdown in thread
    2014-04-01 23:12:44 opencon thread interrupt
    2014-04-01 23:12:44 dumpaddr thread stop
    2014-04-01 23:12:44 msghand thread interrupt
    2014-04-01 23:12:44 addcon thread interrupt
    2014-04-01 23:12:44 net thread interrupt
    2014-04-01 23:12:44 Shutdown : In progress...
    2014-04-01 23:12:44 StopNode()
    2014-04-01 23:12:45 UPNP_DeletePortMapping() returned : 0
    2014-04-01 23:12:45 upnp thread interrupt
    2014-04-01 23:12:45 
    
    ************************
    EXCEPTION: St13runtime_error       
    CDB() : can't open database file wallet.dat, error 2       
    E:\Bitcoin-0.9.0\bitcoin-qt.exe in Runaway exception       
    
    Requesting initialize
    Running AppInit2 in thread
    2014-04-01 23:15:37 
    
    ....
    
    2014-04-01 23:17:22 Bitcoin version v0.9.0.0-g92d25e4-beta (Sun, 16 Mar 2014 11:05:28 +0100)
    2014-04-01 23:17:22 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
    2014-04-01 23:17:22 Default data directory C:\Users\uname\AppData\Roaming\Bitcoin
    2014-04-01 23:17:22 Using data directory E:\Bitcoin-0.9.0\Data
    2014-04-01 23:17:22 Using at most 125 connections (2048 file descriptors available)
    2014-04-01 23:17:22 Using 4 threads for script verification
    2014-04-01 23:17:22 Using wallet wallet.dat
    2014-04-01 23:17:22 init message: Verifying wallet...
    2014-04-01 23:17:22 dbenv.open LogDir=E:\Bitcoin-0.9.0\Data\database ErrorFile=E:\Bitcoin-0.9.0\Data\db.log
    2014-04-01 23:17:23 Renamed wallet.dat to wallet.1396394242.bak
    2014-04-01 23:17:23 Error: Salvage found errors, all data may not be recoverable.
    2014-04-01 23:17:23 Salvage(aggressive) found no records in wallet.1396394242.bak.
    2014-04-01 23:20:15 Initialization result: 0
    2014-04-01 23:20:15 Requesting shutdown
    2014-04-01 23:20:15 Running Shutdown in thread
    2014-04-01 23:20:15 Shutdown : In progress...
    2014-04-01 23:20:15 StopNode()
    2014-04-01 23:20:15 Shutdown : done
    2014-04-01 23:20:15 Shutdown finished
    2014-04-01 23:20:15 Shutdown result: 1
    2014-04-01 23:20:15 Stopping thread
    2014-04-01 23:20:15 Stopped thread
    Requesting initialize
    Running AppInit2 in thread
    2014-04-01 23:31:51 
    

    db.log:

    wallet.dat: unable to flush: No such file or directory
    txn_checkpoint: failed to flush the buffer cache: No such file or directory
    wallet.dat: No such file or directory
    wallet.dat: No such file or directory
    file unknown has LSN 1/59393, past end of log at 1/28
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    Page 0: metadata page corrupted
    Page 0: could not check metadata page
    wallet.dat: DB_VERIFY_BAD: Database verification failed
    file unknown has LSN 1/59393, past end of log at 1/1076
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    wallet.1396394242.bak: DB_VERIFY_BAD: Database verification failed
    file unknown has LSN 1/59393, past end of log at 1/1076
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    file unknown has LSN 1/59393, past end of log at 1/1076
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    file unknown has LSN 1/59393, past end of log at 1/1076
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    file unknown has LSN 1/59393, past end of log at 1/1076
    Commonly caused by moving a database from one database environment
    to another without clearing the database LSNs, or by removing all of
    the log files from a database environment
    

    System events:

    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" /> 
        <EventID Qualifiers="0">1000</EventID> 
        <Level>2</Level> 
        <Task>100</Task> 
        <Keywords>0x80000000000000</Keywords> 
        <TimeCreated SystemTime="2014-04-01T23:13:53.000000000Z" /> 
        <EventRecordID>126257</EventRecordID> 
        <Channel>Application</Channel> 
        <Computer>uname</Computer> 
        <Security /> 
      </System>
      <EventData>
        <Data>bitcoin-qt.exe</Data> 
        <Data>0.9.0.0</Data> 
        <Data>51a93980</Data> 
        <Data>bitcoin-qt.exe</Data> 
        <Data>0.9.0.0</Data> 
        <Data>51a93980</Data> 
        <Data>c0000005</Data> 
        <Data>0000000000a28884</Data> 
        <Data>1374</Data> 
        <Data>01cf4df2e8d7d14e</Data> 
        <Data>E:\Bitcoin-0.9.0\bitcoin-qt.exe</Data> 
        <Data>E:\Bitcoin-0.9.0\bitcoin-qt.exe</Data> 
        <Data>4a2d0955-b9f3-11e3-bb66-002522d18708</Data> 
      </EventData>
    </Event>
    
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Windows Error Reporting" /> 
        <EventID Qualifiers="0">1001</EventID> 
        <Level>4</Level> 
        <Task>0</Task> 
        <Keywords>0x80000000000000</Keywords> 
        <TimeCreated SystemTime="2014-04-01T23:14:24.000000000Z" /> 
        <EventRecordID>126258</EventRecordID> 
        <Channel>Application</Channel> 
        <Computer>uname</Computer> 
        <Security /> 
      </System>
      <EventData>
        <Data>15393675</Data> 
        <Data>20</Data> 
        <Data>APPCRASH</Data> 
        <Data>Nicht verfügbar</Data> 
        <Data>0</Data> 
        <Data>bitcoin-qt.exe</Data> 
        <Data>0.9.0.0</Data> 
        <Data>51a93980</Data> 
        <Data>bitcoin-qt.exe</Data> 
        <Data>0.9.0.0</Data> 
        <Data>51a93980</Data> 
        <Data>c0000005</Data> 
        <Data>0000000000a28884</Data> 
        <Data /> 
        <Data /> 
        <Data>C:\Users\uname\AppData\Local\Temp\WERFD28.tmp.WERInternalMetadata.xml</Data> 
        <Data>C:\Users\uname\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_bitcoin-qt.exe_5418e4c31125a14228975943264c24c5ae049d_771274c7</Data> 
        <Data /> 
        <Data>0</Data> 
        <Data>4a2d0955-b9f3-11e3-bb66-002522d18708</Data> 
        <Data>0</Data> 
      </EventData>
    </Event>
    

    Windows error report:

    Version=1
    EventType=APPCRASH
    EventTime=130408676335983948
    ReportType=2
    Consent=1
    UploadTime=130408676337754049
    ReportIdentifier=4a2d0956-b9f3-11e3-bb66-002522d18708
    IntegratorReportIdentifier=4a2d0955-b9f3-11e3-bb66-002522d18708
    Response.BucketId=15393675
    Response.BucketTable=20
    Response.type=4
    Sig[0].Name=Anwendungsname
    Sig[0].Value=bitcoin-qt.exe
    Sig[1].Name=Anwendungsversion
    Sig[1].Value=0.9.0.0
    Sig[2].Name=Anwendungszeitstempel
    Sig[2].Value=51a93980
    Sig[3].Name=Fehlermodulname
    Sig[3].Value=bitcoin-qt.exe
    Sig[4].Name=Fehlermodulversion
    Sig[4].Value=0.9.0.0
    Sig[5].Name=Fehlermodulzeitstempel
    Sig[5].Value=51a93980
    Sig[6].Name=Ausnahmecode
    Sig[6].Value=c0000005
    Sig[7].Name=Ausnahmeoffset
    Sig[7].Value=0000000000a28884
    DynamicSig[1].Name=Betriebsystemversion
    DynamicSig[1].Value=6.1.7601.2.1.0.256.48
    DynamicSig[2].Name=Gebietsschema-ID
    DynamicSig[2].Value=1031
    DynamicSig[22].Name=Zusatzinformation 1
    DynamicSig[22].Value=2424
    DynamicSig[23].Name=Zusatzinformation 2
    DynamicSig[23].Value=2424212a5196a04dd7c8ce2b9d9782d7
    DynamicSig[24].Name=Zusatzinformation 3
    DynamicSig[24].Value=3a7e
    DynamicSig[25].Name=Zusatzinformation 4
    DynamicSig[25].Value=3a7e278a7e89fc74f9d32b4b23228af3
    UI[2]=E:\Bitcoin-0.9.0\bitcoin-qt.exe
    UI[3]=bitcoin-qt.exe funktioniert nicht mehr
    UI[4]=Windows kann online nach einer Lösung für das Problem suchen.
    UI[5]=Online nach einer Lösung suchen und das Programm schließen
    UI[6]=Später online nach einer Lösung suchen und das Programm schließen
    UI[7]=Programm schließen
    LoadedModule[0]=E:\Bitcoin-0.9.0\bitcoin-qt.exe
    LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
    LoadedModule[2]=C:\Windows\system32\kernel32.dll
    LoadedModule[3]=C:\Windows\system32\KERNELBASE.dll
    LoadedModule[4]=C:\Windows\system32\ADVAPI32.dll
    LoadedModule[5]=C:\Windows\system32\msvcrt.dll
    LoadedModule[6]=C:\Windows\SYSTEM32\sechost.dll
    LoadedModule[7]=C:\Windows\system32\RPCRT4.dll
    LoadedModule[8]=C:\Windows\system32\CRYPT32.dll
    LoadedModule[9]=C:\Windows\system32\MSASN1.dll
    LoadedModule[10]=C:\Windows\system32\GDI32.dll
    LoadedModule[11]=C:\Windows\system32\USER32.dll
    LoadedModule[12]=C:\Windows\system32\LPK.dll
    LoadedModule[13]=C:\Windows\system32\USP10.dll
    LoadedModule[14]=C:\Windows\system32\IMM32.dll
    LoadedModule[15]=C:\Windows\system32\MSCTF.dll
    LoadedModule[16]=C:\Windows\system32\IPHLPAPI.DLL
    LoadedModule[17]=C:\Windows\system32\NSI.dll
    LoadedModule[18]=C:\Windows\system32\WINNSI.DLL
    LoadedModule[19]=C:\Windows\system32\MSWSOCK.dll
    LoadedModule[20]=C:\Windows\system32\WS2_32.dll
    LoadedModule[21]=C:\Windows\system32\ole32.dll
    LoadedModule[22]=C:\Windows\system32\OLEAUT32.dll
    LoadedModule[23]=C:\Windows\system32\SHELL32.dll
    LoadedModule[24]=C:\Windows\system32\SHLWAPI.dll
    LoadedModule[25]=C:\Windows\system32\WINMM.dll
    LoadedModule[26]=C:\Windows\system32\CRYPTSP.dll
    LoadedModule[27]=C:\Windows\system32\rsaenh.dll
    LoadedModule[28]=C:\Windows\system32\CRYPTBASE.dll
    LoadedModule[29]=C:\Windows\system32\uxtheme.dll
    LoadedModule[30]=C:\Windows\system32\dwmapi.dll
    LoadedModule[31]=C:\Windows\system32\profapi.dll
    LoadedModule[32]=C:\Windows\System32\wship6.dll
    LoadedModule[33]=C:\Windows\System32\wshtcpip.dll
    LoadedModule[34]=C:\Windows\system32\ntmarta.dll
    LoadedModule[35]=C:\Windows\system32\WLDAP32.dll
    LoadedModule[36]=C:\Windows\system32\pcwum.dll
    LoadedModule[37]=C:\Windows\system32\mscoree.dll
    LoadedModule[38]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
    LoadedModule[39]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\perfcounter.dll
    LoadedModule[40]=C:\Windows\system32\pdh.dll
    LoadedModule[41]=C:\Windows\system32\MSVCR110_CLR0400.dll
    LoadedModule[42]=C:\Windows\system32\aspnet_counters.dll
    LoadedModule[43]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_perf.dll
    LoadedModule[44]=C:\Windows\system32\MSVCR100.dll
    LoadedModule[45]=C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_88e41e092fab0294\MSVCR80.dll
    LoadedModule[46]=C:\Program Files\Microsoft SQL Server\100\Shared\instapi10.dll
    LoadedModule[47]=C:\Program Files\Microsoft SQL Server\110\Shared\instapi110.dll
    LoadedModule[48]=C:\Windows\system32\CFGMGR32.dll
    LoadedModule[49]=C:\Windows\system32\NLAapi.dll
    LoadedModule[50]=C:\Windows\system32\napinsp.dll
    LoadedModule[51]=C:\Windows\system32\pnrpnsp.dll
    LoadedModule[52]=C:\Windows\system32\DNSAPI.dll
    LoadedModule[53]=C:\Windows\System32\winrnr.dll
    LoadedModule[54]=C:\Windows\system32\rasadhlp.dll
    LoadedModule[55]=C:\Windows\System32\fwpuclnt.dll
    LoadedModule[56]=C:\Windows\system32\dhcpcsvc6.DLL
    LoadedModule[57]=C:\Windows\system32\dhcpcsvc.DLL
    LoadedModule[58]=C:\Windows\system32\RpcRtRemote.dll
    LoadedModule[59]=C:\Windows\system32\CLBCatQ.DLL
    State[0].Key=Transport.DoneStage1
    State[0].Value=1
    State[1].Key=DataRequest
    State[1].Value=Bucket=15393675/nBucketTable=20/nResponse=1/n
    FriendlyEventName=Nicht mehr funktionsfähig
    ConsentKey=APPCRASH
    AppName=bitcoin-qt.exe
    AppPath=E:\Bitcoin-0.9.0\bitcoin-qt.exe
    
  2. laanwj commented at 6:21 AM on April 2, 2014: member

    It looks like the wallet.dat suddenly poof disappeared?

    wallet.dat: unable to flush: No such file or directory
    

    I saw this only once before, with a guy whose computer was was hacked. The hacker had copied (and for some reason removed, maybe to buy time while cracking the passphrase?) the wallet.

    I suggest checking your system very thoroughly, and making sure that you restore a backup (you do have a backup, do you?) on a secure system and send everything to a new wallet ASAP.

  3. dexX7 commented at 7:33 AM on April 2, 2014: contributor

    I reconstructed this: 1. broadcast a new transaction, 2. remove wallet.dat, 3. wait until transaction confirms. The exceptions were similar, so I'm sure this was indeed due to a non available wallet.dat file.

    The odd parts after thinking more about it: I have multiple wallets in the datadir and rename them before use. After the incident the wallet.dat was indeed missing, but one with the previous filename was there (I wasn't really aware of this earlier), timestamp of last change: the time when the transaction was initially broadcasted. I tested this "renamed" wallet immediately which lead to the "wallet.dat corrupt, salvage failed" dialog.

    After another test a few minutes ago: the corrupted wallet file is now accepted.

  4. laanwj closed this on Jul 31, 2014

  5. laanwj commented at 8:02 AM on July 31, 2014: member

    Issue seems solved.

  6. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me