eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
111 stars 127 forks source link

Eclipse crashes in Webkit code #179

Closed heike2718 closed 4 months ago

heike2718 commented 2 years ago

Describe the bug Eclipse crashes frequently and unpredictably under Debian 10.

To Reproduce The error could not be reproduced reliably so far. But it is possibly connected with the clipboard: when I cache text to the clipboard from another application (terminal,...) and try to paste it into the Eclipse editor the IDE crashes very often.

Expected behavior No sudden crashes any more.

Screenshots

Environment:

never faced it on Windows

Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-20-amd64

Version since Not sure: it started with

Eclipse IDE for Java Developers (includes Incubating components) Version: 2021-12 (4.22.0) Build id: 20211202-1639 OS: Linux, v.4.19.0-20-amd64, x86_64 / gtk 3.24.5, WebKit 2.36.0 Java vendor: Eclipse Adoptium Java runtime version: 17.0.1+12 Java version: 17.0.1

but not immediately after upgrading to this version and remained after an upgrade to 2022-03. Actual Eclipse Version:

Eclipse IDE for Java Developers (includes Incubating components) Version: 2022-03 (4.23.0) Build id: 20220310-1457 OS: Linux, v.4.19.0-20-amd64, x86_64 / gtk 3.24.5 Java vendor: Eclipse Adoptium Java runtime version: 17.0.2+8 Java version: 17.0.2

Workaround (or) Additional context Starting eclipse with the command line option -Djdk.gtk.version=2 did not help. Tryed this because of a hinf from another forum about possible incomatibilities between gtk3 and eclipse.

Attached latest crash report:

hs_err_pid14497.log

iloveeclipse commented 2 years ago
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f2dff781dd2, pid=14497, tid=14498
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.2+8 (17.0.2+8) (build 17.0.2+8)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (17.0.2+8, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libwebkit2gtk-4.0.so.37+0xbcedd2]

Backtrace:

Stack: [0x00007f2f43236000,0x00007f2f43337000],  sp=0x00007f2f43334678,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libwebkit2gtk-4.0.so.37+0xbcedd2]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 5244  org.eclipse.swt.internal.gtk.OS.g_object_unref(J)V (0 bytes) @ 0x00007f2f316072e1 [0x00007f2f316072a0+0x0000000000000041]
j  org.eclipse.swt.browser.WebKit.lambda$8(J)V+1
j  org.eclipse.swt.browser.WebKit$$Lambda$1363+0x000000010106a688.run()V+4
J 35802 c2 org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Z)Z (188 bytes) @ 0x00007f2f32b1f238 [0x00007f2f32b1ee40+0x00000000000003f8]
J 32603 c2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (88 bytes) @ 0x00007f2f32874634 [0x00007f2f32874320+0x0000000000000314]
iloveeclipse commented 2 years ago

Please provide all System properties matching SWT filter from Eclipse -> Help -> About -> Installation Details -> Configuration.

heike2718 commented 2 years ago

*** Date: Montag, 30. Mai 2022 um 13:30:54 Mitteleuropäische Sommerzeit

*** 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=Adwaita org.eclipse.swt.internal.gtk.version=3.24.5 org.eclipse.swt.internal.webkitgtk.version=2.36.0 sun.java.command=/home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar -os linux -ws gtk -arch x86_64 -showsplash /home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.epp.package.common_4.23.0.20220310-1200/splash.bmp -launcher /home/heike/eclipse/eclipse-java-latest/eclipse/eclipse -name Eclipse --launcher.library /home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.400.v20211117-0650/eclipse_11600.so -startup /home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar --launcher.appendVmargs -exitdata 410005 plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_15.0.2.v20210201-0955/jre/bin -product org.eclipse.epp.package.java.product -data /home/heike/workspaces/java12+ -vm /home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/bin/java -vmargs -Dosgi.requiredJavaVersion=11 -Dosgi.instance.area.default=@user.home/eclipse-workspace -Dsun.java.command=Eclipse -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Djdk.gtk.version=2 -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM -jar /home/heike/eclipse/eclipse-java-latest/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar

*** System environment variables:

