-
Notifications
You must be signed in to change notification settings - Fork 145
disable jni version #8
Comments
Hi, it's a really kludgy solution but you could probably use reflection to set SCrypt.native_library_loaded to false. Could you share the parameters you're passing when this crash happens? I'd certainly like to find and fix the problem, assuming it's not something to do with that really old OpenJDK build. |
Hi wg, I am struggling to isolate the issue. I will for sure let you know if I have narrowed it down. But what do you mean by "old" OpenJDK ;) It's the current version on aws linux ami's as well as the next debian release (wheezy, not current stable!). In any case, it would be great to have a non-kludgy way of switching to pure java impl. |
here below is how to reproduce. I used v 1.3.2, but it crashes also with 1.3.3. I can reproduce it also on an amazon linux ami, which is similar to RHEL 5 (or 6? anyway, same jvm as above). I know, the parameters are not very meaningful. They were given in some testcode where the MCF was some crap. But still, crashing the VM because of that ... I spent almost a day to figure out if it is something serious or not. sm@debian64sim:/tmp$ cat >A.java import com.lambdaworks.crypto.SCrypt; public class A {
} |
Thanks! I was able to reproduce your crash with 1.3.2, but not with 1.3.3. Prior to 1.3.3 there was a bug that allowed invalid N parameters (1 in your case). Could you double check the results on 1.3.3? |
right! I must have made a mistake when trying 1.3.3 :( So, issue clesed. thanks |
Awesome, glad to hear it! |
Hi,
when using scrypt from the maven repo, I have a crash on a debian 64 bit system. I have a strong suspicion that it is related to the jni libs (see below). Since deplyment of sefbuild jars is not so easy in my case, I would prefer to just enforce the pure java version, disabling the native libs. Is there a way to easiliy do that?
----------details---------------
sm@debian64sim:
$ java -version$ uname -ajava version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
sm@debian64sim:
Linux debian64sim 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
sm@debian64sim:~$ doTheCodeThatCrashes
*** glibc detected *** /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: double free or corruption (!prev): 0x0000000002f20d40 ***
======= Backtrace: =========
/lib/libc.so.6(+0x71e16)[0x7f260fe08e16]
/lib/libc.so.6(cfree+0x6c)[0x7f260fe0db8c]
/tmp/scrypt4590374583790695139lib(crypto_scrypt+0x4e1)[0x7f2608a6f1d1]
/tmp/scrypt4590374583790695139lib(scryptN+0xee)[0x7f2608a6f37e]
[0x7f260a99ed28]
======= Memory map: ========
...
The text was updated successfully, but these errors were encountered: