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

Eclipse crashes after upgrade of libwebkit2gtk to 2.44.x #1230

Open
4javier opened this issue Apr 14, 2024 · 21 comments
Open

Eclipse crashes after upgrade of libwebkit2gtk to 2.44.x #1230

4javier opened this issue Apr 14, 2024 · 21 comments
Labels
for: eclipse something that is specific for Eclipse type: bug

Comments

@4javier
Copy link

4javier commented Apr 14, 2024

Version 2.44.0 of the lib gets shipped with the upgrade to Gnome 46 (more or less, maybe not a direct dependency).
This already happened on Arch, so it will be soon widespread on other distros.
Eclipse (and as a consequence STS) hangs then dump often, specifically when a popup is triggered by hovering on some elements and alike.
This is the typical hs_err_pidXXX.log confirming the issue after crash

---------------  T H R E A D  ---------------

Current thread (0x000070cae0027180):  JavaThread "main" [_thread_in_native, id=2169, stack(0x000070cae7614000,0x000070cae7714000)]

Stack: [0x000070cae7614000,0x000070cae7714000],  sp=0x000070cae7710ef0,  free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libwebkit2gtk-4.1.so.0+0x10c690b]

The issue seems to be related to hardware acceleration in Wayland, so a suggested workaround is to use X server emulation, launching STS with

GDK_BACKEND=x11 STS

I can confirm it works, and that issue is still present in libwebkit2gtk 2.44.1 released a couple days ago.
The problem is tracked down upstream by Eclipse devs, but unfortunately it looks like a really old ghost-bug not even Gnome devs have been able to solve in years, so they decided to follow the same path of some official Gnome packages disabling hardware acceleration.
This is the fix pushed upstream
eclipse-platform/eclipse.platform.swt@d76f147

I'd suggest to realease a STS version based on a build including the fix.
Maybe latest milestone one?
https://github.com/eclipse-platform/eclipse.platform.swt/releases/tag/S4_32_0_M1

Cheers

@martinlippert
Copy link
Member

Thanks @4javier for the details summarized here, much appreciated. The fix will be included in the 4.23.0 release, which will be based on the Eclipse 2024-06 release (the Eclipse release that will include this fix in SWT).

In the meantime, we also already run snapshot builds for the Eclipse 2024-06 milestone builds, so you can get an early snapshot build of Spring Tools 4 for Eclipse 4.22.1 on Eclipse 2024-06 milestones from https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html. The latest snapshot build for Eclipse 2024-06 should include the fix already. Would you be interested to give that a try?

@4javier
Copy link
Author

4javier commented Apr 15, 2024

Unfortunately, nightly build kills the whole gnome-shell in the same situation
Version: 4.22.1.202404142003-SNAPSHOT

Process 6865 (gnome-shell) of user 1000 dumped core.
                                                        
Stack trace of thread 6865:
#0  0x000079c5ee169d51 g_type_check_instance_is_fundamentally_a (libgobject-2.0.so.0 + 0x38d51)
#1  0x000079c5ee14eb07 g_object_ref (libgobject-2.0.so.0 + 0x1db07)
#2  0x000079c5ed576ec7 n/a (libmutter-14.so.0 + 0x176ec7)
#3  0x000079c5ed56b84f n/a (libmutter-14.so.0 + 0x16b84f)
#4  0x000079c5ed695596 n/a (libffi.so.8 + 0x7596)
#5  0x000079c5ed69200e n/a (libffi.so.8 + 0x400e)
#6  0x000079c5ed694bd3 ffi_call (libffi.so.8 + 0x6bd3)
#7  0x000079c5ec7f9ada n/a (libwayland-server.so.0 + 0x8ada)
#8  0x000079c5ec7fe180 n/a (libwayland-server.so.0 + 0xd180)
#9  0x000079c5ec7fcae2 wl_event_loop_dispatch (libwayland-server.so.0 + 0xbae2)
#10 0x000079c5ed54f00d n/a (libmutter-14.so.0 + 0x14f00d)
#11 0x000079c5edb40199 n/a (libglib-2.0.so.0 + 0x5a199)
#12 0x000079c5edb9f3bf n/a (libglib-2.0.so.0 + 0xb93bf)
#13 0x000079c5edb40dc7 g_main_loop_run (libglib-2.0.so.0 + 0x5adc7)
#14 0x000079c5ed4ca00b meta_context_run_main_loop (libmutter-14.so.0 + 0xca00b)
#15 0x000079c5ed695596 n/a (libffi.so.8 + 0x7596)
#16 0x000079c5ed69200e n/a (libffi.so.8 + 0x400e)
#17 0x000079c5ed694bd3 ffi_call (libffi.so.8 + 0x6bd3)
#18 0x000079c5ed9c9fe1 n/a (libgjs.so.0 + 0x4bfe1)
#19 0x000079c5ed9ca688 n/a (libgjs.so.0 + 0x4c688)
#20 0x000079c5ebf652da n/a (libmozjs-115.so + 0x15652da)
#21 0x000079c5ebbd8b01 n/a (libmozjs-115.so + 0x11d8b01)
#22 0x000079c5ebbd3ec5 n/a (libmozjs-115.so + 0x11d3ec5)
#23 0x000079c5ec0ba1b1 _ZN2JS4CallEP9JSContextNS_6HandleINS_5ValueEEES4_RKNS_16HandleValueArrayENS_13MutableHandleIS3_EE (libmozjs-115.so + 0x16ba1b1)
#24 0x000079c5eda00f02 n/a (libgjs.so.0 + 0x82f02)
#25 0x000079c5eda0917f gjs_context_eval_module (libgjs.so.0 + 0x8b17f)
#26 0x000079c5eda09481 gjs_context_eval_module_file (libgjs.so.0 + 0x8b481)
#27 0x000064569d86e57f n/a (gnome-shell + 0x257f)
#28 0x000079c5ed243cd0 n/a (libc.so.6 + 0x25cd0)
#29 0x000079c5ed243d8a __libc_start_main (libc.so.6 + 0x25d8a)
#30 0x000064569d86e9e5 n/a (gnome-shell + 0x29e5)

