Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 441421 - Eclipse crashes with UnsatisfiedLinkError on ppc64le
Summary: Eclipse crashes with UnsatisfiedLinkError on ppc64le
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 4.5.0 Mars   Edit
Hardware: Power PC Linux
: P3 critical (vote)
Target Milestone: Mars   Edit
Assignee: Arun Thondapu CLA
QA Contact: Sravan Kumar Lakkimsetti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 467239
  Show dependency tree
 
Reported: 2014-08-08 08:07 EDT by Roberto Oliveira CLA
Modified: 2015-07-07 07:29 EDT (History)
6 users (show)

See Also:
lshanmug: review+
tjwatson: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Oliveira CLA 2014-08-08 08:07:36 EDT
When running eclipse in a Fedora 19 distro and in a powerpc machine I am getting the following error when opening eclipse:


(java:16112): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager'

(java:16112): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(java:16112): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

(java:16112): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(java:16112): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(java:16112): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(java:16112): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(java:16112): GLib-GObject-WARNING **: cannot register existing type `GdkDisplay'

(java:16112): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(java:16112): GLib-GObject-CRITICAL **: g_type_register_static: assertion `parent_type > 0' failed

(java:16112): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed

(java:16112): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed



I saw that there is a workaround for this issue (export SWT_GTK3=0). But I think it is still a bug.
Comment 1 Arun Thondapu CLA 2014-08-08 09:25:58 EDT
Which build of Eclipse are you using, is it the one downloaded from eclipse.org?

The PowerPC builds from eclipse.org cannot use GTK3 as the required platform interface library is not compiled for Linux/PPC platform combination. Are you sure you're using GTK3? Which version of Linux and GTK+ are you running on?
Comment 2 Roberto Oliveira CLA 2014-08-08 10:08:29 EDT
The Eclipse I am using is from eclipse.org  ->  http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.4-201406061215/eclipse-SDK-4.4-linux-gtk-ppc64.tar.gz


Distro is Fedora 19 (ppc64) and gtk3 package is gtk3-3.8.8-2.fc19.ppc64
Comment 3 Alexander Kurtakov CLA 2015-03-25 07:31:44 EDT
Roberto, would you please test with 4.5 M6 ? It would be good to not release with such crasher.
Comment 4 Roberto Oliveira CLA 2015-03-25 08:30:32 EDT
In ppc64 eclipse 4.5 M6 worked fine. But in ppc64le it got an error while starting. The error log is the following:

eclipse.buildId=4.5.0.I20150320-0800
java.fullversion=JRE 1.7.0 IBM J9 2.7 Linux ppc64le-64 Compressed References 20141215_227395 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR2_20141215_1631_B227395
JIT  - tr.r13.java_20141003_74587.07
GC   - R27_Java727_SR2_20141215_1631_B227395_CMPRSS
J9CL - 20141215_227395
BootLoader constants: OS=linux, ARCH=ppc64le, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch ppc64le

!ENTRY org.eclipse.osgi 4 0 2015-03-25 08:44:03.024
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: org/eclipse/swt/internal/gtk/OS._gdk_screen_get_primary_monitor(J)I
        at org.eclipse.swt.internal.gtk.OS.gdk_screen_get_primary_monitor(OS.java:5508)
        at org.eclipse.swt.widgets.Display.getPrimaryMonitor(Display.java:2025)
        at org.eclipse.jface.window.Window.getInitialLocation(Window.java:567)
        at org.eclipse.jface.dialogs.Dialog.getInitialLocation(Dialog.java:1265)
        at org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.getInitialLocation(ChooseWorkspaceDialog.java:327)
        at org.eclipse.jface.window.Window.initializeBounds(Window.java:767)
        at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:721)
        at org.eclipse.jface.window.Window.create(Window.java:434)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
        at org.eclipse.jface.window.Window.open(Window.java:792)
        at org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.prompt(ChooseWorkspaceDialog.java:91)
        at org.eclipse.ui.internal.ide.application.IDEApplication.promptForWorkspace(IDEApplication.java:322)
        at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:251)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:127)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 5 Roberto Oliveira CLA 2015-03-26 10:23:13 EDT
FYI: 

In RHEL 7.1 ppc64le still have the problem using gtk3 (the first error described in this bug). I had to use gtk2 (export SWT_GTK3=0) and when trying to start Eclipse I got the same error from SLES 12 ppc64le:


