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
MacsRule
Hot Shot
Hot Shot

Michael wrote:

...In fact, I can't even open the Java Control Panel in my guest OS...

No advice but I can confirm the same behavior with Oracle's Java Control Panel in a 10.8.2 guest.

0 Kudos
mickywi
Contributor
Contributor

I am also having the same issue.

Macbook Pro 10.7.5

VM 10.7.5

Upgraded to the latest Java, and now can't run Network Connect, or the system preferences java pane.

0 Kudos
mickywi
Contributor
Contributor

I was able to get Network Connect working again by following this:

it worked for me.
0 Kudos
vaxman
Contributor
Contributor

This is still broke for OS X MountainLion 10.8.2 --trying to use Java7u6 will result in a security error.  Upgrading to Java7u9 will result in a crash when opening the Java preferences (and the JRE won't launch applets).  The error appears in a stack-frame involving OpenGL which makes me think it is related to VMware Fusion 5 and not OS X.

0 Kudos
generalzod
Contributor
Contributor

The same crash happens with VirtualBox 4.2, so I don't think it's a bug per se in VMWare, since they have separate code bases.

Could it be a problem with 2D/3D support for MacOS guests?  Is there any workaround for this?  Can MacOS can be configured to disable OpenGL?

Preferences crashes on launch with llibjvm.dylib fault.

Java applets show "plug-in failure".

0 Kudos
wrhahn
Contributor
Contributor

Same thing is happening to me on Mac OS X 10.8 running WIN7 Guest. 

Inside Win7 Guest, if I try to launch Java Control Panel or run an Applet (e.g. one launched from a web page) then my Win7 VMWare Guest hangs/crashes with message from VMWare V5.0.2 saying "Ignore" "Restart" etc.

Just started happening recently.

0 Kudos
dariusd
Leadership
Leadership

Hi wrhahn,

This thread is about an issue different from yours, where Java itself crashes when running inside a Mac OS guest, while your problem is in a Windows guest.  Can you provide the complete text of the error message you're getting?  Are you using a recent (mid-2012) MacBook Pro?

Thanks,

--

Darius

0 Kudos
wrhahn
Contributor
Contributor

I understand that this specific  thread has to do with Mac OS X Guest.  The point of my previous post is  to point out that similiar symptoms of crashing happen with Win7 Guest.

All of the above I believe is related to the following KB Article:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=204024...

And, I should point out that I was able to work around this issue WITHOUT having to turn off 3D acceleration by running an older version of the Java JRE, namely Java JRE1.5... (a.k.a. Java SE 5).

I hope that helps clarify.

Sorry for the somewhat outside-the-scope post.  I was just trying to help.

0 Kudos
dariusd
Leadership
Leadership

Hi wrhahn,

I appreciate your kind and helpful intent, and I hope you will not find my rebuttal disheartening:

The earlier discussion in this thread is not at all related to the MacBook Air and MacBook Pro Update 2.0 issue in KB 2040249.  This thread was started 18 days before the update in question became available.

Here's a quick side-by-side comparison (alright, an one-above-the-other comparison...):

The present thread relates to a crash of a Java program which seems to be caused by the lack of 3D acceleration support for Mac OS guests.  The Java process inside the guest crashes after querying to determine the available 3D capabilities, when it fails to handle what it sees inside the virtual machine.  The virtual machine itself continues to run; Only the Java program fails, with the Mac OS guest reporting the failure of the program in the usual way.  This problem is independent of whether the VM is configured for 3D acceleration or not (we don't even support it for Mac OS guests), and is independent of the host's video drivers.  Java is the only program affected, and downgrading Java provides a workaround, as reported by mickywi earlier in this thread.

The problem in KB 2040249 is a crash of the virtual machine itself (i.e. the guest abruptly powers off with an error message from VMware Fusion) when the host's video driver fails to handle a 3D operation on behalf of a Windows or Linux guest.  The virtual machine does not continue to run.  The problem is highly dependent on the VM's 3D acceleration configuration and is also highly dependent on the host's video drivers: the aforementioned MacBook Air and MacBook Pro Update 2.0 is directly implicated in the problem.  Java is one of many programs affected; Downgrading Java might be a workaround if (and only if) you are not running any other software inside the guest that may also trigger the crash, such as Windows Live Messenger or Google Chrome.

Just about the only common factor is that downgrading the guest's Java installation may provide a workaround, when circumstances allow.  :smileygrin:

Cheers,

--

Darius

0 Kudos
wrhahn
Contributor
Contributor

dariusd,

Thank you very much for your detailed description, comparison and points of clarification.

I truly appreciate your thought-leadership on this forum/community.

Thanks much for the great information.

0 Kudos
dlhotka
Champion
Champion

FWIW, the 'present thread' issue still happens with the release 10 version too.

0 Kudos
generalzod
Contributor
Contributor

I was able to reproduce the problem with the advanced release version 7u12 as well, so I'm guesing 12 won't fix it either.

Since JDK7 is open source, is there a reason we can't simply build it from source for OSX with the opengl pathway disabled?

The crucial stack frames appear to be:

libGL.dylib    0x00007fff8f3512b4 glGetString + 15
liblwawt.dylib 0x0000000114a40fbb Java_sun_java2d_opengl_OGLContext_getOGLIdString + 35

We either need to patch libGL.dylib to force glGetString() to return something (perhaps "") without crashing, or instead patch liblwawt.dylib so that getOGLIdString() returns without crashing.  I'm not sure even why these are being called, since my understanding is that sun.java2d.opengl is false by default (and I've set it to false in _JAVA_OPTIONS with no change in behavior).

0 Kudos
vaxman
Contributor
Contributor

Thanks darlusd!

Downgrading Java is not a viable workaround --that will throw a security error on recent versions of Mac OS X 10.7 or 10.8 for a very good reason. It is important that VMware Inc. release an update to Fusion quickly that improves the emulation enough so that the JRE does not crash and that disables the 3D accelleration "switch" in a VM's settings panel when its guest OS is detected to be Mac OS X.

The present thread relates to a crash of a Java program which seems to be caused by the lack of 3D acceleration support for Mac OS guests.  The Java process inside the guest crashes after querying to determine the available 3D capabilities, when it fails to handle what it sees inside the virtual machine.  The virtual machine itself continues to run; Only the Java program fails, with the Mac OS guest reporting the failure of the program in the usual way.  This problem is independent of whether the VM is configured for 3D acceleration or not (we don't even support it for Mac OS guests), and is independent of the host's video drivers.  Java is the only program affected, and downgrading Java provides a workaround, as reported by mickywi earlier in this thread.

0 Kudos
furiousmonkey11
Contributor
Contributor

Just wondering if there have been any further updates or discussions to this thread.  For most, downgrading Java is not an option and so this is quite crippling.

0 Kudos
dlhotka
Champion
Champion

I'd have to say that the root cause is Oracle expecting/requiring 3d acceleration functions when none are required (that's a long-standing annoyance because it also forces the discrete graphics chip to be used on the host, sucking down battery life).

I know the VMWizards are hard at work on the issue, but have no clue as to the timeline or ultimate solution.  It's a hard problem to solve, but given time, they're pretty darn good.

0 Kudos
dariusd
Leadership
Leadership

Hi furiousmonkey, and welcome to the VMware Communities!

I've been investigating this, and don't have any wonderful or truly helpful news to share as of now.  I will mention, however, that if you boot a physical Mac (host) into Safe Mode (hold the Shift key before the Apple logo first appears on screen), you will find that the Java 7 Control Panel crashes in exactly the same way on that host, even when Fusion is not present at all.  Hmmmm...

Cheers,

--

Darius

0 Kudos
dlhotka
Champion
Champion

Hmmmmm.....indeed.

0 Kudos
lofwyr
Contributor
Contributor

Any news on this issue? It is a big blocker for my company as of right now. ;(

0 Kudos
dariusd
Leadership
Leadership

Sorry for the delay... I had a hard drive die (loudly) and lost all my work on this and a bunch of other stuff too.  Yay for rotating magnetic media!  :smileyangry:

So... The direct cause of the crash is this bug, which was seemingly fixed four years ago for every OS except Mac OS, and causes the Java runtime to crash in the absence of OpenGL.  The good news is that it isn't too difficult to port that fix to the Mac OS CGLGraphicsConfig.java, rebuild it, and repack rt.jar...  The bad news is that it still doesn't work: now it seems to crash a little bit later, while java.awt.Window is evaluating the capabilities of the graphics device, so either I got something wrong in the patching/jar-ing process or there is some other problem as well.  Smiley Sad

To be continued...

--

Darius

0 Kudos