immagine

@martinlippert
Copy link
Member

Does Eclipse 2024-06 M1 itself also crashes?
https://download.eclipse.org/eclipse/downloads/drops4/S-4.32M1-202404061800/

@4javier
Copy link
Author

4javier commented Apr 15, 2024

Yes, same issue.
I'll report it that in upstream tracker.

@tntra-dhananjay
Copy link

Facing same issue with

Spring Tool Suite 4

Version: 4.21.0.RELEASE
Build Id: 202312011804
Revision: 37b0678

@martinlippert
Copy link
Member

@tntra-dhananjay The mentioned workaround works for you as well?

@goarvic
Copy link

goarvic commented Apr 23, 2024

Facing same issue.
The workaround suggested by @4javier launching with GDK_BACKEND=x11 STS is working

@tntra-dhananjay
Copy link

@tntra-dhananjay The mentioned workaround works for you as well?

@martinlippert - following solution worked for me

Added WEBKIT_DISABLE_COMPOSITING_MODE=1 in Exec
Exec=env WEBKIT_DISABLE_COMPOSITING_MODE=1 ./sts-4.22.0/SpringToolSuite4 --limit-modules %f

@nated099
Copy link

Added WEBKIT_DISABLE_COMPOSITING_MODE=1 in Exec
Exec=env WEBKIT_DISABLE_COMPOSITING_MODE=1 ./sts-4.22.0/SpringToolSuite4 --limit-modules %f

Thank you!

@4javier
Copy link
Author

4javier commented May 6, 2024

As expected, issue still present with STS 4.22.1 released two days ago.
Not a surprise considering it's based on Eclipse 4.31 branch.
Note: now it looks like crashing directly on hover on a symbol, without even showing any popup, but at least doesn't pull down the whole Gnome.
Still working if launched with X emulation backend.

@martinlippert
Copy link
Member

@4javier Can you give the latest early snapshot builds on Eclipse 2024-06 from https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html a try?

@4javier
Copy link
Author

4javier commented May 6, 2024

Just tried:
that one opens correctly the popup hovering on a symbol, but after that, when hovering on a brach of the path of the symbol itself in the popup (action that should show into same modal javadoc for the highlighted class) it kills the whole DE (always Gnome with Wayland backend).
P.S.:
there's a typo in the download page, the last nightly is 2024-06, not 2023
immagine

@akhil-finvasia
Copy link

I am facing the same issue, my STS keeps on crashing whenever I start typing something.

My STS details :

Spring Tool Suite 4 

Version: 4.22.1.RELEASE
Build Id: 202405011620
Revision: 71bcc7a580385ea1ae7aa7af1ae8bef30aaea50a

Copyright (c) 2007 - 2024 Broadcom
All rights reserved. Visit https://spring.io/tools

This product includes software developed by the
Eclipse Foundation https://www.eclipse.org

This product includes software developed by the
Apache Software Foundation https://www.apache.org

Lombok v1.18.24 "Envious Ferret" is installed. https://projectlombok.org/

My system information
Screenshot from 2024-05-07 09-31-45

Error Log file :
hs_err_pid18511.log
hs_err_pid15600.log
hs_err_pid14282.log
hs_err_pid3304.log
hs_err_pid9943.log

@martinlippert
Copy link
Member

P.S.: there's a typo in the download page, the last nightly is 2024-06, not 2023

Thanks for pointing that out, fixed with 1d927b7 (might take a little while until it promotes to the page)

@martinlippert
Copy link
Member

@akhil-finvasia Since this is an upstream issue in Eclipse/SWT, please join the discussion in the referenced issue and - if possible - provide your details over there. As soon as the fix becomes available, we can include that in the snapshot builds of the Spring Tools distribution builds. Until then, I hope that the mentioned workarounds work for you as well.

@schipplock
Copy link

I'm using wayland and WEBKIT_DISABLE_COMPOSITING_MODE=1 fixed it for me (sts 4.22.1.RELEASE, java 21, Ubuntu 23.10).

@MikeT3ch
Copy link

I'm using wayland and WEBKIT_DISABLE_COMPOSITING_MODE=1 fixed it for me (sts 4.22.1.RELEASE, java 21, Ubuntu 23.10).

This works for me, I'm using Fedora 39 Gnome, sts 4.22.1.RELEASE, java 17.

@MikeT3ch
Copy link

I'm using wayland and WEBKIT_DISABLE_COMPOSITING_MODE=1 fixed it for me (sts 4.22.1.RELEASE, java 21, Ubuntu 23.10).

This works for me, I'm using Fedora 39 Gnome, sts 4.22.1.RELEASE, java 17.

Nevermind, crash when I open the marketplace windows

@schipplock
Copy link

That was the first thing I tried. I can successfully open the market place. Sorry to hear, Mike :(.

Previously I also set GTK_IM_MODULE=ibus, but I'm not sure this is required anymore for Eclipse (eclipse-platform/eclipse.platform.swt#270). It's a different problem, but I still have this variable set.

Regards
Andreas

@4javier
Copy link
Author

4javier commented May 11, 2024

Just try the X11 backend
GDK_BACKEND=x11 STS

@MTactic
Copy link

MTactic commented May 11, 2024

Just try the X11 backend GDK_BACKEND=x11 STS

Its working now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse type: bug
Projects
None yet
Development

No branches or pull requests

9 participants