Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wayland] Eclipse crashes on Ubuntu 22.04 LTS #1169

Open
alfsch opened this issue Apr 12, 2024 · 4 comments
Open

[Wayland] Eclipse crashes on Ubuntu 22.04 LTS #1169

alfsch opened this issue Apr 12, 2024 · 4 comments
Labels
Linux/GTK Happens on Linux Wayland

Comments

@alfsch
Copy link

alfsch commented Apr 12, 2024

Eclipse IDE frequently crashs for me on the Ubuntu 22.04 release.

System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
ds.delayed.keepInstances=true
ds.delayed.keepInstances.default=true
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=4.31.0.20240307-1200

java.vendor.version=Oracle GraalVM 21.0.2+13.1
java.version=21.0.2
java.version.date=2024-01-16

kernel: 6.5.0-1019-oem #20-Ubuntu SMP PREEMPT_DYNAMIC Mon Mar 18 17:38:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
libgtk2.0-0:
Installed: 2.24.33-2ubuntu2
Candidate: 2.24.33-2ubuntu2
Version table:
libgtk-3-0:
Installed: 3.24.33-1ubuntu2
Candidate: 3.24.33-1ubuntu2

*** Date: Friday, April 12, 2024, 1:02:27 PM Central European Summer Time

*** Platform Details:

*** System properties:
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
org.eclipse.swt.graphics.Resource.reportNonDisposed=true
org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gtk.theme=Yaru
org.eclipse.swt.internal.gtk.version=3.24.33
org.eclipse.swt.internal.webkitgtk.version=2.42.5
sun.java.command=/home/alfred.schmid/Development/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.6.700.v20240213-1244.jar -os linux -ws gtk -arch x86_64 -showsplash /home/alfred.schmid/Development/eclipse/eclipse//plugins/org.eclipse.epp.package.common_4.31.0.20240307-1200/splash.bmp -launcher /home/alfred.schmid/Development/eclipse/eclipse/eclipse -name Eclipse --launcher.library /home/alfred.schmid/Development/eclipse/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.900.v20240129-1338/eclipse_11900.so -startup /home/alfred.schmid/Development/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.6.700.v20240213-1244.jar --launcher.appendVmargs -exitdata 8 -product org.eclipse.epp.package.jee.product -vm /usr/local/java/latest21/bin/java -vmargs -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava -Dosgi.requiredJavaVersion=17 -Dosgi.instance.area.default=@user.home/eclipse-workspace -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Declipse.e4.inject.javax.warning=false -Dsun.java.command=Eclipse -Xms256m -Xmx2048m -XX:+UseG1GC -XX:+UseStringDeduplication -Djava.security.manager=allow -jar /home/alfred.schmid/Development/eclipse/eclipse//plugins/org.eclipse.equinox.launcher_1.6.700.v20240213-1244.jar

*** System environment variables:

*** Features:

*** Plug-in Registry:
org.eclipse.e4.ui.css.swt (0.15.300.v20240207-1054) "Eclipse CSS SWT Support" [Active]
org.eclipse.e4.ui.css.swt.theme (0.14.300.v20231214-1513) "Eclipse CSS SWT Theme Support" [Active]
org.eclipse.e4.ui.swt.gtk (1.2.100.v20231030-2045) "Eclipse UI GTK Enhancements" [Resolved]
org.eclipse.e4.ui.workbench.addons.swt (1.5.300.v20240124-0948) "Eclipse e4 Workbench Add-ons" [Active]
org.eclipse.e4.ui.workbench.renderers.swt (0.16.300.v20240223-1002) "Eclipse e4 Workbench SWT Renderer" [Active]
org.eclipse.e4.ui.workbench.swt (0.17.300.v20240123-1128) "Eclipse e4 Workbench SWT" [Active]
org.eclipse.jface.databinding (1.15.200.v20240104-1240) "JFace Data Binding for SWT and JFace" [Resolved]
org.eclipse.swt (3.125.0.v20240227-1638) "Standard Widget Toolkit" [Resolved]
org.eclipse.swt.gtk.linux.x86_64 (3.125.0.v20240227-1638) "Standard Widget Toolkit for GTK" [Resolved]

