Bitcoin Core 0.12.0 randomly crashes at launch on WinXP SP3 #7674

issue RachelPriss openend this issue on March 13, 2016
  1. RachelPriss commented at 11:08 am on March 13, 2016: none

    Here’s a debug.log fragment:

    http://pastebin.com/u14vGP5z

    Sometimes the app don’t crash and running normally. But mostly not.

    Previous version (0.11.2) works fine.

  2. jonasschnelli added the label Windows on Mar 13, 2016
  3. MarcoFalke commented at 12:05 pm on March 13, 2016: member
    What does the crash look like? Is the splash screen just disappearing into nowhere or does an error message pop up?
  4. rebroad commented at 12:27 pm on March 13, 2016: contributor
    Duplicate of #7639 (which was also on XP SP3)
  5. RachelPriss commented at 12:28 pm on March 13, 2016: none

    Always appears the standart windows message: “application will be closed, blah blah blah”.

    Exception Information Code: 0xc0000005 Flags: 0x00000000 Record: 0x0000000000000000 Address: 0x0000000077c23509

    Sometimes it happens during splash screen, sometimes right after the main window opens.

  6. jonasschnelli commented at 8:02 am on March 14, 2016: contributor

    @coinyBit2

    Could you start Bitcoin-Qt.exe (or bitcoind.exe) with gdb.exe? (You can download GDB here: http://www.equation.com/servlet/equation.cmd?fa=gdb).

    Run gdb.exe bitcoin-qt.exe Once GBD has loaded, type r.

    Then wait until it crashes and pastebin the output somewhere.

    And maybe you could also post your debug.log on pastebin.com.

  7. laanwj commented at 9:27 am on March 14, 2016: member

    To rule out some new/changed functionality:

    • Can you try with -listenonion=0
    • Can you try with -connect=0.0.0.0 (you won’t get any connections, but does it crash?)
    • Can you try with -connect=<node> where <node> is an active node
    • Can you try with -disablewallet
  8. rebroad commented at 10:39 am on March 14, 2016: contributor

    still segfaults with -disablewallet

    also segfaults with -disablewallet -listenonion=0 -connect=192.168.42.69

  9. laanwj commented at 10:43 am on March 14, 2016: member
    What about -connect=0.0.0.0?
  10. rebroad commented at 10:48 am on March 14, 2016: contributor

    -connect=0.0.0.0 also segfaults.

    Running with gdb gives:-

    Starting program: /cygdrive/c/Program Files/Bitcoin/daemon/bitcoind [New Thread 5340.0x12e8] [New Thread 5340.0x17b0] [New Thread 5340.0xf40] [New Thread 5340.0xaa0] [New Thread 5340.0x8a8] [New Thread 5340.0x1218] [New Thread 5340.0x51c] [New Thread 5340.0xfc4] [New Thread 5340.0x308] [New Thread 5340.0x15d0] [New Thread 5340.0xdc8] [Thread 5340.0xf40 exited with code 0] [Thread 5340.0xdc8 exited with code 0] [Thread 5340.0x17b0 exited with code 0] [New Thread 5340.0x238] [New Thread 5340.0x944] [New Thread 5340.0x65c] [New Thread 5340.0x134c] [New Thread 5340.0xab4] [New Thread 5340.0x1170] [New Thread 5340.0xe80] [New Thread 5340.0xc18] [New Thread 5340.0xaac] [New Thread 5340.0x364] [New Thread 5340.0x115c] [New Thread 5340.0x234] [New Thread 5340.0x328] [New Thread 5340.0x1720]

    Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 5340.0xe80] 0x77c33509 in msvcrt!___unguarded_readlc_active_add_func () from /cygdrive/c/WINDOWS/system32/msvcrt.dll (gdb) bt #0 0x77c33509 in msvcrt!___unguarded_readlc_active_add_func () from /cygdrive/c/WINDOWS/system32/msvcrt.dll #1 0x00000000 in ?? ()

  11. rebroad commented at 10:56 am on March 14, 2016: contributor
    msvcrt.dll is File version: 7.0.2600.5512, md5 355edbb4d412b01f1740c17e3f50fa00
  12. laanwj commented at 12:31 pm on March 14, 2016: member
    • You’ve also tried with -server=0? (this is the default for the UI, but you may be overriding it)
    • What about using bitcoind.exe instead of bitcoin-qt.exe - is this GUI specific?

    It may be that the new version of mingw that is used to compile the release no longer properly supports XP. Version 0.12.x is compiled in a Ubuntu 14.04 VM instead of 12.04. Someone enterprising could try to cross-compile 0.12 on Ubuntu 12.04 and see if that improves things.

  13. lamar8 commented at 5:04 am on March 23, 2016: none
    I compiled 0.12.0 on win 7 using mingw4.9 and qt 5.3.2. it got the same problem on Win XP(also crashed at msvcrt.dll).But after using “-listenonion=0” ,it works quite well excpet shutting down(not always).So I guess it maybe not because of cross compile in Ubuntu 14.04. Could anyone make further tests and fix it ?
  14. laanwj commented at 10:24 am on March 23, 2016: member

    But after using “-listenonion=0” ,it works quite well excpet shutting down(not always)

    Can you get a proper backtrace? (‘bt’ in gdb) after a crash? Previous ones have only mentioned the topmost function, while what we need is to know where the crash originates in application code.

  15. lamar8 commented at 1:55 pm on March 24, 2016: none

    I configured ‘–enable-debug’ and compiled bitcoin-qt.exe on winXP directly, gdb with IDE(eclipse for c++),but failed to locate the additional source code,the result is :

    Thread #9 0 (Suspended : Signal : SIGSEGV:Segmentation fault)

    0    msvcrt!___unguarded_readlc_active_add_func() at 0x77c0330c  
    1    msvcrt!.badioinfo() at 0x77c2f964   
    2    0x14f83ef2  
    3    msvcrt!___unguarded_readlc_active_add_func() at 0x77c0356a  
    4    0x165024e0  
    5    msvcrt!___unguarded_readlc_active_add_func() at 0x77c03c1b  
    6    0x0 
    

    I also tried “ollydbg”, but still failed. It seems related to setlocal() function in msvcrt.dll. I don’t know how to add conditional break point to stop before it crash wihie it’s called too frequent

  16. laanwj commented at 2:12 pm on March 24, 2016: member

    That’s unfortunate. Without knowing where the call comes from there is very little to do.

    These are some pointers when googling for crashes in that function, maybe useful to someone:

    Note that the last item, Tor Browser Bundle’s gitian has a workaround to link against msvcrt100.dll instead of msvcrt.dll

    0  # We don't want to link against msvcrt.dll due to bug 9084.
    1  i686-w64-mingw32-g++ -dumpspecs > msvcr100.spec
    2  sed 's/msvcrt/msvcr100/' -i msvcr100.spec
    

    And it seems we link against msvcrt.dll as well, not msvcr100:

    0objdump -x bitcoin-qt.exe|grep DLL
    1...
    2        DLL Name: msvcrt.dll
    3...
    

    I don’t have time to investigate this further, but maybe this helps someone.

  17. Mikestang commented at 7:18 pm on March 30, 2016: none
    I am experiencing this exact same issue on my XP machine, if there is data I can provide from my setup that would be helpful in developing a fix for this I would like to help.
  18. laanwj commented at 9:24 am on March 31, 2016: member

    I am experiencing this exact same issue on my XP machine, if there is data I can provide from my setup that would be helpful in developing a fix for this I would like to help.

    Have you tried passing -listenonion=0, seems to work for at least one person #7674 (comment)

  19. Mikestang commented at 3:59 am on April 1, 2016: none
    Tried it both in a .conf file and launched from the command line and it still crashed crashed crashed. Oh well, stuck with 0.11.2 I guess.
  20. lamar8 commented at 8:10 am on April 1, 2016: none
    There exists a bug in msvcrt.dll, setlocal() function. It crashed at the same stack as the above google results. so it can be solved by linking msvcrt100.dll or avoid this bug like previous releases.
  21. achow101 commented at 6:45 pm on April 27, 2016: member
    @coinyBit2 Everyone who does gitian builds build all of the versions. There is no one person who just does Windows stuff or is in charge of windows builds. Since this problem is limited to XP, which has reached its EOL, no one has fixed it yet and it has not been deemed a high priority by the other developers because the issue is not seen in any other version of windows.
  22. theuni commented at 7:44 pm on April 27, 2016: member

    I don’t think it’s the same bug as tor’s:

    0ubuntu@ubuntu:~/build/bitcoin/distsrc-x86_64-w64-mingw32/src/qt$ x86_64-w64-mingw32-nm -Cg bitcoin-qt.exe | grep "_s$"
    10000000000d6c080 T png_get_sCAL_s
    20000000000d74c90 T png_set_sCAL_s
    30000000000d78bf0 T png_write_sCAL_s
    
  23. laanwj commented at 10:41 am on April 28, 2016: member

    Who is compiling the Windows version? Has this been brought to this individuals attention yet?

    There is no one interested in maintaining Windows XP support, you’re on your own here. At some point the price of buying new hardware/software is lower than the value of the time you’ll spend on getting something to work.

  24. MarcoFalke commented at 11:27 am on April 28, 2016: member
    You can also try a lightweight OS instead, as suggested in #7681 (comment)
  25. tzofeolam commented at 1:17 pm on May 6, 2016: none

    With information found by lamar8 and following discussion in the QT project forum it seems to be a QT library issue only. https://forum.qt.io/topic/62162/qt-5-6-doesn-t-compatible-with-windows-xp/11 According to that discussion there is a workaround. The workaround is building QT with DirectWrite disabled (as in QT 5.5), i.e. build QT with -no-directwrite flag.

    Indeed, bitcoin-qt.exe of Bitcoin Core 0.11.2 is linked with QT 5.5.0 and it works properly on Windows XP SP3 32bit.

    Besides the workaround there is a real fix in the QT code. Take a look at their already fixed QTBUG-50188 bug report: https://bugreports.qt.io/browse/QTBUG-50188 and the commit itself: https://codereview.qt-project.org/#/c/144954/

    I don’t know which QT version is used in Bitcoin Core 0.12.x but updating it to the latest or making a custom QT build with -no-directwrite flag should fix the bitcoin-qt.exe crashes on Windows XP.

    Please use one of the above solutions. Windows XP is not dead yet!

  26. laanwj commented at 1:46 pm on May 6, 2016: member

    @tzofeolam Interesting, thanks for figuring that out! But unfortunately, Bitcoin Core 0.12 is also linked against Qt 5.5.0. The MinGW version did change, so it is possible that that automatically toggled -directwrite behavior.

    Bumping Qt on master has to happen before the 0.13 release (and if it really fixes this issue it could be be backported to 0.12) but as the latest official release of Qt is 5.6.0, that could only make it worse in that regard.

    In any case it’d be useful to experiment with that.

  27. Mikestang commented at 12:00 pm on May 8, 2016: none
    Well that is good news for us XP users, now I can only hope this gets incorporated into the next version because I am not savvy enough to employ any of those Qt fixes myself.
  28. HenryBarton commented at 4:12 am on July 17, 2016: none
    I cannot make the 0.12.x series run on Windows XP SP3, nor will 0.11.2 run for long. The best luck I’ve had is with 0.10.3, but it keeps crashing at length with a message about “Expression: hashPrevBlock == view.GetBestBlock()”. This is reported to be in main.cpp, line 1660.
  29. laanwj commented at 9:59 am on July 29, 2016: member

    Closing this issue: No one with an interest in bringing back XP compatibility showed enough initiative in the time frame available. Windows XP is no longer supported as of 0.13:

    Compatibility

    Microsoft ended support for Windows XP on April 8th, 2014, an OS initially released in 2001. This means that not even critical security updates will be released anymore. Without security updates, using a bitcoin wallet on a XP machine is irresponsible at least.

    In addition to that, with 0.12.x there have been varied reports of Bitcoin Core randomly crashing on Windows XP. It is not clear what the source of these crashes is, but it is likely that upstream libraries such as Qt are no longer being tested on XP.

    We do not have time nor resources to provide support for an OS that is end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are suggested to upgrade to a newer verion of Windows, or install an alternative OS that is supported.

    No attempt is made to prevent installing or running the software on Windows XP, you can still do so at your own risk, but do not expect it to work: do not report issues about Windows XP to the issue tracker.

  30. laanwj closed this on Jul 29, 2016

  31. MarcoFalke 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-09-29 04:12 UTC

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