*** Features:

*** Plug-in Registry: org.eclipse.e4.ui.css.swt (0.14.400.v20211026-1534) "Eclipse CSS SWT Support" [Active] org.eclipse.e4.ui.css.swt.theme (0.13.0.v20201026-1147) "Eclipse CSS SWT Theme Support" [Active] org.eclipse.e4.ui.swt.gtk (1.1.100.v20210108-1832) "Eclipse UI GTK Enhancements" [Resolved] org.eclipse.e4.ui.workbench.addons.swt (1.4.400.v20211102-0453) "Eclipse e4 Workbench Add-ons" [Active] org.eclipse.e4.ui.workbench.renderers.swt (0.15.400.v20220308-0630) "Eclipse e4 Workbench SWT Renderer" [Active] org.eclipse.e4.ui.workbench.swt (0.16.400.v20220222-1128) "Eclipse e4 Workbench SWT" [Active] org.eclipse.jface.databinding (1.13.0.v20210619-1146) "JFace Data Binding for SWT and JFace" [Resolved] org.eclipse.swt (3.119.0.v20220223-1102) "Standard Widget Toolkit" [Resolved] org.eclipse.swt.gtk.linux.x86_64 (3.119.0.v20220223-1102) "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.high-contrast /instance/org.eclipse.e4.ui.workbench.renderers.swt/enableMRU=true /instance/org.eclipse.e4.ui.workbench.renderers.swt/themeEnabled=true /instance/org.eclipse.jdt.ui/content_assist_category_order=org.eclipse.jdt.ui.templateProposalCategory\:0\u0000org.eclipse.jdt.ui.swtProposalCategory\:1\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\:65537\u0000org.eclipse.jdt.ui.javaChainProposalCategory\:3\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\:65539\u0000org.eclipse.jdt.ui.textProposalCategory\:65540\u0000org.eclipse.jdt.ui.javaAllProposalCategory\:6\u0000org.eclipse.jdt.ui.javaPostfixProposalCategory\:65542\u0000org.eclipse.jpt.jaxb.ui.jaxbCompletionProposals\:8\u0000org.eclipse.jpt.jpa.ui.jpaProposalCategory\:9\u0000org.eclipse.jst.ws.jaxws.ui.jaxwsProposalComputer\:10\u0000org.eclipse.mylyn.java.ui.javaAllProposalCategory\:11\u0000org.eclipse.pde.api.tools.ui.apitools_proposal_category\:12\u0000 @org.eclipse.e4.ui.css.swt.theme=0.13.0.v20201026-1147 @org.eclipse.e4.ui.workbench.renderers.swt=0.15.400.v20220308-0630

*** Current Install Configuration:

Id: org.eclipse.e4.ui.css.swt, Version: 0.14.400.v20211026-1534, Location: reference:file:plugins/org.eclipse.e4.ui.css.swt_0.14.400.v20211026-1534.jar Id: org.eclipse.e4.ui.css.swt.theme, Version: 0.13.0.v20201026-1147, Location: reference:file:plugins/org.eclipse.e4.ui.css.swt.theme_0.13.0.v20201026-1147.jar Id: org.eclipse.e4.ui.swt.gtk, Version: 1.1.100.v20210108-1832, Location: reference:file:plugins/org.eclipse.e4.ui.swt.gtk_1.1.100.v20210108-1832.jar Id: org.eclipse.e4.ui.workbench.addons.swt, Version: 1.4.400.v20211102-0453, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.addons.swt_1.4.400.v20211102-0453.jar Id: org.eclipse.e4.ui.workbench.renderers.swt, Version: 0.15.400.v20220308-0630, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.15.400.v20220308-0630.jar Id: org.eclipse.e4.ui.workbench.swt, Version: 0.16.400.v20220222-1128, Location: reference:file:plugins/org.eclipse.e4.ui.workbench.swt_0.16.400.v20220222-1128.jar Id: org.eclipse.swt, Version: 3.119.0.v20220223-1102, Location: reference:file:plugins/org.eclipse.swt_3.119.0.v20220223-1102.jar Id: org.eclipse.swt.gtk.linux.x86_64, Version: 3.119.0.v20220223-1102, Location: reference:file:plugins/org.eclipse.swt.gtk.linux.x86_64_3.119.0.v20220223-1102.jar