*** User Preferences:
/bundle_defaults/org.eclipse.jdt.ui/CallHierarchy.defaultExpandWithConstructorsMembers=java.lang.Runnable.run;java.util.concurrent.Callable.call;org.eclipse.swt.widgets.Listener.handleEvent
/bundle_defaults/org.eclipse.jdt.ui/content_assist_category_order=org.eclipse.jdt.ui.javaPostfixProposalCategory\:65547\u0000org.eclipse.jdt.ui.spellingProposalCategory\:65545\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\:65540\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\:65539\u0000org.eclipse.jdt.ui.textProposalCategory\:65541\u0000org.eclipse.jdt.ui.javaAllProposalCategory\:65542\u0000org.eclipse.jdt.ui.templateProposalCategory\:2\u0000org.eclipse.jdt.ui.swtProposalCategory\:3\u0000org.eclipse.jdt.ui.javaChainProposalCategory\:4
/instance/org.eclipse.e4.ui.css.swt.theme/themeid=org.eclipse.e4.ui.css.theme.e4_default
/instance/org.eclipse.e4.ui.workbench.renderers.swt/HIDE_ICONS_FOR_VIEW_TABS=false
/instance/org.eclipse.e4.ui.workbench.renderers.swt/SHOW_FULL_TEXT_FOR_VIEW_TABS=false
/instance/org.eclipse.e4.ui.workbench.renderers.swt/USE_ROUND_TABS=false
/instance/org.eclipse.e4.ui.workbench.renderers.swt/enableMRU=true
/instance/org.eclipse.e4.ui.workbench.renderers.swt/themeEnabled=true
/@org.eclipse.e4.ui.css.swt.theme=0.14.300.v20231214-1513
@org.eclipse.e4.ui.workbench.renderers.swt=0.16.300.v20240223-1002

*** Current Install Configuration:

Id: org.eclipse.e4.ui.css.swt, Version: 0.15.300.v20240207-1054, Location: reference:file:plugins/org.eclipse.e4.ui.css.swt_0.15.300.v20240207-1054.jar
Id: org.eclipse.e4.ui.css.swt.theme, Version: 0.14.300.v20231214-1513, Location: reference:file:plugins/org.eclipse.e4.ui.css.swt.theme_0.14.300.v20231214-1513.jar
Id: org.eclipse.e4.ui.swt.gtk, Version: 1.2.100.v20231030-2045, Location: reference:file:plugins/org.eclipse.e4.ui.swt.gtk_1.2.100.v20231030-2045.jar
Id: org.eclipse.e4.ui.workbench.addons.swt, Version: 1.5.300.v20240124-0948, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.addons.swt_1.5.300.v20240124-0948.jar
Id: org.eclipse.e4.ui.workbench.renderers.swt, Version: 0.16.300.v20240223-1002, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.16.300.v20240223-1002.jar
Id: org.eclipse.e4.ui.workbench.swt, Version: 0.17.300.v20240123-1128, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.swt_0.17.300.v20240123-1128.jar
Id: org.eclipse.swt, Version: 3.125.0.v20240227-1638, Location: reference:file:plugins/org.eclipse.swt_3.125.0.v20240227-1638.jar
Id: org.eclipse.swt.gtk.linux.x86_64, Version: 3.125.0.v20240227-1638, Location: reference:file:plugins/org.eclipse.swt.gtk.linux.x86_64_3.125.0.v20240227-1638.jar

Error:

#  SIGSEGV (0xb) at pc=0x000071f035c7c3c4, pid=1728467, tid=1728468
#
# JRE version: Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (21.0.2+13) (build 21.0.2+13-LTS-jvmci-23.1-b30)
# Java VM: Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libcairo.so.2+0x643c4]  cairo_region_num_rectangles+0x4

