VMware Communities
mvitalo
Contributor
Contributor

Java 7 crashes on OS X Lion (10.7) guest

Hi all,

Not so new VMware Fusion user but new to the community.  My setup:

  • Host
    • OS X 10.7.5 on MacBook Pro
    • VMware Fusion 5.0.1
  • Guest
    • OS X 10.7.5
    • VMware Tools 9.2.1.16070 (build-818201)
    • Java 7 Update 9

I sometimes need to use Network Connect in my OS X VM to connect to my data center VPN (my host is connected to the corporate VPN).  This has worked very well unto Apple release the Java 6 2012 006 update and removed the browser plugin (see http://support.apple.com/kb/HT5493).  I have a snapshot saved with an older version of Java installed and that still works fine.  But... I figured I might as well update to Java 7 since that works well on my host.  Unfortunately with Java 7 Update 9 installed, Network Connect won't run in my guest OS X.  In fact, I can't even open the Java Control Panel in my guest OS.

I see some chatter about this but no solutions or hope for this to work.  Is Java 7 just not going to work inside of a virtual machine?  Whose fault is that?  Who do I appeal to?

Thanks for any advice!

Crash snippit for Network Connect

Process:         java [280]

Path:            /usr/bin/java

Identifier:      net.java.openjdk.cmd

Version:         1.0 (1.0)

Code Type:       X86-64 (Native)

Parent Process:  PluginProcess [277]

PlugIn Path:       /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/server/libjvm.dylib

PlugIn Identifier: libjvm.dylib

PlugIn Version:    ??? (???)

Date/Time:       2012-10-20 13:48:13.219 -0400

OS Version:      Mac OS X 10.7.5 (11G63b)

Report Version:  9

Crashed Thread:  27  Java: Java2D Queue Flusher

Exception Type:  EXC_BAD_ACCESS (SIGABRT)

Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000003b0

VM Regions Near 0x3b0:

-->

    __TEXT                 0000000100b05000-0000000100b16000 [   68K] r-x/rwx SM=COW  /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

Log snippit for Java Control Panel

10/20/12 1:46:06.086 PM     [0x0-0x11011].com.apple.systempreferences     /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/jcontrol: line 116: [: too many arguments
10/20/12 1:46:06.086 PM     [0x0-0x11011].com.apple.systempreferences     /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/jcontrol: line 120: [: -Xdock:icon=/Library/Internet: binary operator expected
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # A fatal error has been detected by the Java Runtime Environment:
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #  SIGSEGV (0xb) at pc=0x00007fff926760fb, pid=259, tid=31503
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # JRE version: 7.0_09-b05
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.5-b02 mixed mode bsd-amd64 compressed oops)
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # Problematic frame:
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # C  [libGL.dylib+0x20fb]  glGetString+0xf
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # An error report file with more information is saved as:
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # /var/folders/3d/2ht9_r5j4yv0y9pyflw2crhc0000gn/T//hs_err_pid259.log
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # If you would like to submit a bug report, please visit:
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #   http://bugreport.sun.com/bugreport/crash.jsp
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # The crash happened outside the Java Virtual Machine in native code.
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     # See problematic frame for where to report the bug.
10/20/12 1:46:06.933 PM     [0x0-0x11011].com.apple.systempreferences     #
10/20/12 1:46:07.640 PM     vmsvc     [ warning] [timeSync] Unable to synchronize time.
10/20/12 1:46:07.915 PM     [0x0-0x11011].com.apple.systempreferences     /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/jcontrol: line 103:   259 Abort trap: 6           "${java_home}"/java -Xbootclasspath/a:"${java_home}"/../lib/deploy.jar "${_JCP_DOCK_NAME}" "${_JCP_DOCK_ICON}" ${_JAVA_VM_OPTIONS} com.sun.deploy.panel.ControlPanel
10/20/12 1:46:08.786 PM     ReportCrash     Saved crash report for java[259] version 1.0 (1.0) to /Users/michael/Library/Logs/DiagnosticReports/java_2012-10-20-134608_Michaels-Mac.crash
0 Kudos
56 Replies
thorsfall
Contributor
Contributor

Any further progress on this issue Darius?

Thanks for all the time you spend supporting those of us that need to run OSX as a guest.  I for one greatly appreciate it, thank you!

0 Kudos
dariusd
VMware Employee
VMware Employee

Hi thorsfall, and welcome to the VMware Communities!

Regrettably, I have no tangible progress to report.  I'm collecting information on the issue, and will probably end up filing a bug report with Oracle.

Thanks for your patience and kind words!

--

Darius

0 Kudos
thorsfall
Contributor
Contributor

I'm not sure if it's been mentioned earlier in this thread, but there is an OTN discussion that covers this issue.  Unfortunately no buy-in from Oracle yet.

https://forums.oracle.com/forums/thread.jspa?threadID=2477369&tstart=0

0 Kudos
sbg
Contributor
Contributor

I tested with the latest version of everything: Fusion 5.0.3/ OSX 10.8.3 guest and Java 1.7 - no change/ control panel still crashes.

Thx

0 Kudos
thorsfall
Contributor
Contributor

I've submitted this as a Bug to Oracle, after reproducing it on Java 7u17. Their response and Bug ID:

We have determined that this report is a new bug and entered the bug into our internal bug tracking system under Bug Id: 9001114.
You can monitor this bug on the Java Bug Database at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001114.

(The URL above wasn't active yet when I tried it today.)

0 Kudos
dariusd
VMware Employee
VMware Employee

Hi everyone,

I've prepared a workaround for this Java issue, and have posted it here:

The script attached to that document will patch the Java Runtime Environment (JRE) to address the specific issue described here – a crash of a Java application inside an OS X guest with "KERN_INVALID_ADDRESS at 0x00000000000003b0".  If you have a "similar looking" issue and the script installs but doesn't fix it, please post it as a new thread, not as a continuation to this one.

If you have feedback on the script (particularly if it won't install or doesn't address the issue), please comment on that document.

Note that the workaround only works on OS X 10.8 guests for now... It successfully installs on OS X 10.7 guests and prevents the crash, but Java windows and frames do not display any content.  I currently don't plan to address that unless there is still significant demand for OS X 10.7 + Java 7 support.

I acknowledge and appreciate the assistance of the beta-testers who checked this script for me – Hopefully I didn't introduce any problems since then with my most recent round of cleanup...

Thanks for your patience.  I look forward to hearing your feedback!

Cheers,

--

Darius

0 Kudos
sbg
Contributor
Contributor

Hi Darius,

    I installed your fix on my 10.8.3 guest and it works perfectly!!

Thanks for the good work!

0 Kudos
generalzod
Contributor
Contributor

Any speculation on why the patch doesn't completely solve everything for OS 10.7?  Is something else crashing there that works fine in OS 10.8?

0 Kudos
dariusd
VMware Employee
VMware Employee

Some really wild guesses: The capabilities of the software 3D renderer on 10.7 might be different from that on 10.8, or a different pixel format might end up being used on 10.7 and it breaks an assumption somewhere else in the Java codebase.  Lots of possibilities...

Cheers,

--

Darius

0 Kudos
djohnsonmediaoc
Contributor
Contributor

Darius, we're mainly interested in running 10.7 in VMs. So if you have the opportunity, getting your patch to work on 10.7 would be appreciated. Thank you for your efforts so far.

Thorsfall, thanks for raising w/ Oracle.

0 Kudos
ColoradoMarmot
Champion
Champion

I love it - Oracle can't/won't fix it, but VMWare does.

Well done! 🙂

0 Kudos
dariusd
VMware Employee
VMware Employee

In all fairness, Oracle was only notified of the problem very recently.  It took me long enough to find the root cause, and then I promptly realized that I could produce a quick patch to address it right away...  At least that will tide many of us over until Oracle does fix it.  This patch is not a substitute for a fix, and its existence is not meant to imply any tardiness on behalf of Oracle.

--

Darius

0 Kudos
ColoradoMarmot
Champion
Champion

Assuming that Oracle does fix it - they have their hands full at the moment with security bugs :-).  I recall a post earlier in the thread indicating that it's already been fixed for other platforms, just not OSX.

0 Kudos
dariusd
VMware Employee
VMware Employee

Yeah, the direct cause of the horrible native application crash was fixed for other platforms (see my post here, which I assume is the one you are thinking of), but fixing that is somewhat tangential to truly addressing the problem...  That fix just changes it from a crash in a native library to a null-pointer exception in Java code, which is an oh-so-fractionally cleaner way for it to crash.  Unless I'm misunderstanding it, all of these shenanigans are due to the JRE demanding hardware acceleration and not getting it when running in a VM, which is a problem they'll need to specifically tackle anew and is specific to the Mac OS platform.  It might even have been an explicit design choice to require hardware acceleration, in which case we're up the proverbial creek...

Cheers,

--

Darius

0 Kudos
mvitalo
Contributor
Contributor

Thanks, dariusd!

Patch worked for me.

-Original poster

0 Kudos
ColoradoMarmot
Champion
Champion

Interesting - that would mean that they assume that all computers running java can do acceleration.

I'm not sure that's valid - there's a ton of older corporate hardware out there (where most java lives) that don't have 3d capabilities.

Or maybe they just assume all Mac's can do it?

0 Kudos
dariusd
VMware Employee
VMware Employee

The CGLGraphicsContext stuff at the heart of this issue is specific to the Mac platform (WGLGraphicsContext is for Win32 and GLXGraphicsContext is for *nix), so it's only the JRE's Mac platform-specific code that makes this assumption.  I think the end result will be fine for all Mac systems as long as they are not booted in Safe Mode.

--

Darius

0 Kudos
ColoradoMarmot
Champion
Champion

Ahh, ok - thanks!

0 Kudos
dariusd
VMware Employee
VMware Employee

Hi djohnsonmediaocean, and welcome to the VMware Communities!

I have put some more effort into this, but I remain unable to find any configuration which will allow the Java 7 runtime to display correctly in Mac OS 10.7.x... It's quite possible that Java 7 is truly dependent on host hardware acceleration on Mac OS 10.7 – or that the software renderer in Mac OS 10.7 might not have the capabilities provided by that in Mac OS 10.8 – leaving our workaround with no chance of success.

I'm not an expert in OpenGL and I didn't exhaustively try all possible configurations, but everything I tried ended in failure (the original crash, or empty windows).

Sorry!

Cheers,

--

Darius

0 Kudos
dariusd
VMware Employee
VMware Employee

Good to hear that, mvitalo.  I felt a little bit guilty posting a 10.8-only workaround in a thread which you started regarding Mac OS 10.7, but I wagered that many folks would have upgraded in the intervening 5.5 months, and it'd be better to have the workaround available for those who could use it than to hold on until a 10.7 workaround was available (if that ever happens).

And thanks for an awesome first post: I love it when a problem is calmly presented in such great detail.  Appreciated!  :smileycool:

Cheers,

--

Darius

0 Kudos