*** Security Configuration:

heike2718 commented 2 years ago

The crashes may be related to the cache / clipboard. They seem to occur more often when I have just cached texts from another application (Ctrl + C) or have not yet cleared the cache.

The interaction between Eclipse and the clipboard is quite unstable overall. Sometimes the IDE freezes when I have texts in the cache, so I have to empty it first.

The instability has been like this for several versions, but with the latest version the described crashes are added.

sxc731 commented 2 years ago

This issue also occurs on Ubuntu 22.04 (Wayland); everything is up-to-date as of this writing. I've had three occurrences over the last couple of days, with:

# Problematic frame:
# C  [libwebkit2gtk-4.0.so.37+0xbc79e6]

For me, this typically occurs when hitting CTRL+Space in order to auto-complete some stuff, eg: in a Javadoc comment is the one that occurred most recently. Let me know how I can further assist in debugging this?

Some version info:

Eclipse IDE for Java Developers (includes Incubating components)
Version: 2022-03 (4.23.0)
Build id: 20220310-1457

openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1)
OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)

libwebkit2gtk-4.0-37:
  Installed: 2.36.3-0ubuntu0.22.04.1

Perhaps change the title of the ticket to reflect this doesn't only happen on Debian?

iloveeclipse commented 2 years ago

@sxc731 : please attach full crash log. If you enable core dumps, you can open core file with gdb and print backtrace via "bt", this would be also good to have.

heike2718 commented 2 years ago

@sxc731

you are right. There are 2 different actions triggering the crashes several times a day:

So this is hopefully reproduceable.

sxc731 commented 2 years ago

I have attempted to open the crash file and print a backtrace as requested. I don't think I'm getting anything too useful (due to lack of debug symbols?). Below is an edited excerpt. The crash file is 318MB; I'm happy to upload it if it might actually be of any use; please confirm?

# gdb `cat ExecutablePath` CoreDump
GNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90
Copyright (C) 2022 Free Software Foundation, Inc.
[... edited out irrelevant stuff...]
Reading symbols from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/bin/java...
(No debugging symbols found in /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/bin/java)
BFD: warning: /var/crash/eclipse_crash/CoreDump has a segment extending past end of file