org.eclipse.swt.internal.gtk.OS.gdk_screen_get_primary_monitor(OS.java:5508)
        at org.eclipse.swt.widgets.Display.getPrimaryMonitor(Display.java:2025)
        at org.eclipse.jface.window.Window.getInitialLocation(Window.java:567)
        at org.eclipse.jface.dialogs.Dialog.getInitialLocation(Dialog.java:1265)
        at org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.getInitialLocation(ChooseWorkspaceDialog.java:327)
        at org.eclipse.jface.window.Window.initializeBounds(Window.java:767)
        at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:721)
        at org.eclipse.jface.window.Window.create(Window.java:434)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
        at org.eclipse.jface.window.Window.open(Window.java:792)
        at org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.prompt(ChooseWorkspaceDialog.java:91)
        at org.eclipse.ui.internal.ide.application.IDEApplication.promptForWorkspace(IDEApplication.java:322)
        at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:251)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:127)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 6 Arun Thondapu CLA 2015-05-05 15:09:55 EDT
The crashes on ppc64le with newer builds of 4.5 are because the native binaries for SWT and the eclipse launcher have not been rebuilt for some time. We're currently working on getting hold of a machine to build the binaries on.
Comment 7 Arun Thondapu CLA 2015-05-13 06:11:29 EDT
We have a machine for building the libraries now and I'm in the process of setting up the build environment. I expect to be able to complete the setup and builds in a few hours from now.

Lakshmi, there are no new code changes involved, we're just rebuilding the libraries for ppc64le as they're currently out of sync with the code. Please provide your review for pushing the rebuilt binaries to git for RC1. Thanks!
Comment 8 Lakshmi P Shanmugam CLA 2015-05-13 07:42:01 EDT
+1 for pushing the rebuilt ppc64le libraries for RC1.
The current ppc64le libs in the repository are very old and need to rebuilt with the latest SWT source code.
Comment 9 Arun Thondapu CLA 2015-05-13 16:17:22 EDT
Libraries for ppc64le are rebuilt and committed as part of commit http://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=29b9fb14d2db236779b98104a6f26789f0b4a524

Roberto, it would be great if you could verify by running the next I-build (I20150513-2000) on any ppc64le Linux you have access to. Thanks!
Comment 10 Roberto Oliveira CLA 2015-05-15 13:52:57 EDT
I downloaded the last available build (eclipse-SDK-I20150514-2000-linux-gtk-ppc64le.tar.gz) and tried it in SLES 12 ppc64le. If I use gtk3 I still have the same error reported at the beginning of this bug:

"java:16112): GLib-GObject-WARNING **: cannot register existing type `GdkDisplayManager'
(java:16112): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed
"


But when I use gtk2 (export SWT_GTK3=0), Eclipse runs just fine.
Comment 11 Sravan Kumar Lakkimsetti CLA 2015-05-19 07:51:43 EDT
SWT doesn't support GTK3 on ppc64le platform. That is the reason you see this error. 

The problem here is that eclipse by default has to launch with GTK2 and not try to launch with GTK3.

The workaround is to add the following lines to eclipse.ini beforre -vmargs

--launcher.GTK_version
2

I am reopening this bug to be fixed in launcher
Comment 12 Sravan Kumar Lakkimsetti CLA 2015-05-19 12:51:10 EDT
I am working on a fix for this problem. Since Arun is on vacation requesting Thomas Watson to review and commit.
Comment 13 Eclipse Genie CLA 2015-05-19 13:40:27 EDT
New Gerrit change created: https://git.eclipse.org/r/48207
Comment 14 Alexander Kurtakov CLA 2015-05-19 13:48:19 EDT
Why is GTK3 not supported on linux ppc64le? We have fedora builds with GTK3 and I haven't heard of reason to not support GTK3 on ppc64le?
Comment 15 Sravan Kumar Lakkimsetti CLA 2015-05-19 14:13:31 EDT
(In reply to Alexander Kurtakov from comment #14)
> Why is GTK3 not supported on linux ppc64le? We have fedora builds with GTK3
> and I haven't heard of reason to not support GTK3 on ppc64le?

Hi Alex,

This due to lack of time. We got the ppc64le machine very recently. Due to lack of time we could not complete the build machine configuration for GTK3. 

thats the reason it is not supported yet.

Sravan
Comment 16 Alexander Kurtakov CLA 2015-05-19 14:24:48 EDT
Ah, I see. At least it's not some ppc64le specific bug lurking around.
Comment 18 Thomas Watson CLA 2015-05-19 15:36:50 EDT
(In reply to Eclipse Genie from comment #17)
> Gerrit change https://git.eclipse.org/r/48207 was merged to [master].
> Commit:
> http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/
> ?id=0f1c189fab479fe03b2c0942cf057b7a2e36f118

I reviewed the code.  Seems simple enough, but you will need to do the rebuild of the binaries to really fix it now.
Comment 19 Sravan Kumar Lakkimsetti CLA 2015-05-20 02:18:17 EDT
(In reply to Thomas Watson from comment #18)
> (In reply to Eclipse Genie from comment #17)
> > Gerrit change https://git.eclipse.org/r/48207 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/
> > ?id=0f1c189fab479fe03b2c0942cf057b7a2e36f118
> 
> I reviewed the code.  Seems simple enough, but you will need to do the
> rebuild of the binaries to really fix it now.

Hi Thomas,

Thank you for committing the patch. I will complete the launcher builds today. Thank you for your help. I for got to get review + from you. Can please add a review + on this bug?

Thanks
Sravan
Comment 20 Lakshmi P Shanmugam CLA 2015-05-20 03:06:59 EDT
+1, changes look good to me.
Comment 22 Sravan Kumar Lakkimsetti CLA 2015-05-20 04:32:55 EDT
Opened a new bug 467664 to add support for GTK3 on ppc64le platform. 

Once the support is done we can remove the workaround added in the commit https://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=0f1c189fab479fe03b2c0942cf057b7a2e36f118
Comment 23 Sravan Kumar Lakkimsetti CLA 2015-05-20 11:10:49 EDT
The launcher has been rebuilt and committed through https://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=0e623adb069fb1c33c63edf1322b1debc8ed87e8 and https://git.eclipse.org/c/equinox/rt.equinox.binaries.git/commit/?id=6c73b1dd46dd402fa7d93bfa6ed7296334010a41

Resolving this bug as the launcher code changes are committed and rebuilt
Comment 24 Sravan Kumar Lakkimsetti CLA 2015-05-21 02:46:56 EDT
(In reply to Roberto Oliveira from comment #10)
> I downloaded the last available build
> (eclipse-SDK-I20150514-2000-linux-gtk-ppc64le.tar.gz) and tried it in SLES
> 12 ppc64le. If I use gtk3 I still have the same error reported at the
> beginning of this bug:
> 
> "java:16112): GLib-GObject-WARNING **: cannot register existing type
> `GdkDisplayManager'
> (java:16112): GLib-CRITICAL **: g_once_init_leave: assertion `result != 0'
> failed
> "
> 
> 
> But when I use gtk2 (export SWT_GTK3=0), Eclipse runs just fine.

Can you please test this bug using the build http://download.eclipse.org/eclipse/downloads/drops4/I20150520-2000/download.php?dropFile=eclipse-SDK-I20150520-2000-linux-gtk-ppc64le.tar.gz

Thanks
Sravan
Comment 25 Roberto Oliveira CLA 2015-05-21 08:59:32 EDT
Sravan,

I tested it with the last build and Eclipse started with GTK3
Comment 26 Sravan Kumar Lakkimsetti CLA 2015-05-22 06:46:59 EDT
(In reply to Roberto Oliveira from comment #25)
> Sravan,
> 
> I tested it with the last build and Eclipse started with GTK3

Thank you Roberto. One clarification here since the SWT libraries for GTK3 are not available we have implemented a solution to start eclipse in GTK2 even though GTK3 is available on the machine. For this we have raised a bug 467991.

Thanks
Sravan
Comment 27 Sravan Kumar Lakkimsetti CLA 2015-05-25 06:47:56 EDT
(In reply to Roberto Oliveira from comment #25)
> Sravan,
> 
> I tested it with the last build and Eclipse started with GTK3

If we enable GTK3 support on ppc64le it is possible for you to test it?
Comment 28 Roberto Oliveira CLA 2015-05-25 11:08:22 EDT
Sure, I can test it
Comment 29 Sravan Kumar Lakkimsetti CLA 2015-05-28 04:16:48 EDT
Hi Roberto,

Can you please test the build http://download.eclipse.org/eclipse/downloads/drops4/I20150527-2010/download.php?dropFile=eclipse-SDK-I20150527-2010-linux-gtk-ppc64le.tar.gz. Here we have enabled GTK3.

Thanks
Sravan
Comment 30 Roberto Oliveira CLA 2015-05-28 13:59:11 EDT
Sravan,

I tested this build and it started fine in ppc64le.