Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
RachelPriss opened this issue Mar 13, 2016 · 27 comments
Closed

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

RachelPriss opened this issue Mar 13, 2016 · 27 comments
Labels

Comments

@RachelPriss
Copy link

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.

@maflcko
Copy link
Member

maflcko commented Mar 13, 2016

What does the crash look like? Is the splash screen just disappearing into nowhere or does an error message pop up?

@rebroad
Copy link
Contributor

rebroad commented Mar 13, 2016

Duplicate of #7639 (which was also on XP SP3)

@RachelPriss
Copy link
Author

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.

@jonasschnelli
Copy link
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.

@laanwj
Copy link
Member

laanwj commented Mar 14, 2016

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

@rebroad
Copy link
Contributor

rebroad commented Mar 14, 2016

still segfaults with -disablewallet

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

@laanwj
Copy link
Member

laanwj commented Mar 14, 2016

What about -connect=0.0.0.0?

@rebroad
Copy link
Contributor

rebroad commented Mar 14, 2016

-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 ?? ()

@rebroad
Copy link
Contributor

rebroad commented Mar 14, 2016

msvcrt.dll is File version: 7.0.2600.5512, md5 355edbb4d412b01f1740c17e3f50fa00

@laanwj
Copy link
Member

laanwj commented Mar 14, 2016

  • 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.

@lamar8
Copy link

lamar8 commented Mar 23, 2016

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 ?

@laanwj
Copy link
Member

laanwj commented Mar 23, 2016

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.

@lamar8
Copy link

lamar8 commented Mar 24, 2016

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)

    msvcrt!___unguarded_readlc_active_add_func() at 0x77c0330c  
    msvcrt!.badioinfo() at 0x77c2f964   
    0x14f83ef2  
    msvcrt!___unguarded_readlc_active_add_func() at 0x77c0356a  
    0x165024e0  
    msvcrt!___unguarded_readlc_active_add_func() at 0x77c03c1b  
    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

@laanwj
Copy link
Member

laanwj commented Mar 24, 2016

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

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

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

objdump -x bitcoin-qt.exe|grep DLL
...
        DLL Name: msvcrt.dll
...

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

@Mikestang
Copy link

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.

@laanwj
Copy link
Member

laanwj commented Mar 31, 2016

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)

@Mikestang
Copy link

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.

@lamar8
Copy link

lamar8 commented Apr 1, 2016

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.

@achow101
Copy link
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.

@theuni
Copy link
Member

theuni commented Apr 27, 2016

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

ubuntu@ubuntu:~/build/bitcoin/distsrc-x86_64-w64-mingw32/src/qt$ x86_64-w64-mingw32-nm -Cg bitcoin-qt.exe | grep "_s$"
0000000000d6c080 T png_get_sCAL_s
0000000000d74c90 T png_set_sCAL_s
0000000000d78bf0 T png_write_sCAL_s

@laanwj
Copy link
Member

laanwj commented Apr 28, 2016

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.

@maflcko
Copy link
Member

maflcko commented Apr 28, 2016

You can also try a lightweight OS instead, as suggested in #7681 (comment)

@tzofeolam
Copy link

tzofeolam commented May 6, 2016

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!

@laanwj
Copy link
Member

laanwj commented May 6, 2016

@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.

@Mikestang
Copy link

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.

@HenryBarton
Copy link

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.

@laanwj
Copy link
Member

laanwj commented Jul 29, 2016

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.

@laanwj laanwj closed this as completed Jul 29, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

12 participants