warning: Can't open file /memfd:gdk-wayland (deleted) during file-backed mapping note processing
warning: Can't open file anon_inode:i915.gem which was expanded to anon_inode:i915.gem during file-backed mapping note processing
[... repeats many times, followed by a list of LWP's...]
warning: Error reading shared library list entry at 0x29ba00746473
Failed to read a valid object file image from memory.
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `/opt/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_1'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007fbb27c6ea7c in ?? ()
[Current thread is 1 (LWP 30700)]
(gdb) bt
#0  0x00007fbb27c6ea7c in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fbb27bd4180
iloveeclipse commented 2 years ago

Can you please attach crash dump file generated by JVM (not the core file)?

sxc731 commented 2 years ago

Here's one; I have a couple more in case that helps: hs_err_pid30699.log.

Also, FWIW security patches were recently issued for libwebkit and it is quite possible that this coincides with the beginning of these issues; some of these patches certainly caused issues with other software. However, I can't say for sure because I also happened to upgrade my OS (Ubuntu 21.10->22.04) around the same time.

sxc731 commented 2 years ago

Got a little bit more lucky with bt this time. This was again a crash triggered by invoking auto-complete.

This happened a minute or so after I saw the weird striped screen mentioned here. Unlike the crash (which is thankfully not too easily reproduced), the striped screen can be readily triggered by invoking an in-line refactor/rename (ALT+SHIFT+R) and it seems possible as mentioned on the other ticket that this destabilizes Eclipse (?)

Coredump bt:

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140650741757504) at ./nptl/pthread_kill.c:44
44  ./nptl/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x7febcd7ff640 (LWP 114719))]
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140650741757504) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140650741757504) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140650741757504, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007febcf01a476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007febcf0007f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007febce448855 in os::abort(bool, void*, void const*) ()
   from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/lib/server/libjvm.so
#6  0x00007febce77d470 in VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) ()
   from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/lib/server/libjvm.so
#7  0x00007febce77df4b in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) ()
   from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/lib/server/libjvm.so
#8  0x00007febce77df7e in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) ()
   from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/lib/server/libjvm.so
#9  0x00007febce61e0de in JVM_handle_linux_signal ()
   from /opt/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/lib/server/libjvm.so
#10 0x00007fe98409e327 in ?? () from /lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18
#11 <signal handler called>
#12 0x00007fe9850519e6 in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#13 0x00007fe9850db1db in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#14 0x00007fe9850dc840 in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#15 0x00007fe9850d1608 in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#16 0x00007fe9850d166d in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#17 0x00007fe98504f76b in ?? () from /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37
#18 0x00007febb006dd31 in g_object_unref () from /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007feacaa4d250 in Java_org_eclipse_swt_internal_gtk_OS_g_1object_1unref ()
   from /opt/eclipse/configuration/org.eclipse.osgi/684/0/.cp/libswt-pi3-gtk-4950r5.so
#20 0x00007febbd8ae5dc in ?? ()
#21 0x0000000000000002 in ?? ()
#22 0x0000000000000000 in ?? ()

JVM crash dump hs_err_pid114718.log:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe9850519e6, pid=114718, tid=114719
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.1+12 (17.0.1+12) (build 17.0.1+12)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (17.0.1+12, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libwebkit2gtk-4.0.so.37+0xbc79e6]
...
Current thread (0x00007febc80264d0):  JavaThread "main" [_thread_in_native, id=114719, stack(0x00007febcd700000,0x00007febcd800000)]

Stack: [0x00007febcd700000,0x00007febcd800000],  sp=0x00007febcd7fd668,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libwebkit2gtk-4.0.so.37+0xbc79e6]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 6215  org.eclipse.swt.internal.gtk.OS.g_object_unref(J)V (0 bytes) @ 0x00007febbd8ae561 [0x00007febbd8ae520+0x0000000000000041]
j  org.eclipse.swt.browser.WebKit.lambda$8(J)V+1
j  org.eclipse.swt.browser.WebKit$$Lambda$1039+0x0000000100e83360.run()V+4
J 20162 c2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (88 bytes) @ 0x00007febbe3da7d4 [0x00007febbe3da080+0x0000000000000754]
J 16977% c2 org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run()V (690 bytes) @ 0x00007febbe057a3c [0x00007febbe0577c0+0x000000000000027c]
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$162+0x000000010026fc58.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 java.base@17.0.1
j  jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+133 java.base@17.0.1
j  jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 java.base@17.0.1
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 java.base@17.0.1
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
SyntevoAlex commented 2 years ago

I tried to reproduce on my Ubuntu 22.04, but I didn't encounter anything suspicious. I also tried a native memory checking tool (finds buffer overruns, double frees, etc) - and also didn't find anything.

It would help if you could reproduce crash from https://github.com/eclipse-platform/eclipse.platform.swt/issues/158 and get a backtrace for it. It seems that these two crashes are related.

Also, please install webkit debug infos and get a better backtrace (you could use the latest core dump you obtained):

  1. Configure your Ubuntu for debug infos (note: a single multi-line command below):
    $ echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse
    deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse
    deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | \
    sudo tee -a /etc/apt/sources.list.d/ddebs.list
  2. Install debug info keyring
    $ sudo apt update
    $ sudo apt install ubuntu-dbgsym-keyring
  3. Update once again to get debug info lists
    $ sudo apt update
  4. Install webkit debug infos
    $ sudo apt install libwebkit2gtk-4.1-0-dbgsym
sxc731 commented 2 years ago

Hi there,

Thanks for the instructions. I haven't gone through the debug libs installation just yet (and actually haven't encountered any crash since my last post) but I notice you're suggesting to install libwebkit2gtk-4.1-0, whereas I currently have libwebkit2gtk-4.0-37 (and I think issues reported here all refer to that version). Could this make a difference?

I have installed 4.1-0 (alongside 4.0-37) and restarted Eclipse. How do I ascertain which version of the .so is being used? I went to Help->About->Installation Details->Configuration and looked for webkit. This shows: org.eclipse.swt.internal.webkitgtk.version=2.36.3 under System properties; both the 4.0 and 4.1 versions of the libwebkit package are at version 2.36.3-0ubuntu0.22.04.1 so this doesn't elucidate. TIA for your insight.

SyntevoAlex commented 2 years ago

How do I ascertain which version of the .so is being used?

$ pmap -p `pgrep java` | grep libwebkit2gtk

I notice you're suggesting to install libwebkit2gtk-4.1-0, whereas I currently have libwebkit2gtk-4.0-37

Right, my bad. I did apt-cache search libwebkit and my eye caught the wrong line. libwebkit2gtk-4.0-37-dbgsym seems to be the right package.

SyntevoAlex commented 2 years ago

Once you install libwebkit2gtk-4.0-37-dbgsym, you should be able to get stack from your latest core dump, there is no need to crash eclipse again. I would still love to get a core dump/backtrace for #158 though.

akurtakov commented 2 years ago

If installing libwebkit2gtk-4.1-0 solves the problem this sounds like the issue lies in the old version which Ubuntu fixed so nothing to be done on SWT side.

sxc731 commented 2 years ago

OK so immediately after a cold start, Eclipse doesn't appear to load libwebkit2gtk (I used @SyntevoAlex's pmap command, did a little bit of simple editing and the library wasn't loaded).

Interestingly, after I trigger the striped screen, then I see that Eclipse has several references to /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37.56.7- so, first off, FWIW it uses the 4.0 version, regardless of availability of 4.1 on the system; I assume that's not an issue.

The striped screen, which is 100% reproducible for me, is at the very least a pretty jarring cosmetic bug and possibly a more serious smoking gun, and it does seem to involve libwebkit2gtk per above...

To reproduce the striped screen, I created an empty workspace with the single following class:

public class Test { }

If you select Test and press ALT+SHIFT+R to invoke the in-line rename/refactor, then type Test2 (or whatever), followed by RETURN, you should get to see the striped screen (at least for me, on Ubuntu 22.04 it's 100% reproducible). It doesn't appear for very long in this instance because the refactor is simple so if your workstation is quick, you might miss it. To make it show for longer, introduce a syntax error - eg: add void m() inside the Test class (purposefully leaving out the body and semicolon) - and try rename/refactor again, you should definitely see the striped screen while Eclipse presents a modal dialog per the below screenshot.

I'll let you know if I manage to reproduce the crash with the debug libs.

As for https://github.com/eclipse-platform/eclipse.platform.swt/issues/158, instructions to reproduce suggest clicking "Migrate" on the Welcome screen. I do not have that "Migrate* option (my deployment is a straight up "Java developers") so cannot reproduce.

Screenshot from 2022-06-08 15-29-39

SyntevoAlex commented 2 years ago

@sxc731 do you have any plugins installed? Can you try removing them?

vogella commented 2 years ago

@sxc731 any HTML link on the welcome screen toolbar, crashes the Eclipse SDK for me using Wayland.

iloveeclipse commented 2 years ago

@sxc731 any HTML link on the welcome screen toolbar, crashes the Eclipse SDK for me using Wayland.

@vogella : so you can follow this: https://github.com/eclipse-platform/eclipse.platform.swt/issues/179#issuecomment-1147420123 to provide additional information?

SyntevoAlex commented 2 years ago

Better yet, please reply to https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-1146483400 and https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-1142873959

SyntevoAlex commented 2 years ago

If you select Test and press ALT+SHIFT+R to invoke the in-line rename/refactor, then type Test2 (or whatever), followed by RETURN, you should get to see the striped screen (at least for me, on Ubuntu 22.04 it's 100% reproducible)

Not reproducible for me: image

I continue to suspect some Eclipse plugin or non-default Ubuntu package.

SyntevoAlex commented 2 years ago

any HTML link on the welcome screen toolbar, crashes the Eclipse SDK for me using Wayland.

Also not reproducible for me in Eclipse 2022-03 on Ubuntu 22.04

akurtakov commented 2 years ago

In the past we had wayland "drawing" problems that happened only with certain video drivers. So that path is worth investigating.

sxc731 commented 2 years ago

@sxc731 do you have any plugins installed? Can you try removing them?

I tried a naked "2022-03 Eclipse for Java developers" and can still 100% reproduce the striped screen.

To @akurtakov's point above, my laptop doesn't have fancy graphics: regular Tiger Lake with integrated Intel GPU. That said, since this was also reported here, it's not just me.

I definitely didn't use to have this issue with a combination of Ubuntu 21.10/Eclipse 2021-12/pre security-patch libwebkit2gtk.

The actual crash somehow hasn't re-occured as yet.

cpfeiffer commented 2 years ago

I can reproduce the crash on Ubuntu 22.04 by clicking on a link on the welcome page with

I cannot reproduce the crash in the same way on Debian Unstable, where libwebkit2gtk-4.0-37 has version 2.36.3-1.

I also could not reproduce the crash on Ubuntu 20.04 with libwebkit2gtk-4.0-37 version 2.36.3-0ubuntu0.20.04.1

I can do further debugging on Ubuntu 22.04 if needed.

SyntevoAlex commented 2 years ago

@cpfeiffer Please follow steps from https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-1142873959

gietki commented 2 years ago

This is critical. It's a bug in webkit2gtk lib I presume? Happens to me as well (open a project, move mouse over to a method name and wait for autocomplete - boom, crash sigsegv).

Edit: using ubuntu 22.04 fully patched (libwebkit2gtk-4.0-37), eclipse 2022-03R

cpfeiffer commented 2 years ago

Here's the stacktrace;

(gdb) t 1
[Switching to thread 1 (Thread 0x7f57c8bd7640 (LWP 23486))]
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140015006742080) at ./nptl/pthread_kill.c:44
44  in ./nptl/pthread_kill.c
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140015006742080) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140015006742080) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140015006742080, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f57c8c1a476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f57c8c007f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f57c804c675 in os::abort(bool, void*, void const*) () at /home/compromise/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/lib/server/libjvm.so
#6  0x00007f57c8381fa0 in VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) () at /home/compromise/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/lib/server/libjvm.so
#7  0x00007f57c8382a7b in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) () at /home/compromise/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/lib/server/libjvm.so
#8  0x00007f57c8382aae in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) () at /home/compromise/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/lib/server/libjvm.so
#9  0x00007f57c822298e in JVM_handle_linux_signal () at /home/compromise/eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.2.v20220201-1208/jre/lib/server/libjvm.so
#10 0x00007f571b49e327 in jscSignalHandler() () at ./Source/WTF/wtf/threads/Signals.cpp:441
#11 0x00007f57c8c1a520 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#12 webkitWebViewBaseMakeGLContextCurrent(_WebKitWebViewBase*) () at ./Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:2574
#13 0x00007f571c4db1db in WebKit::WaylandCompositor::Surface::setWebPage(WebKit::WebPageProxy*) () at ./Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp:184
#14 0x00007f571c4dc840 in WebKit::WaylandCompositor::unregisterWebPage(WebKit::WebPageProxy&) () at ./Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp:597
#15 0x00007f571c4d1608 in WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland() () at ./Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:246
#16 0x00007f571c4d166d in WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland() () at ./Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:251
#17 0x00007f571c44f76b in std::default_delete<WebKit::AcceleratedBackingStore>::operator()(WebKit::AcceleratedBackingStore*) const () at /usr/include/c++/11/bits/unique_ptr.h:85
#18 std::__uniq_ptr_impl<WebKit::AcceleratedBackingStore, std::default_delete<WebKit::AcceleratedBackingStore> >::reset(WebKit::AcceleratedBackingStore*) () at /usr/include/c++/11/bits/unique_ptr.h:182
#19 std::unique_ptr<WebKit::AcceleratedBackingStore, std::default_delete<WebKit::AcceleratedBackingStore> >::reset(WebKit::AcceleratedBackingStore*) () at /usr/include/c++/11/bits/unique_ptr.h:456
#20 std::unique_ptr<WebKit::AcceleratedBackingStore, std::default_delete<WebKit::AcceleratedBackingStore> >::operator=(decltype(nullptr)) () at /usr/include/c++/11/bits/unique_ptr.h:397
#21 webkitWebViewBaseDispose() () at ./Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:709
#22 0x00007f57c4692d31 in g_object_unref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007f57a88d8726 in  () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#24 0x00007f57c4692dfd in g_object_unref () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007f571c42d000 in WTF::derefGPtr<_GTask>(_GTask*) () at ./build-soup2/WTF/Headers/wtf/glib/GRefPtr.h:269
#26 WTF::GRefPtr<_GTask>::~GRefPtr() () at ./build-soup2/WTF/Headers/wtf/glib/GRefPtr.h:82
#27 ~<lambda> () at ./Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:3854
#28 ~CallableWrapper () at ./build-soup2/WTF/Headers/wtf/Function.h:47
#29 ~CallableWrapper() () at ./build-soup2/WTF/Headers/wtf/Function.h:47
#30 0x00007f571c359b80 in std::default_delete<WTF::Detail::CallableWrapperBase<void, std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&> >::operator()(WTF::Detail::CallableWrapperBase<void, std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&>*) const () at /usr/include/c++/11/bits/unique_ptr.h:85
#31 std::unique_ptr<WTF::Detail::CallableWrapperBase<void, std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&>, std::default_delete<WTF::Detail::CallableWrapperBase<void, std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&> > >::~unique_ptr() () at /usr/include/c++/11/bits/unique_ptr.h:361
#32 WTF::Function<void (std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&)>::~Function() () at ./build-soup2/WTF/Headers/wtf/Function.h:63
#33 WTF::CompletionHandler<void (std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&)>::operator()(std::experimental::fundamentals_v3::expected<WTF::RefPtr<API::SerializedScriptValue, WTF::RawPtrTraits<API::SerializedScriptValue>, WTF::DefaultRefDerefTraits<API::SerializedScriptValue> >, WebCore::ExceptionDetails>&&) () at ./build-soup2/WTF/Headers/wtf/CompletionHandler.h:68
#34 operator() () at ./Source/WebKit/UIProcess/WebPageProxy.cpp:4397
#35 call() () at ./build-soup2/WTF/Headers/wtf/Function.h:53
#36 0x00007f571c0bf250 in WTF::Function<void (WTF::Span<unsigned char const, 18446744073709551615ul>&&, std::optional<WebCore::ExceptionDetails>&&)>::operator()(WTF::Span<unsigned char const, 18446744073709551615ul>&&, std::optional<WebCore::ExceptionDetails>&&) const () at ./build-soup2/WTF/Headers/wtf/Function.h:82
#37 WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul>&&, std::optional<WebCore::ExceptionDetails>&&)>::operator()(WTF::Span<unsigned char const, 18446744073709551615ul>&&, std::optional<WebCore::ExceptionDetails>&&) () at ./build-soup2/WTF/Headers/wtf/CompletionHandler.h:68
#38 Messages::WebPage::RunJavaScriptInFrameInScriptWorld::callReply(IPC::Decoder&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul>&&, std::optional<WebCore::ExceptionDetails>&&)>&&) () at ./build-soup2/DerivedSources/WebKit/WebPageMessageReceiver.cpp:1500
#39 0x00007f571c336663 in operator() () at ./Source/WebKit/Platform/IPC/MessageSender.h:100
#40 call() () at ./build-soup2/WTF/Headers/wtf/Function.h:53
#41 0x00007f571c2f9f0b in WTF::Function<void (IPC::Decoder*)>::operator()(IPC::Decoder*) const () at ./build-soup2/WTF/Headers/wtf/Function.h:82
#42 WTF::CompletionHandler<void (IPC::Decoder*)>::operator()(IPC::Decoder*) () at ./build-soup2/WTF/Headers/wtf/CompletionHandler.h:68
#43 operator() () at ./Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:195
#44 call() () at ./build-soup2/WTF/Headers/wtf/Function.h:53
#45 0x00007f571c2766c6 in WTF::Function<void (IPC::Decoder*)>::operator()(IPC::Decoder*) const () at ./build-soup2/WTF/Headers/wtf/Function.h:82
#46 WTF::CompletionHandler<void (IPC::Decoder*)>::operator()(IPC::Decoder*) () at ./build-soup2/WTF/Headers/wtf/CompletionHandler.h:68
#47 IPC::Connection::dispatchMessage(IPC::Decoder&) () at ./Source/WebKit/Platform/IPC/Connection.cpp:1074
#48 0x00007f571c277655 in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) () at ./Source/WebKit/Platform/IPC/Connection.cpp:1137
#49 0x00007f571c2796f1 in IPC::Connection::dispatchIncomingMessages() () at ./Source/WebKit/Platform/IPC/Connection.cpp:1241
#50 0x00007f571b44507d in WTF::Function<void ()>::operator()() const () at ./Source/WTF/wtf/Function.h:82
#51 WTF::RunLoop::performWork() () at ./Source/WTF/wtf/RunLoop.cpp:133
#52 0x00007f571b4a180d in operator() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#53 _FUN() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:82
#54 0x00007f571b4a2123 in operator() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#55 _FUN() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:56
#56 0x00007f57a851bc24 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#57 0x00007f57a85706f8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#58 0x00007f57a85193c3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007f5798b86de5 in gtk_main_iteration_do () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#60 0x00007f5729a56f30 in Java_org_eclipse_swt_internal_gtk3_GTK3_gtk_1main_1iteration_1do () at /home/compromise/eclipse/configuration/org.eclipse.osgi/431/0/.cp/libswt-pi3-gtk-4950r5.so

If necessary, I can provide the coredump, but it's > 200 MB 7zipped,

SyntevoAlex commented 2 years ago

Finally, someone provided something useful! Thanks!

Seems to be this bug: https://bugs.webkit.org/show_bug.cgi?id=200856

It mentions hardware acceleration. This hints why it's only seen on some machines and not the others.

SyntevoAlex commented 2 years ago

The old bug was fixed, but then it reappeared as: https://bugs.webkit.org/show_bug.cgi?id=239429

SyntevoAlex commented 2 years ago

After enabling 3D acceleration in my Ubuntu 22.04 VM, the crash is reproducible for me as well.

SyntevoAlex commented 2 years ago

I understand that this is a problem of WebKit (see https://bugs.webkit.org/show_bug.cgi?id=239429) and not a bug in Eclipse.

gietki commented 2 years ago

Yes, thanks for pointing the issue in Webkit, I guess we will have to wait until it is fixed (no one assigned to that issue and priority set to normal). Is there any workaround? @SyntevoAlex you mentioned that when you enabled 3D acceleration, you meant enabling it in VirtualBox? Does anybody know any native (non-VM) workaround?

SyntevoAlex commented 2 years ago

Yes, I'm running Ubuntu in VirtualBox, and I meant that enabling 3D acceleration there caused the crash to occur for me. Bug in WebKit is outside of my work scope, therefore I will not assist with this problem further, sorry.

cpfeiffer commented 2 years ago

Thanks! I guess the workaround would be to switch from Wayland to X11, at the moment.

heike2718 commented 2 years ago

@cpfeiffer thanks a lot for your hint. This seems to be a workaround. It saved my day

xxorax commented 1 year ago

Is there a way to disable Webkit hardware acceleration to temporary fix the issue ? Like evolution does.

The easiest way to reproduce it on my side is to go to Preferences > General > Web Browser : it crashes without showing the settings.

akurtakov commented 1 year ago

There is no way to disable hardware acceleration but you can add if you want . Just use an example how ignoreTls is done https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/gtk/org/eclipse/swt/browser/WebKit.java#L250 and https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Eclipse%20SWT%20WebKit/gtk/org/eclipse/swt/browser/WebKit.java#L680 . I would be happy to review your patch.

akurtakov commented 4 months ago

Would you please try with https://download.eclipse.org/eclipse/downloads/drops4/I20240329-0530/ ? It should workaround the problem for now.