The situation
Problem is finally gone with 7u65 and 8u11 or higher!
When installing Magnolia on some OS / Java / Servlet Container combinations you might run into problems (e.g. - MAGNOLIA-5520Getting issue details... STATUS and - SUPPORT-1865Getting issue details... STATUS ).
Typcial symptoms:
- Browser reports dropped connection
- Some resources (e.g. images) of a page are not loaded
- JVM crashes -> a hs_err_pid*.log file is created
Caution: the first two (by far more frequent) are not visible in any console or log!
Scenarios
JRE | Server | OS X | Magnolia | Who | Lost network connections | Crash | Problematic frame | Java frames | Details | Remarks | Logs |
---|---|---|---|---|---|---|---|---|---|---|---|
1.7.0_10 | tomcat 6 | ? | 4.5.4 ee | Andreas | mostly | sometimes | C [libnet.dylib+0x715e] NET_Timeout+0x35a | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 | SUPPORT-1865 |
| |
1.7.0_11-b21 | tomcat 6 | 10.8.2 | 4.5.7 ce | Rich | mostly | mostly | C [libjava.dylib+0x9367] JNU_NewStringPlatform+0x1d3 | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 |
| ||
1.7.0_45-b18 | tomcat 6 | 10.8.5 | 5.2.1-SNAPSHOT | Tobias | C [libjava.dylib+0x9a2b] JNU_NewStringPlatform+0x1d3 | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 | upon installation | hs_err_pid_tc6_mgnl5.2.1-SNAPSHOTce.log | |||
1.7.0_45b18 | tomcat 6 | 10.8.5 | 4.5.11/12 ce + ee | Will | mostly | mostly | C [libjava.dylib+0x9a20] JNU_NewStringPlatform+0x1c8 | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 | upon installation | hs_err_pid_tc6_mgnl4.5.11ee.log
| |
1.7.0_11-b21 | tomcat 7 | 10.8.5 | 5.2 CE | Tobias | mostly | rarely | C 0x000000053f9d6dbe | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 |
| ||
1.8.0-ea-b118 | tomcat 7 | 10.8 | 5.2 CE | Daniel | mostly | sometimes | V [libjvm.dylib+0x2f6d59] jni_SetByteArrayRegion+0x7c or C [libnet.dylib+0x8eb5] Java_java_net_SocketInputStream_socketRead0+0x243 | java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 | upon startup | the problem remains with Java 8! | |
1.7.0_45b18 | JBoss AS 7.1.1 | 10.8.5 | 5.2 CE | Daniel | mostly | none yet | |||||
1.7.0_45b18 | jetty 9 | 10.8 | 5.2 CE | Daniel | no | no | |||||
1.7.0_45b18 | tomcat 8.0.0-rc5 | 10.8 | 5.2 CE | Daniel | no | no |
Findings
From what we know right now (see scenarios above) we think those crashes are:
- related to Tomcat version 6 & 7 - doesn't happen with Jetty 9
- shows on JBoss AS 7.1.1 as well (bases on Tomcat 7.0.13)
- not related to a specific JRE 7 or 8 version (from 1.7.0_10 to latest 1.7.0_45 - even 1.8.0-ea-b118 had it)
- not related to a specific Magnolia version (we have reports from various 4.5 versions as well as 5.x - both ce and ee)
- not related to magnolia.update.auto=true (had been one of the suspicions)
- more likely to appear when starting up instance right after installation (waiting few mins seems to sometimes "cure" the problem)
Additional information
Possibly related issues
System | Issue | Remark |
---|---|---|
openjdk 7u21 | JDK-8024045 | same Java frame in error log: java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 |
openjdk 7u40 | JDK-8028313 | same Java frame in error log: java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 |
Lucene/Solr | solr-core test failure on OSX | same Java frame in error log: java.net.SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I+0 |
6 Comments
Tobias Mattsson
This question on Stackoverflow matches what we see for dropped connections, it also links to a bug in OpenJDK that is fixed and targeted for 7u60.
http://stackoverflow.com/questions/16191236/tomcat-startup-fails-due-to-java-net-socketexception-inv...
https://bugs.openjdk.java.net/browse/JDK-8021820
Tobias Mattsson
I have just tested on the latest early access build, 7u60_ea_build_3, and I have no dropped connections.
The latest build can be downloaded here https://jdk7.java.net/download.html
I can't find a release date for u60 but u55 is scheduled for 2014-04-14 and u65 is scheduled for 2014-07-14.
Still need to confirm if this build still suffers from the crashes we're seeing.
Andreas Antener
Hi Tobias
I did a quick test with u51 and the u60-ea. I also get no dropped connections anymore with u60 but it eventually crashes as well. Using Magnolia CE 4.5.12 bundled webapp:
BTW: Did anyone try to figure out if the problem can be tracked down to a single library Magnolia uses? I'm asking because Will figured out that the problem does not occur when using the "empty webapp" only ( MAGNOLIA-5520 - Getting issue details... STATUS ).
Tobias Mattsson
Sad, apparently there's still bugs in there they haven't found. The only clue I have right now is this comment on JDK-8024045 "This issue appears to be related to native memory corruption, most likely due to a MAC libC runtime bug." There used to be an issue that I suspected was the cause where OS X would return UTF-8 encoded error strings that crashed the VM when it tried to create exception messages not expecting it to be UTF-8, but that's been fixed now too.
Daniel Lipp
Hi Andreas,
up to know we thought the crashes are a potential consequence of the dropped connections. We never had combination of OS + server where we got crashed but no dropped connection.
So thx for sharing your results - looks like we have to investigate again. In case you have further hints how to provoke the crashes it'd be great if you can share...
Cheers
Daniel
Vivian Steller
This finally means we Mac users can work with Java 1.7 and Magnolia? No more VMs around to run Magnolia? This is a great day for the Magnolia community