Opened 7 years ago
Last modified 4 years ago
#1241 assigned defect
I2P-Bote: Crashes router / JVM on some systems
Reported by: | str4d | Owned by: | str4d |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | apps/plugins | Version: | 0.9.12 |
Keywords: | I2P-Bote heisenbug | Cc: | |
Parent Tickets: | Sensitive: | no |
Description
Installing the Bote plugin causes the I2P router and/or JVM to crash for some combinations of JRE and OS (but not all - I have never had this problem). Anyone who encounters this problem, please post the information from the top of http://127.0.0.1:7657/logs, along with any crash reports or logs.
Similar to #926, but probably not related.
Subtickets
Change History (10)
comment:2 Changed 7 years ago by
This and #1242 are two separate stack traces both dying at com.lambdaworks.crypto.SCrypt, This eliminates random causes like bad RAM.
From https://github.com/wg/scrypt it is clear that this library uses native code if available, so it's an scrypt problem or library issue or bug, not a JVM issue.
Inspecting the scrypt-1.3.3.jar bundled in bote, it contains native code (.so files) for x86_64 darwin, freebsd, and linux.
It's not clear if the .so contains all the scrypt code or is just a dynamic linker to the scrypt installed on your system.
At this point I'd recommend the bote developers start looking for fixes on scrypt forums/ mailing lists / new releases, etc.
For the OP, you may wish to try investigating if you have an installed scrypt library and if it is up to date. A possible workaround would be removing the .so file from the jar with a zip utility or finding some way to tell the library not to load the native code.
comment:3 Changed 7 years ago by
The native code included in scrypt.jar is the full SCrypt code (compiled from the C source in the repo).
I have updated the scrypt library to 1.4.0, which adds the ability to tell it what to use - the native code inside the .jar, native libraries on the system path, or the internal Java implementation. If anyone thinks they are having this problem, here is how to test for it:
0) Rename ~/.i2p/i2pbote/
(or your OS equivalent) (as a backup, although if you are having this problem then your current Bote config files have probably been broken by it)
1) Uninstall HH's Bote and install my dev build: http://str4d.i2p/builds/i2pbote.xpi2p
2) Open Bote and check that my build causes the same problem.
3) Stop I2P completely.
4) Edit wrapper.config
(in your I2P installation directory), and add the following line:
wrapper.java.additional.5=-Dcom.lambdaworks.jni.loader=nil
Change the number in this line so it is consecutive (comes after the earlier wrapper.java.additional.#
lines).
5) Start I2P.
6) Try using Bote - the problem should be gone (Bote might be a bit slow, because it will be using the Java implementation instead of native libraries).
If that works, next:
7) Install the scrypt library for your OS.
8) Stop I2P completely.
9) Edit the line you added to wrapper.config
- change nil
to sys
10) Start I2P.
11) Try using Bote - it should still work, but should be faster for e.g. changing passwords (which re-encrypts all files).
comment:4 Changed 7 years ago by
TheZeph on Irc2P has tested the above, confirms that nil
and sys
both fix the problem. His system:
I2P version: 0.9.12-0 Java version: Oracle Corporation 1.7.0_55 (OpenJDK Runtime Environment 1.7.0_55-b14) Wrapper version: 3.5.24 Server version: 8.1.14.v20131031 Servlet version: Jasper JSP 2.1 Engine Platform: Linux amd64 3.14.4-1-ARCH Processor: uninitialized (unrecognized) Jbigi: Locally optimized native BigInteger library loaded from file Charset: UTF-8 Encoding: UTF-8
comment:6 Changed 7 years ago by
The above case solved the issue by upgrading to OpenJDK 1.8. Since all other cases involved OpenJDK 1.7, this appears to be the fix. Perhaps there is a bug in OpenJDK 1.7 that causes problems with the particular JNI that the native SCrypt bundled in scrypt.jar was compiled against.
The next step on this ticket is to identify the bug and either recompile the native SCrypt, or disable it by default in OpenJDK 1.7.
comment:7 Changed 7 years ago by
Owner: | set to HungryHobo |
---|---|
Status: | new → assigned |
comment:8 Changed 6 years ago by
Keywords: | I2P-Bote heisenbug added; i2pbote removed |
---|
comment:9 Changed 4 years ago by
Owner: | changed from HungryHobo to str4d |
---|
comment:10 Changed 4 years ago by
Migrated to https://github.com/i2p/i2p.i2p-bote/issues - I will close these tickets as things are resolved rather than right now, but please make future comments on GitHub?.
When i2p-bote is installed (maybe only when running), my i2prouter seems to restart itself every 5-15 minutes. Many log files such as this one, this being most recent.
I2P version: 0.9.12-0
Java version: Oracle Corporation 1.7.0_51 (OpenJDK Runtime Environment 1.7.0_51-b31)
Wrapper version: 3.5.22
Server version: 8.1.14.v20131031
Servlet version: Jasper JSP 2.1 Engine
Platform: Linux amd64 3.13.6-porteus
Processor: Phenom / Athlon / Opteron Gen 3 (Barcelona/Agena/Toliman/Kuma?, 65 nm) (athlon64)
Jbigi: Locally optimized native BigInteger? library loaded from file
Encoding: UTF-8
Charset: UTF-8
hs_err_pid18688.log: