Bug 540923 - infinite loop when closing an editor
Summary: infinite loop when closing an editor
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.10   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2018-11-08 09:53 EST by Enrico Persiani CLA
Modified: 2020-12-24 08:07 EST (History)
3 users (show)

See Also:


Attachments
Thread dump of the Eclipse process made using VisualVM (23 bytes, application/octet-stream)
2018-11-08 09:53 EST, Enrico Persiani CLA
no flags Details
Thread dump of the Eclipse process with UI in deadlock state (118.36 KB, text/plain)
2018-12-24 06:04 EST, Enrico Persiani CLA
no flags Details
Thread dump of the Eclipse process with UI in deadlock state (eclipse code only) (110.33 KB, text/plain)
2018-12-24 11:24 EST, Enrico Persiani CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico Persiani CLA 2018-11-08 09:53:34 EST
Created attachment 276511 [details]
Thread dump of the Eclipse process made using VisualVM

Occasionally, I get the UI deadlock while closing an editor due to the PartServiceImpl trying to show another editor (I suspect that the editor being shown was previously hidden, since the bug occurs only when there are hidden editors in the same pane of the one being closed).

Here's some details about my environment:

JVM

java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

VM Args

-Xmx4096m -Xms2048m

OS details

Available system memory is 16GB. During deadlock only 10GB where used effectively.

Sadly, I didn't found a way to reproduce the bug in a deterministic way.
Comment 1 Lars Vogel CLA 2018-11-15 07:12:18 EST
Enrico, can you reproduce this with the latest I-Build of the Eclipse SDK? See http://download.eclipse.org/eclipse/downloads/

If yes, please provide reproducible steps.
Comment 2 Enrico Persiani CLA 2018-12-24 06:04:15 EST
Created attachment 276994 [details]
Thread dump of the Eclipse process with UI in deadlock state

The previous stack was empty, this last dump has been made from stable Eclipse 2018-12.
Comment 3 Andrey Loskutov CLA 2018-12-24 06:48:20 EST
(In reply to Enrico Persiani from comment #2)
> Created attachment 276994 [details]
> Thread dump of the Eclipse process with UI in deadlock state
> 
> The previous stack was empty, this last dump has been made from stable
> Eclipse 2018-12.

Top of the stack shows non Ecliose code "org.whole". Please uninstall this plugin (no odea what it is) and check if problem remains. If yes, please attach another dump. If not, it is not an Eclipse issue.

"main" #1 prio=6 os_prio=31 cpu=415538.08ms elapsed=5024.69s allocated=60G defined_classes=19676 tid=0x00007f8164001000 nid=0x307 runnable  [0x00007ffee6774000]
   java.lang.Thread.State: RUNNABLE
	at java.security.AccessController.getStackAccessControlContext(java.base@11.0.1/Native Method)
	at java.security.AccessController.getContext(java.base@11.0.1/AccessController.java:831)
	at java.net.URLClassLoader.<init>(java.base@11.0.1/URLClassLoader.java:119)
	at org.whole.gen.util.JDTUtils.createClassLoader(JDTUtils.java:313)
	at org.whole.gen.util.JDTResourceBindingsContributor.addResourceBindings(JDTResourceBindingsContributor.java:47)
	at org.whole.lang.ui.util.ResourceUtils.defineResourceBindings(ResourceUtils.java:80)
	at org.whole.lang.codebase.IFilePersistenceProvider.defineBindings(IFilePersistenceProvider.java:50)
	at org.whole.lang.e4.ui.util.E4Utils.defineResourceBindings(E4Utils.java:291)
	at org.whole.lang.e4.ui.parts.AbstractE4Part.updateSelection(AbstractE4Part.java:184)
	at org.whole.lang.e4.ui.parts.AbstractE4Part$3.focusChanged(AbstractE4Part.java:138)
	at org.whole.lang.e4.ui.viewers.E4GraphicalViewer.firePartFocusChanged(E4GraphicalViewer.java:334)
	at org.whole.lang.e4.ui.viewers.E4GraphicalViewer.setFocus(E4GraphicalViewer.java:511)
	at org.whole.lang.e4.ui.viewers.E4GraphicalViewer.handleFocusLost(E4GraphicalViewer.java:504)
	at org.eclipse.gef.ui.parts.GraphicalViewerImpl$2.focusLost(GraphicalViewerImpl.java:280)
Comment 4 Enrico Persiani CLA 2018-12-24 11:24:16 EST
Created attachment 276995 [details]
Thread dump of the Eclipse process with UI in deadlock state (eclipse code only)

I added the original thread dump produced on Eclipse Oxygen (note the slightly different source code line numbers) to demonstrate that the bug does not depends on the part being shown: if you look at both stacks, you'll notice that all the frames but the topmost are quite similar.
Comment 5 Dani Megert CLA 2018-12-26 10:05:31 EST
(In reply to Enrico Persiani from comment #4)
> Created attachment 276995 [details]
> Thread dump of the Eclipse process with UI in deadlock state (eclipse code
> only)

That does not look like a deadlock.
Comment 6 Enrico Persiani CLA 2018-12-26 13:10:24 EST
I agree on the fact that it seems more an infinite recursion, but I adopted the definition of Eclipse in deadlock state given here:

https://wiki.eclipse.org/How_to_report_a_deadlock
Comment 7 Eclipse Genie CLA 2020-12-24 08:07:31 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.