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

Crash when adding password to a wallet #325

Closed
YoranBrondsema opened this issue Nov 16, 2013 · 22 comments
Closed

Crash when adding password to a wallet #325

YoranBrondsema opened this issue Nov 16, 2013 · 22 comments
Labels
Milestone

Comments

@YoranBrondsema
Copy link

Hi,

I'm using MultiBit on an OpenSuse Linux distribution with OpenJDK (JRE version: OpenJDK Runtime Environment (7.0_45-b31) (build 1.7.0_45-b31)). I tried adding a password to a wallet but when I click on the "Add password to wallet" button after having filled in a password, the JVM crashes with the following output.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f97ec7d06a0, pid=588, tid=140289289742080
#
# JRE version: OpenJDK Runtime Environment (7.0_45-b31) (build 1.7.0_45-b31)
# Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0x12d6a0]  __memcpy_ssse3+0x90
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/jvm-588/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted
@jim618
Copy link
Contributor

jim618 commented Nov 19, 2013

This looks like it might be an 'out of memory' error. When a password is added a copy of all the private keys is made (encrypted) and checked before being written to disk.
If there were a lot of addresses or the machine had little memory (or both) you could see something like this.

@Elrin
Copy link

Elrin commented Feb 17, 2014

I am having the same issue - on OpenSUSE 13.1, with Multibit 0.5.16 running java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (suse-24.13.5-x86_64), OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode).

I have tried re-installing Multibit and setting the password on the default wallet as the first action, same result. New wallet, same result. Restarted, same result.

I have 2.2GB free memory, so I doubt this is machine memory.

Here is my error log:

16:08:07.894 [main] INFO  o.m.ApplicationDataDirectoryLocator - Application data directory.1 = '/home/elrin/MultiBit' 
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f44cf525f49, pid=8765, tid=139931812620032
#
# JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0x8ff49]  __memcpy_sse2_unaligned+0x29
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/jvm-8765/hs_error.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


Warning: Program '/usr/bin/java' crashed.

@StephanRichter
Copy link

I also can confirm this (MultiBit 0.5.14 / OpenSUSE 13.1 / linux 3.11.6-4-desktop / openJDK 1.7.0_45

@mikehearn
Copy link

Can you guys try with the Oracle JVM and see if the issue goes away? This isn't an out of memory error, it's a null pointer dereference inside native code (most likely, inside the JVM itself).

SIGSEGV (0xb) at pc=0x00007f44cf525f49, pid=8765, tid=139931812620032

Also, attaching the hs_error.log file would be useful.

@anthonybrice
Copy link

I can confirm that running MultiBit with the Oracle JVM rather than OpenJDK fixed the issue on my Arch Linux install.

@gary-rowe
Copy link
Contributor

OK, I'll add some installation "gotcha" notes to the website to cover this. Thanks for reporting back about it :-)

@schulz89
Copy link

schulz89 commented Apr 7, 2014

I can confirm the bug on opensuse 13.1, with OpenJDK v. 1.7.0_51 .
Using Oracle JVM instead (v. 1.8.0-b132 ) I was able to enter my password before sending BTC without a segfault.

@gary-rowe
Copy link
Contributor

Since the general fix is to use Oracle's JVM and the website reflects this I'll close this.

@StephanRichter
Copy link

So your closing the bug without investigating the reason? That's called ignorance, is very bad practice and may become harmful at some point of time.

@mikehearn
Copy link

The bug is in OpenJDK not MultiBit, and nobody reported any hs_error.log files despite the request. So it doesn't seem to be a common issue.

@gary-rowe
Copy link
Contributor

Looks like Mike just beat me to it. To me this is clearly an issue deep within the JDK and outside of our control.

@mikehearn
Copy link

Stephan sent me an hs_error.log. The crash is inside libscrypt. Probably, falling back from a native scrypt to a pure Java one will make the error go away. As to why it's faulting, probably some binary incompatibility - Linux is crap at this and binaries compiled on one machine routinely crash or corrupt memory when run on other systems.

If you guys wanted to work around the issue, detecting Linux and using a Java scrypt is probably good enough. Linux users will get slower decryptions but that's probably acceptable.

@gary-rowe
Copy link
Contributor

Given that MBHD will come with its own JDK that is likely to be Oracle, and that MultiBit Classic users can work around with the Oracle JDK, it seems like a lot of effort for little return.

I'll reopen this issue so that we are reminded to test for it in MBHD.

@drizzt
Copy link

drizzt commented May 8, 2014

I found a workaround to avoid this crash.
Just compile multibit using last scrypt version (1.4.0) instead of 1.3.2 (pom.xml).
Then you have you define com.lambdaworks.jni.loader=nil in multilib.properties and it works!

EDIT
The simpler solution is to delete the libscrypt.so from the OFFICIAL .jar

zip -d "multibit-exe.jar" lib/x86_64/{freebsd,linux}/libscrypt.so

@joshcalafell
Copy link

The solution provided by drizzt worked for me, and I'm an Arch user. Thanks drizzt, i'm gonna follow your Git-Hub.

@gary-rowe
Copy link
Contributor

OK. Let's get this into the next release candidate and I'll add this to the site documentation.

We're pretty tied up with MBHD work at the moment so it may take a little while to update Classic.

If anyone is interested in testing the Linux installers for MBHD to verify correct operation please join the private beta group. I'll be adding private-beta-2 today.

@atrias
Copy link

atrias commented Jul 8, 2014

solution by drizzt also worked for me

[root@fedora MultiBit]# zip -d "multibit-exe.jar" lib/x86_64/{freebsd,linux}/libscrypt.so
deleting: lib/x86_64/freebsd/libscrypt.so
deleting: lib/x86_64/linux/libscrypt.so

Fedora 20

JRE version: OpenJDK Runtime Environment (7.0_60-b30) (build 1.7.0_60-mockbuild_2014_06_19_16_23-b00)

@mikehearn
Copy link

That solution is the one I suggested above, indeed.

@Vidreven
Copy link

My MultiBit also crashes after updating to OpenSUSE 13.2 when I try to enter the password. I have tried the solution given by @drizzt but it's not working. I get
zip warning: name not matched: lib/x86_64/freebsd/libscrypt.so
I tried unzipping the jar files but it doesn't tell me much. I do not understand the solution proposed by mikehearn. Any hints would be appriciated.

@Vidreven
Copy link

Vidreven commented Jan 5, 2015

Ok, the proposed solution works. You just have to be in the MultiBit install folder "/path/to/MultiBit-0.5.18".

@gary-rowe
Copy link
Contributor

Thanks for the update. I think it's worth adding this to the main site as an article so I've raised an issue accordingly.

@gary-rowe gary-rowe modified the milestone: Support Jun 18, 2015
@jim618 jim618 removed the support label Jul 20, 2015
@gary-rowe
Copy link
Contributor

Information is presented on every Linux download in the installation instructions. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests