Eclipse crashes with # C [libwebkit2gtk-4.0.so.37+0xbc8316]
I switched back to Wayland and sometimes (not all the time) Eclipse crashes if I do code completion in the editor.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f4fa784c316, pid=5108, tid=5109
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.3+7 (17.0.3+7) (build 17.0.3+7)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (17.0.3+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libwebkit2gtk-4.0.so.37+0xbc8316]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/vogella/dev/eclipse-2022-09-05/eclipse/core.5108)
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- S U M M A R Y ------------
Command Line: -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM /home/vogella/dev/eclipse-2022-09-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/vogella/dev/eclipse-2022-09-05/eclipse/eclipse -name Eclipse --launcher.library /home/vogella/dev/eclipse-2022-09-05/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.600.v20220720-1916/eclipse_11701.so -startup /home/vogella/dev/eclipse-2022-09-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar --launcher.appendVmargs -exitdata 7 -vm /home/vogella/.sdkman/candidates/java/current/bin/java -vmargs -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM -jar /home/vogella/dev/eclipse-2022-09-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
Host: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz, 8 cores, 31G, Ubuntu 22.04.1 LTS
Time: Tue Sep 13 09:34:54 2022 CEST elapsed time: 1115.097224 seconds (0d 0h 18m 35s)
--------------- T H R E A D ---------------
Current thread (0x00007f5120024a00): JavaThread "main" [_thread_in_native, id=5109, stack(0x00007f51257ba000,0x00007f51258ba000)]
Stack: [0x00007f51257ba000,0x00007f51258ba000], sp=0x00007f51258b75d8, free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libwebkit2gtk-4.0.so.37+0xbc8316]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 4647 org.eclipse.swt.internal.gtk.OS.g_object_unref(J)V (0 bytes) @ 0x00007f51111a25e9 [0x00007f51111a25a0+0x0000000000000049]
j org.eclipse.swt.browser.WebKit.lambda$8(J)V+1
j org.eclipse.swt.browser.WebKit$$Lambda$1410+0x000000080180c7f0.run()V+4
J 28555 c2 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Z)Z (188 bytes) @ 0x00007f511256ab08 [0x00007f511256a820+0x00000000000002e8]
J 28560 c2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (88 bytes) @ 0x00007f51125730d4 [0x00007f5112572fc0+0x0000000000000114]
J 25278% c2 org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run()V (690 bytes) @ 0x00007f51121023d8 [0x00007f5112102240+0x0000000000000198]
j org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12
j org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(Lorg/eclipse/e4/ui/model/application/MApplicationElement;Lorg/eclipse/e4/core/contexts/IEclipseContext;)Ljava/lang/Object;+57
j org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(Lorg/eclipse/e4/ui/model/application/MApplicationElement;)V+20
j org.eclipse.ui.internal.Workbench.lambda$3(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;[I)V+393
j org.eclipse.ui.internal.Workbench$$Lambda$252+0x0000000800e3ee90.run()V+12
j org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12
j org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+16
j org.eclipse.ui.PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+2
j org.eclipse.ui.internal.ide.application.IDEApplication.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+113
j org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+138
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+85
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+79
j org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+99
j org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+132
v ~StubRoutines::call_stub
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 [email protected]
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+133 [email protected]
j jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 [email protected]
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 [email protected]
j org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+201
j org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+159
j org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v ~StubRoutines::call_stub
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000
Would you please try with https://download.eclipse.org/eclipse/downloads/drops4/I20240329-0530/ ? It should have a workaround for the problem.
Would you please try with https://download.eclipse.org/eclipse/downloads/drops4/I20240329-0530/ ? It should have a workaround for the problem.
On Stack Overflow it has been confirmed by areksuu that this is fixed in 2024-06 M1 (4.32M1):
As an alternative to upgrading to a milestone build of the upcoming release, the following workaround should also work according to the following Stack Overflow answer by @enexusde:
This is a workaround:
cd eclipse export GDK_BACKEND=x11; ./eclipseWayland is a buggy X11 replacement. Using
GDK_BACKEND=x11forces a compatibility-mode. After an update of ubuntu you could try to remove thatGDK_BACKENDto check if eclipse works normal again.
As an alternative to upgrading to a milestone build of the upcoming release, the following workaround should also work according to the following Stack Overflow answer by @enexusde:
This is a workaround:
cd eclipse export GDK_BACKEND=x11; ./eclipseWayland is a buggy X11 replacement. Using
GDK_BACKEND=x11forces a compatibility-mode. After an update of ubuntu you could try to remove thatGDK_BACKENDto check if eclipse works normal again.
I wrote that answer at Stackoverflow. But the credits does not belong to me but to https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-2061718869 .
Already tested Eclipse 4.32M1. Issue still present. After displaying the popup, hover on the package path of the element shown, on the top left of the popup itself. Eclipse will crash bringing down whole gnome shell because of wayland.
@4javier:
Already tested Eclipse 4.32M1. Issue still present. After displaying the popup, hover on the package path of the element shown, on the top left of the popup itself. Eclipse will crash bringing down whole gnome shell because of wayland.
You tested it with the Eclipse SDK 4.32M1 and verified that the hr_err_pid.log file generated as a result of the crashed Java VM contained C [libwebkit2gtk-4.0.so as the only problematic frame, right? With which Wayland and GTK version did you test it? Did the workaround export GDK_BACKEND=x11; worked for you?
I'm the author of the message you quoted as solution. (BTW, I didn't find out anything that special, it was a widespread solution for similar issues in the past). No hr_err gets generated, probably because DE crashes before JVM can print that. Don't be too strict with the version of libwebkit2gtk showing the error: its versioning is a mess and it could change based on distro/version you're running. Obviously it still works with X backend.
On X11 it doesn't crash, but popups take sometimes 2 or 5 minutes and Eclipse freezes until popup shows up.
Fixed in 2024-06