Bug 565100 - Eclipse stucks while creating project
Summary: Eclipse stucks while creating project
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.10   Edit
Hardware: PC CentOS
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-09 22:31 EDT by Shuai XinYu CLA
Modified: 2020-07-14 22:36 EDT (History)
4 users (show)

See Also:


Attachments
Jstack message (20.71 KB, text/plain)
2020-07-09 22:31 EDT, Shuai XinYu CLA
no flags Details
Jstack message for 2020-cdt-eclipse (23.42 KB, text/plain)
2020-07-12 23:03 EDT, Shuai XinYu CLA
no flags Details
Jstack message For Java Version (23.44 KB, text/plain)
2020-07-14 07:19 EDT, Shuai XinYu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shuai XinYu CLA 2020-07-09 22:31:45 EDT
Created attachment 283551 [details]
Jstack message

1.Eclipse Version: 2018-09 (4.9.0)
2.Java Version: Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
3.I create a project By "File" -> "new" -> "C Project",When I click Finish, Eclipse hang
4.Xmx1024m Xmx256m
5.machine VM Free is 9G, Swap is 4G
6.yes,everytime creating project, it`s time to click Finish will be hanging

The jstack message is in attachment file
Comment 1 Shuai XinYu CLA 2020-07-09 22:39:27 EDT
I also try another Eclipse 
  eclipse-cpp-neon-3-linux-gtk-x86_64.tar.gz
  eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz
  eclipse-cpp-2019-03-R-linux-gtk-x86_64.tar.gz

with the same Problem
Comment 2 Gao Hao CLA 2020-07-10 02:14:21 EDT Comment hidden (obsolete)
Comment 3 Rolf Theunissen CLA 2020-07-11 14:15:53 EDT
This is a deadlock caused by CDT:
- CDTCommonProjectWizard$1.run(CDTCommonProjectWizard.java:242) tries to run something synchronous on the UI thread.
- CDTCommonProjectWizard.invokeRunnable(CDTCommonProjectWizard.java:177) is blocking the UI with a modal dialog

Looks a lot like Bug 321696.
Comment 4 Rolf Theunissen CLA 2020-07-11 14:16:46 EDT Comment hidden (obsolete)
Comment 5 Shuai XinYu CLA 2020-07-12 22:33:55 EDT
I also try another Eclipse 
  eclipse-cpp-neon-3-linux-gtk-x86_64.tar.gz
  eclipse-cpp-photon-R-linux-gtk-x86_64.tar.gz
  eclipse-cpp-2019-03-R-linux-gtk-x86_64.tar.gz

with the same Problem
Comment 6 Shuai XinYu CLA 2020-07-12 23:03:05 EDT
Created attachment 283573 [details]
Jstack message for 2020-cdt-eclipse

2020-cdt-eclipse jstack message
Comment 7 Shuai XinYu CLA 2020-07-12 23:04:15 EDT
I also use the newest version eclipse-cpp-2020-06-R-linux-gtk-x86_64.tar.gz
but with same problem.
How can I slove the problem?
Comment 8 Shuai XinYu CLA 2020-07-12 23:32:01 EDT
I also use the newest version eclipse-cpp-2020-06-R-linux-gtk-x86_64.tar.gz
but with same problem.
How can I slove the problem?(In reply to Rolf Theunissen from comment #3)
> This is a deadlock caused by CDT:
> - CDTCommonProjectWizard$1.run(CDTCommonProjectWizard.java:242) tries to run
> something synchronous on the UI thread.
> - CDTCommonProjectWizard.invokeRunnable(CDTCommonProjectWizard.java:177) is
> blocking the UI with a modal dialog
> 
> Looks a lot like Bug 321696.

I use the eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz has the same prolem.

The Console print:
(Eclipse:33847): Gtk-WARNING **: 11:27:31.091: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node trough, owner GtkProgressBar)

(Eclipse:33847): Gtk-WARNING **: 11:27:31.091: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node trough, owner GtkProgressBar)

(Eclipse:33847): Gtk-CRITICAL **: 11:28:33.593: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkRadioButton

(Eclipse:33847): Gtk-CRITICAL **: 11:28:41.724: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkRadioButton

(Eclipse:33847): Gtk-CRITICAL **: 11:28:42.139: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkRadioButton
Comment 9 Jonah Graham CLA 2020-07-13 09:22:43 EDT
(In reply to Rolf Theunissen from comment #3)
> This is a deadlock caused by CDT:
> - CDTCommonProjectWizard$1.run(CDTCommonProjectWizard.java:242) tries to run
> something synchronous on the UI thread.
> - CDTCommonProjectWizard.invokeRunnable(CDTCommonProjectWizard.java:177) is
> blocking the UI with a modal dialog
> 
> Looks a lot like Bug 321696.

Bug 321696 (which was a dup of Bug 321640 which is marked as worksforme) was apparently resolved by Bug 262032 in the platform's Deadlock Detector.

While CDT is exposing a problem, the main thread has a modal dialog open, but the dialog is back in Display.readAndDispatch so syncexecs from other threads should be working fine. 

AFAICT the bug here is the modal context thread should be getting the lock to do the syncexec but is failing to.

@Shuai, do you have anything in your workspace/.metadata/.log file?

BTW the Gtk-WARNING and Gtk-CRITICAL can probably be ignored in this context. When using the Java version, do you also get a lockup? If so, can you provide the jstack for that too?
Comment 10 Shuai XinYu CLA 2020-07-14 07:19:14 EDT
Created attachment 283594 [details]
Jstack message For Java Version
Comment 11 Shuai XinYu CLA 2020-07-14 07:26:06 EDT
(In reply to Jonah Graham from comment #9)
> (In reply to Rolf Theunissen from comment #3)
> > This is a deadlock caused by CDT:
> > - CDTCommonProjectWizard$1.run(CDTCommonProjectWizard.java:242) tries to run
> > something synchronous on the UI thread.
> > - CDTCommonProjectWizard.invokeRunnable(CDTCommonProjectWizard.java:177) is
> > blocking the UI with a modal dialog
> > 
> > Looks a lot like Bug 321696.
> 
> Bug 321696 (which was a dup of Bug 321640 which is marked as worksforme) was
> apparently resolved by Bug 262032 in the platform's Deadlock Detector.
> 
> While CDT is exposing a problem, the main thread has a modal dialog open,
> but the dialog is back in Display.readAndDispatch so syncexecs from other
> threads should be working fine. 
> 
> AFAICT the bug here is the modal context thread should be getting the lock
> to do the syncexec but is failing to.
> 
> @Shuai, do you have anything in your workspace/.metadata/.log file?
> 
> BTW the Gtk-WARNING and Gtk-CRITICAL can probably be ignored in this
> context. When using the Java version, do you also get a lockup? If so, can
> you provide the jstack for that too?

YES, I also get a lockup. the jstack named jstack_eclipse-java-oxygen-3a-linux-gtk-x86_64.txt.
The different from CDT is that I kill the Eclipse-PID and check the background the project folder is created. But the Wizard-UI cannot finish.
Comment 12 Rolf Theunissen CLA 2020-07-14 07:55:00 EDT
When Eclipse is stuck, do you see the modal dialog? That is, there should be a small dialog on top of your Eclipse IDE. This one should be able to gain focus.

What do you see? What makes you say that Eclipse is stuck? Just asking to get better insights into your problem.
Comment 13 Shuai XinYu CLA 2020-07-14 22:36:12 EDT
Does the small dialog mean "Create a Java Project" dialog?

If so, it always showing up on eclipse doesn't disappear. I can not do anything with eclipse as this time.

I suspect the problem is caused by environmental variables.
Do you have any suggestions on this? Thanks very much.(In reply to Rolf Theunissen from comment #12)
> When Eclipse is stuck, do you see the modal dialog? That is, there should be
> a small dialog on top of your Eclipse IDE. This one should be able to gain
> focus.
> 
> What do you see? What makes you say that Eclipse is stuck? Just asking to
> get better insights into your problem.



Does the small dialog mean "Create a Java Project" dialog?

If so, it always showing up on eclipse doesn't disappear. I can not do anything with eclipse as this time.

I suspect the problem is caused by environmental variables.(Such as PATH or LD_LIBRARY_PATH)
Do you have any suggestions on this? Thanks very much.