...

Current thread (0x000071f0b4029fa0):  JavaThread "main"             [_thread_in_native, id=1728468, stack(0x000071f0bab00000,0x000071f0bac00000) (1024K)]

Stack: [0x000071f0bab00000,0x000071f0bac00000],  sp=0x000071f0babfd148,  free space=1012k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libcairo.so.2+0x643c4]  cairo_region_num_rectangles+0x4
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 6190  org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(J)V (0 bytes) @ 0x000071f0a32c3c79 [0x000071f0a32c3c20+0x0000000000000059]
J 24770 jvmci org.eclipse.swt.widgets.Display.eventProc(JJ)J (212 bytes) @ 0x000071f0a32d5d28 [0x000071f0a32d5c40+0x00000000000000e8]
v  ~StubRoutines::call_stub 0x000071f0a2503cc6
J 6182  org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Z)Z (0 bytes) @ 0x000071f0a32c3079 [0x000071f0a32c3020+0x0000000000000059]
J 35296% jvmci org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run()V (690 bytes) @ 0x000071f0a3d48948 [0x000071f0a3d48640+0x0000000000000308]
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+392
j  org.eclipse.ui.internal.Workbench$$Lambda+0x000071f03c20bce8.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

hs_err_pid1728467.log

Sorry, I can't find the core dump on my system.

@iloveeclipse
Copy link
Member

Please next time it crashes and creates core dump, do this below and attach the backtrace generated by gdb:

gdb /path/to/your/core/file
bt

There is a mismatch in the provided data. The crash file says it was using Oracle GraalVM 21.0.2+13.1 but you mentioned you should use Eclipse on Java 17?

  1. To sort out the root cause, please don't use GraalVM but a "regular" JVM.
  2. Please also attach all swt system properties reported by your Eclipse in the Help -> About -> Installation Details -> Configuration dialog (filter it by typing "swt").
  3. Try to find a pattern how to bring Eclipse to crash, usually it is not really random but some specific steps that cause the crash.

@alfsch
Copy link
Author

alfsch commented Apr 12, 2024

Removed wrong java version, copy paste accident.... I only have the graalvm, need to do some setup changes to use another vm, which one is the prefered one?

@alfsch
Copy link
Author

alfsch commented Apr 19, 2024

Eclispe is running stable when launching via desktop file with the following content:

[Desktop Entry]
Name=Eclipse IDE
Exec=env WEBKIT_DISABLE_COMPOSITING_MODE=1 /home/alfred.schmid/Development/eclipse/eclipse/eclipse %u
Type=Application
MimeType=x-scheme-handler/eclipse+command;x-scheme-handler/eclipse+mpc;
Comment=Eclipse with GraalVM
Terminal=false
Icon=/home/alfred.schmid/Development/eclipse/eclipse/icon.xpm

It seems that setting the environment variable WEBKIT_DISABLE_COMPOSITING_MODE=1 the issue is mitgated.

I got this hint from diskussions in #158

@alfsch
Copy link
Author

alfsch commented Aug 19, 2024

With current ubuntu 22.04 and Eclipse Version: 2024-06 (4.32.0) Build id: 20240606-1231 the problem is fixed for me. I use the following desktop entry now:

[Desktop Entry]
Name=Eclipse IDE
Exec=/home/alfred.schmid/Development/eclipse/eclipse/eclipse %u
Type=Application
MimeType=x-scheme-handler/eclipse+command;x-scheme-handler/eclipse+mpc;
Comment=Eclipse with GraalVM
Terminal=false
Icon=/home/alfred.schmid/Development/eclipse/eclipse/icon.xpm
StartupNotify=true
StartupWMClass=Eclipse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux/GTK Happens on Linux Wayland
Projects
None yet
Development

No branches or pull requests

3 participants