Bug 528941 - org.eclipse.swt.internal.gtk.OS.Call freezes whole debian UI
Summary: org.eclipse.swt.internal.gtk.OS.Call freezes whole debian UI
Status: CLOSED DUPLICATE of bug 266985
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2017-12-19 05:47 EST by Klemen Živkovič CLA
Modified: 2018-04-23 15:38 EDT (History)
2 users (show)

See Also:


Attachments
JStack thread dump (35.55 KB, application/octet-stream)
2017-12-19 10:23 EST, Klemen Živkovič CLA
no flags Details
jstack thread dump (26.90 KB, text/plain)
2018-04-23 15:32 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klemen Živkovič CLA 2017-12-19 05:47:52 EST
While debug stepping through java code, eclipse completely freezes UI, until I issue pkill java.

I am on:
uname -a
Linux debian-kz 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux

wmctrl -m
Name: Compiz
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF

Eclipse Platform
Version: 4.6.3.v20170301-0400
Build id: M20170301-0400


While using thread dump i see this:

"main" #1 prio=6 os_prio=0 tid=0x00007f72dc00a000 nid=0x7443 runnable [0x00007f72e3e30000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.gtk.OS.Call(Native Method)
        at org.eclipse.swt.widgets.Display.sleep(Display.java:5066)
        at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:368)
        at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:888)
        at org.eclipse.ui.internal.Workbench$3.eventLoopIdle(Workbench.java:526)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1126)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Comment 1 Klemen Živkovič CLA 2017-12-19 07:44:10 EST
Happens also on:
Eclipse
Version: 4.7.1.v20171009-0410
Build id: M20171009-0410
Comment 2 Dani Megert CLA 2017-12-19 09:53:20 EST
Can you provide some stack traces?

https://wiki.eclipse.org/How_to_report_a_deadlock
Comment 3 Klemen Živkovič CLA 2017-12-19 10:23:28 EST
Created attachment 271965 [details]
JStack thread dump

full thread dump, taken from another terminal in the moment when freeze of ui happened.
If it helps - If I wrap problematic code in swingworker.invokelater - this doesn't happen - however - I still think nomater how wrong code is - eclipse should not freeze guest os UI.
Comment 4 Klemen Živkovič CLA 2017-12-19 10:27:16 EST
For example debug stepping through this code:

	private void jQueryTemplateItemItemStateChanged(ItemEvent event) {
//		SwingUtilities.invokeLater(new Runnable() {
//			
//			@Override
//			public void run() {
				if (event.getStateChange() == ItemEvent.SELECTED) {
					prop.setProperty("selectedQuery", ((DocumentumQuery) getJQueryTemplate().getSelectedItem()).getName());
					saveProp();

					prepareQuery();
					SettingsQueryColumn.getInstance().initComponents();
					runQuery();
				}
//			}
//		});
		
	}


freezes/locks UI, whereas stepping throught this code:

	private void jQueryTemplateItemItemStateChanged(ItemEvent event) {
		SwingUtilities.invokeLater(new Runnable() {
			
			@Override
			public void run() {
				if (event.getStateChange() == ItemEvent.SELECTED) {
					prop.setProperty("selectedQuery", ((DocumentumQuery) getJQueryTemplate().getSelectedItem()).getName());
					saveProp();

					prepareQuery();
					SettingsQueryColumn.getInstance().initComponents();
					runQuery();
				}
			}
		});
		
	}


doesn't freeze it.
Comment 5 Karsten Thoms CLA 2018-04-23 15:32:22 EDT
Created attachment 273737 [details]
jstack thread dump

This one happened today on Xtext's JIPP Jenkins while executing UI tests for Xtend in this job:
https://ci.eclipse.org/xtext/job/xtext-xtend/job/master/

Details on the ci.eclipse.org environment can be given by webmaster.
Comment 6 Karsten Thoms CLA 2018-04-23 15:38:03 EDT
Likely a DUP of bug#266985

*** This bug has been marked as a duplicate of bug 266985 ***