Bug 579174 - Eclipse always hangs when opening project, and often on startup
Summary: Eclipse always hangs when opening project, and often on startup
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.22   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2022-03-09 12:18 EST by Maxime Devos CLA
Modified: 2022-03-13 18:11 EDT (History)
1 user (show)

See Also:


Attachments
thread dump (31.05 KB, text/plain)
2022-03-09 12:57 EST, Maxime Devos CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Devos CLA 2022-03-09 12:18:56 EST
Eclipse hangs (most of the time) during starting and always when opening a Java project.

Expected result: no hanging.  Actual results: hanging during startup and opening a Java project.

Reproduction steps:

1. Initially, Eclipse is not running.
2. Delete the workspace.
3. Start Eclipse and create a new workspace and Java project.  Retry if this hangs. Stop Eclipse
4. Start Eclipse.  When I start Eclipse, then on the bottom right it goes to ‘deferred early start’ (*). Next to that, there's some kind of strober. Initially it is active (moving left and right), but after a few seconds it stops in-place and the IDE hangs (it does not react to moving the window around or clicking on anything).

Sometimes, this hang does not happen and I can try to open the new (empty) Java project I previously created (in a previously empty workspace).  But it hangs again.

Some additional information:

(*) Not sure what the exact string was.

This is on Debian, x86_64-linux-gnu.

I don't actually know the version, I only know it's ‘2021-12’ (Java developer's edition).

The hang goes together with high CPU usage (70%-100%?).

FWIW, I straced eclipse, and after the hang, there were many 'sched_yield', 'futex' and 'poll' and a few 'recvmsg' and EAGAIN, without any writes.
Comment 1 Andrey Loskutov CLA 2022-03-09 12:24:30 EST
Please create thread dump with jstack <eclipse pid> and attach here.
Comment 2 Maxime Devos CLA 2022-03-09 12:57:05 EST
Created attachment 288190 [details]
thread dump

I was not able to create a thread dump during the hang, because during the hang, jstack hangs as well. However, I was able to run jstack in a loop. Attached is the latest stack trace, shortly before the hang.
Comment 3 Andrey Loskutov CLA 2022-03-09 13:42:03 EST
I assume you are running Eclipse on not supported platform (too old GTK3).
Please go to help/installation/configuration, filter for "swt" and privide the reported swt properties here.
Comment 4 Maxime Devos CLA 2022-03-09 14:49:35 EST
(In reply to Andrey Loskutov from comment #3)
> I assume you are running Eclipse on not supported platform (too old GTK3).

It's the current version of gtk in Debian:

$ apt show libgtk-3-0
Package: libgtk-3-0
Version: 3.24.24-4

> Please go to help/installation/configuration, filter for "swt" and privide
> the reported swt properties here.

I'll take a look.
Comment 5 Andrey Loskutov CLA 2022-03-09 14:54:52 EST
(In reply to Maxime Devos from comment #4)
> (In reply to Andrey Loskutov from comment #3)
> > I assume you are running Eclipse on not supported platform (too old GTK3).
> 
> It's the current version of gtk in Debian:
> 
> $ apt show libgtk-3-0
> Package: libgtk-3-0
> Version: 3.24.24-4

OK, this is supported. Unfortunately your thread dump shows idling Eclipse, so we still have no clue what is the reason for hangs. You could try latest 4.23 build, just in case your problem is somehow fixed in the meantime.
Comment 6 Maxime Devos CLA 2022-03-09 15:09:58 EST
(In reply to Andrey Loskutov from comment #5)
> OK, this is supported. Unfortunately your thread dump shows idling Eclipse,
> so we still have no clue what is the reason for hangs. You could try latest
> 4.23 build, just in case your problem is somehow fixed in the meantime.


I didn't find help/installation/configuration initially so I tried updating Eclipse, but it seems like only some ‘Oomph’ component was updated.

Also, curiously, this time opening the Java project did not hang.

Anyway, I now found the SWT properties (in the partially updated Eclipse (still 4.22)):

*** Date: woensdag 9 maart 2022 om 21:04:11 Midden-Europese standaardtijd

*** 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.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Adwaita
org.eclipse.swt.internal.gtk.version=3.24.24
org.eclipse.swt.internal.webkitgtk.version=2.34.6
sun.java.command=/home/druivensap/eclipse/java-2021-12/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar -data file:/home/druivensap/eclipse-workspace/ -os linux -ws gtk -arch x86_64 -showsplash /home/druivensap/.p2/pool/plugins/org.eclipse.epp.package.common_4.22.0.20211202-1200/splash.bmp -launcher /home/druivensap/eclipse/java-2021-12/eclipse/eclipse -name Eclipse --launcher.library /home/druivensap/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.400.v20211117-0650/eclipse_11600.so -startup /home/druivensap/eclipse/java-2021-12/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar --launcher.appendVmargs -exitdata 3801e -product org.eclipse.epp.package.java.product -vm /usr/lib/jvm/default-java/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 -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM -Declipse.p2.max.threads=10 -Doomph.update.url=https://download.eclipse.org/oomph/updates/milestone/latest -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/ -jar /home/druivensap/eclipse/java-2021-12/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.300.v20211102-1716) "Eclipse e4 Workbench SWT Renderer" [Active]
org.eclipse.e4.ui.workbench.swt (0.16.300.v20211102-0939) "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.118.0.v20211123-0851) "Standard Widget Toolkit" [Resolved]
org.eclipse.swt.gtk.linux.x86_64 (3.118.0.v20211123-0851) "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

*** Current Install Configuration:

Id: org.eclipse.e4.ui.css.swt, Version: 0.14.400.v20211026-1534, Location: reference:file:/home/druivensap/.p2/pool/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:/home/druivensap/.p2/pool/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:/home/druivensap/.p2/pool/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:/home/druivensap/.p2/pool/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.300.v20211102-1716, Location: reference:file:/home/druivensap/.p2/pool/plugins/org.eclipse.e4.ui.workbench.renderers.swt_0.15.300.v20211102-1716.jar
Id: org.eclipse.e4.ui.workbench.swt, Version: 0.16.300.v20211102-0939, Location: reference:file:/home/druivensap/.p2/pool/plugins/org.eclipse.e4.ui.workbench.swt_0.16.300.v20211102-0939.jar
Id: org.eclipse.swt, Version: 3.118.0.v20211123-0851, Location: reference:file:/home/druivensap/.p2/pool/plugins/org.eclipse.swt_3.118.0.v20211123-0851.jar
Id: org.eclipse.swt.gtk.linux.x86_64, Version: 3.118.0.v20211123-0851, Location: reference:file:/home/druivensap/.p2/pool/plugins/org.eclipse.swt.gtk.linux.x86_64_3.118.0.v20211123-0851.jar

*** Security Configuration:
Comment 7 Dirk Steinkamp CLA 2022-03-10 03:39:32 EST
(In reply to Maxime Devos from comment #6)
> (In reply to Andrey Loskutov from comment #5)
> > OK, this is supported. Unfortunately your thread dump shows idling Eclipse,
> > so we still have no clue what is the reason for hangs. You could try latest
> > 4.23 build, just in case your problem is somehow fixed in the meantime.
> 
> 
> I didn't find help/installation/configuration initially so I tried updating
> Eclipse, but it seems like only some ‘Oomph’ component was updated.

The development builds of the upcoming version 4.23 can be found here:

https://www.eclipse.org/downloads/packages/release/2022-03
Comment 8 Maxime Devos CLA 2022-03-13 18:11:04 EDT
I updated to the 4.23 release candidate.  So far, it does not hang on startup or opening projects (although starting Eclipse and opening projects still (temporarily, the latter for a second or two) uses much CPU, but that's not a big problem, just a minor annoyance).

However, I now sometimes encounter a hang during Java editing.

In one case, it happens if I type "fpo", then press Control+space for completion, then delete the last character (with backspace) (before the completion could, er, complete).  In another case, I didn't have to delete the last character (maybe I pressed up or down though?).  In another case, deleting did not reproduce the hang doing multiple Control+space and deletions (*) in short order did.

(*) Actually I'm not sure if I deleted (with backspace) again?

I don't know if these hangs are related.