[Crash] bitcoin-qt.exe 0.13.2 Win64 in nowallet mode crashes on File->Exit #9746

issue kirillkovalenko openend this issue on February 12, 2017
  1. kirillkovalenko commented at 11:35 am on February 12, 2017: none

    Describe the issue

    Every time I use File->Exit the bitcoin-qt.exe instance crashes.

    Can you reliably reproduce the issue?

    Run bitcoin-qt.exe in nowallet mode using the following config

    par=6 txindex=1 dbcache=2048 lang=en_US checkblocks=72 maxmempool=512 rest=1 disablewallet=1 datadir=X:\Applications\Bitcoin\Data

    Select File-> Exit from main window or right click on the tray icon and select Exit from popup menu.

    What version of bitcoin-core are you using?

    Official 0.13.2 x64 from bitcoin.org

    Machine specs:

    • OS: Windows 10 1607 x64
    • CPU: AMD 8320
    • RAM: 12gb
    • Disk size: 1TB (480 GB free)
    • Disk Type (HD/SDD): HD

    Any extra information that might be useful in the debugging process.

    0.13.1 does not have this problem.

  2. jonasschnelli added the label Windows on Feb 12, 2017
  3. jonasschnelli commented at 1:33 pm on February 12, 2017: contributor
    Can you post the widows crash log here (crash details, maybe a stacktrace)? Can you also post your debug.log (should be in X:\Applications\Bitcoin\Data) via a pastbin site (maybe https://0bin.net)?
  4. kirillkovalenko commented at 4:21 pm on February 12, 2017: none

    The crash seems to be easy reproducible. I just reproduced it on another machine with a similar configuration. The crash is in the main thread, but there are no symbol files, I’m not sure if the dump helps you much. Are symbols available somewhere? The debug.log has nothing interesting imho. Below is the main thread call stack:

    bitcoin-qt.exe!0000000001c2535c()	Unknown
    bitcoin-qt.exe!0000000001c25e47()	Unknown
    bitcoin-qt.exe!0000000001c1481b()	Unknown
    bitcoin-qt.exe!0000000002086d54()	Unknown
    [External Code]	
    bitcoin-qt.exe!0000000000cb4532()	Unknown
    bitcoin-qt.exe!0000000000c7fb6c()	Unknown
    bitcoin-qt.exe!0000000000c747c4()	Unknown
    bitcoin-qt.exe!00000000020883ef()	Unknown
    bitcoin-qt.exe!0000000000c713b5()	Unknown
    bitcoin-qt.exe!0000000000c714c8()	Unknown
    [External Code]	
    
  5. kirillkovalenko commented at 4:29 pm on February 12, 2017: none
    I’ve just checked the 32bit build. It crashes as well.
  6. NicolasDorier commented at 6:46 am on February 14, 2017: contributor

    dropping it here, maybe unrelated, but I run master and indeed, if I CTRL+C the bitcoind process, it crashes:

    0terminate called after throwing an instance of 'std::bad_cast'
    1  what():  std::bad_cast
    
  7. laanwj commented at 1:09 pm on February 14, 2017: member

    @kirillkovalenko The gitian build process generates detached debug symbols (bitcoin-0.13.2-win64-debug.zip) however these are not uploaded because they are huge. To get them, you can follow the gitian build process and build the 0.13.2 release.

    If you have any use for bitcoin-qt.exe.dbg with detached DWARF symbol information I could send it to you.

    Anyhow I have the files and can look up the addresses, the problem is that I don’t know the base address in memory. I’d assume the pointers in your stack trace are relative to the start of the address space. Looking them up with the assumed .text address of 0x401000 gives me nonsense:

    00x0000000001c2535c: ?? at qwindowsservices.cpp:?
    10x0000000001c25e47: ?? at qwindowscontext.cpp:?
    20x0000000001c1481b: ?? at compressor.cpp:?
    30x0000000002086d54: ?? at crtexe.c:?
    40x0000000000cb4532: ?? at qstandarditemmodel.cpp:?
    50x0000000000c7fb6c: ?? at qpicture.cpp:?
    60x0000000000c747c4: ?? at qpen.cpp:?
    70x00000000020883ef: ?? at crtexe.c:?
    80x0000000000c713b5: ?? at qtextengine.cpp:?
    90x0000000000c714c8: ?? at qtextengine.cpp:?
    

    It’s probable that the address was randomized due to ASLR. If you can provide bitcoin-qt.exe’s load address I’ll retry…

  8. kirillkovalenko commented at 2:20 pm on February 14, 2017: none
    @laanwj I’ll try to get the module load address later today when I get home.
    I assume these DWARF symbols that you mentioned are not PDBs because it’s MinGW and I cannot use them with Visual Studio/WinDBG, right? What is the MinGW way to get decoded crash callstack provided that I have DWARF symbols?
  9. laanwj commented at 2:30 pm on February 14, 2017: member

    I know nothing about Visual Studio/WINDBG, I don’t know what debugging formats they support.

    What is the MinGW way to get decoded crash callstack provided that I have DWARF symbols?

    The GNU way is to run the program in gdb, then running bt when a crash occurs. The .exe has a so-called debug link section which refers to the dbg file. GDB will look for that automatically. There’s a command set debug-file-directory directories to configure where it looks for external debug information files.

    Externally, the utility addr2line can be used, the script I used to look up was:

    0for addr in 0000000001c2535c 0000000001c25e47 0000000001c1481b 0000000002086d54 0000000000cb4532 0000000000c7fb6c 0000000000c747c4 00000000020883ef 0000000000c713b5 0000000000c714c8; do
    1    x86_64-w64-mingw32-addr2line -afispe bitcoin-qt.exe.dbg $addr
    2done
    

    However for the output to make sense it needs to have loaded the executable at the location specified in the exe file, or applying an offset if the loading address is known. Maybe it’s possible to run it without ASLR to get an ‘unpolluted’ stack trace. E.g. many debuggers, including gdb, disable ASLR by default.

  10. kirillkovalenko commented at 12:21 pm on February 18, 2017: none

    I did a couple more tests. This time call stack a bit different, but I have module base adderss

    bitcoin-qt.exe 0.13.2.0 02.01.2017 09:54 00000000012C0000-00000000030AC000 [4760] bitcoin-qt.exe

    ntdll.dll!RtlVirtualUnwind() Unknown ntdll.dll!RtlDispatchException() Unknown ntdll.dll!KiUserExceptionDispatch() Unknown bitcoin-qt.exe!0000000001304532() Unknown bitcoin-qt.exe!00000000012cfb6c() Unknown bitcoin-qt.exe!00000000012c47c4() Unknown bitcoin-qt.exe!00000000026d83ef() Unknown bitcoin-qt.exe!00000000012c13b5() Unknown bitcoin-qt.exe!00000000012c14c8() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown

  11. kirillkovalenko commented at 2:36 pm on February 18, 2017: none
    I just compiled and tested the master. It crashes as well. bitcoin-qt.exe 0.14.99.0 18.02.2017 15:25 0000000000E70000-0000000002DCA000 [18680] bitcoin-qt.exe bitcoin-qt.exe!0000000000ebb6a2() Unknown bitcoin-qt.exe!0000000000e8163c() Unknown bitcoin-qt.exe!0000000000e74e84() Unknown bitcoin-qt.exe!000000000234cfeb() Unknown bitcoin-qt.exe!0000000000e713b5() Unknown bitcoin-qt.exe!0000000000e714c8() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown
  12. laanwj commented at 2:07 pm on February 21, 2017: member

    For the master I cannot look up addresses, as there is no “normative” executable and debug information.

    Thanks to the base address I was able to look up the 0.13.2 one though:

    00x0000000000444532: _ZN11WalletFrame14setClientModelEP11ClientModel at walletframe.cpp:38
    10x000000000040fb6c: _ZN10BitcoinGUI14setClientModelEP11ClientModel at bitcoingui.cpp:502
    20x00000000004047c4: _ZN18BitcoinApplication15requestShutdownEv at bitcoin.cpp:421
    30x00000000018183ef: main at bitcoin.cpp:676
    40x00000000004013b5: __tmainCRTStartup at crtexe.c:334
    50x00000000004014c8: WinMainCRTStartup at crtexe.c:186
    
  13. laanwj commented at 2:13 pm on February 21, 2017: member
    Fixed by #9817
  14. laanwj closed this on Feb 21, 2017

  15. DrahtBot locked this on Sep 8, 2021

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: 2024-11-17 18:12 UTC

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