Bug 458976 - 2.13.6-1 makes application hang 2.13.5-1 does not
2.13.6-1 makes application hang 2.13.5-1 does not
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gtk2 (Show other bugs)
rawhide
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
http://koji.fedoraproject.org/koji/pa...
:
Depends On:
Blocks: F10Blocker/F10FinalBlocker
  Show dependency treegraph
 
Reported: 2008-08-13 11:18 EDT by Douglas Miles
Modified: 2008-09-25 15:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-25 15:01:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Douglas Miles 2008-08-13 11:18:03 EDT
Description of problem:

GTK2 is used in Eclipse IDE (eclipse.org) to display it's source code editors
All tested versions of eclipse 3.2/3.3/3.4 old and new work fine with 
gtk2-2.13.5-1 and earier.

2.13.6-1 and newer makes application hang when it os first going to show a source code editor.

At first glance this might seem like an Eclipse application bug, however this effects very anchient incarnations of eclipse as well as new ones. and is narrowed down to as recent as 5 versions back of gtk2. 



Version-Release number of selected component (if applicable):
 2.12.11-1 cant reproduce
 2.13.5-1 cant reproduce
 2.13.6-1 reproduces this 
 2.13.6-2 reproduces this 
 2.13.6-3 reproduces this 


How reproducible:
Every time.
possible x86_64 is required.



Steps to Reproduce:
1. Install Eclipse (Fedora Eclispe is fine (any version)) yum install eclipse
2. Install 2.13.6-1 or later.
3. Start eclipse.
4. Create a new project.
5. Create a .java file in the project.
6. Try to open the java file.
  
Actual results:
The editor sits there blank waiting for gtk2 to tell it that the view pane (drawing?)  is completed.

Expected results:
For the "Java File" view part to start

Additional info:

Since eclipse is waiting for the call to gtk2 to return it is possible to queue up more tasks in eclipse.. Like opening a properties dialog.. these dialogs do not depend on GTK2.  Shut down eclipse from the File menu.. Eclipse will give up waiting for GTK2 and the forementioned queued windows will pop up.


Steps to workarround:
use 2.13.5-1 or earier
Comment 1 Douglas Miles 2008-08-13 11:24:45 EDT
used http://koji.fedoraproject.org/koji/packageinfo?packageID=190 to test

 Page:  1 2 1 through 50 of 98 >>>  
NVR  Built by  Finished  State  
gtk2-2.13.6-4.fc10 mclasen 2008-08-13 05:27:56  
gtk2-2.13.6-3.fc10 mclasen 2008-08-11 21:43:33  
gtk2-2.13.6-2.fc10 mclasen 2008-08-10 03:36:22  
gtk2-2.13.6-1.fc10 mclasen 2008-08-05 22:40:39  
----------here was the transition -----------
gtk2-2.13.5-1.fc10 mclasen 2008-07-22 03:28:04  
gtk2-2.13.4-2.fc10 mclasen 2008-07-10 17:15:38  
gtk2-2.13.4-1.fc10 mclasen 2008-07-05 23:17:46
Comment 2 Matthias Clasen 2008-08-14 16:17:49 EDT
If you could attach with gdb to the editor when it gets stuck and generate a stacktrace, that might be helpful.
Comment 3 Douglas Miles 2008-08-15 04:45:58 EDT
Here is java's quick version of a stack trace "_gtk_enumerate_printers"

(I am having trouble getting gdb to give me anyhting usefull at the moment) 

Reading symbols from /usr/lib64/gtk-2.0/2.10.0/printbackends/libprintbackend-file.so...done.
Reading symbols from /usr/lib64/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so...done.



main" prio=10 tid=0x0000000001df6800 nid=0x30d4 runnable [0x0000000000504000..0x0000000000507e90]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.swt.internal.gtk.OS._gtk_enumerate_printers(Native Method)
        at org.eclipse.swt.internal.gtk.OS.gtk_enumerate_printers(OS.java:6459)
        at org.eclipse.swt.printing.Printer.getPrinterList(Printer.java:88)
        at org.eclipse.jface.text.TextViewer.isPrintable(TextViewer.java:4160)
        at org.eclipse.jface.text.TextViewer.canDoOperation(TextViewer.java:3697)
        at org.eclipse.jface.text.source.SourceViewer.canDoOperation(SourceViewer.java:701)
        at org.eclipse.jface.text.source.projection.ProjectionViewer.canDoOperation(ProjectionViewer.java:1525)
        at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.canDoOperation(JavaSourceViewer.java:200)
        at org.eclipse.ui.texteditor.TextOperationAction.update(TextOperationAction.java:157)
        at org.eclipse.ui.texteditor.TextOperationAction.<init>(TextOperationAction.java:103)
        at org.eclipse.ui.texteditor.AbstractTextEditor.createActions(AbstractTextEditor.java:5526)
        at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createActions(AbstractDecoratedTextEditor.java:1090)
        at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createActions(JavaEditor.java:2625)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createActions(CompilationUnitEditor.java:1042)
        at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3361)
        at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
        at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:394)
        at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createPartControl(JavaEditor.java:3033)
        at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl(CompilationUnitEditor.java:1459)
        at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
        at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
        at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
        at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
        at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
        at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
        at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
        at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
        at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
        at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
        at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
        at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
        at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
        at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
        at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
        at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217)
        at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207)
        at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:779)
        at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:678)
        at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:639)
        at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2817)
        at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)
        at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)
        at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652)
        at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643)
        at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:331)
        at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:194)
        at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
        at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:207)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:363)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:603)
        at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:886)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
        at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818)
        at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
        at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183)
        at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
        at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
        at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Comment 4 Andrew Overholt 2008-08-15 10:36:34 EDT
Douglas:  your stacktrace looks decent enough to me, but in case you wondered, [1] has details on how to produce one from Eclipse.

It looks like this may be this bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234

Upstream notes on how to work around this issue:

http://www.eclipse.org/swt/faq.php#printOnGTKHangs
-> eclipse -vmargs -Dorg.eclipse.swt.internal.gtk.disablePrinting

https://bugs.eclipse.org/bugs/show_bug.cgi?id=213487#c8

indicates that upstream Eclipse believes it to be a gtk bug but I can't find a reference to one.

Matthias:  are you aware of such a bug?  There are a few other interesting bits of information here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234#c11
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215234#c12

[1]
http://wiki.eclipse.org/index.php/How_to_report_a_deadlock
Comment 5 Douglas Miles 2008-08-16 04:46:49 EDT
Andrew, thank you for the -Dorg.eclipse.swt.internal.gtk.disablePrinting.
It did workarround this!

Also of note: 
"gtk_enumerate_printers needs events to complete" 
http://bugzilla.gnome.org/show_bug.cgi?id=346903

In my case and (probably many others) my unix printing (cups etc) isn't configured corretly. And cups or smb is causing the blocking to gtk2.
Comment 6 Matthias Clasen 2008-08-16 15:37:51 EDT
FYI: I've reopened the upstream bug, and I think we can at least prevent gtk_enumerate_printers() from blocking if cups is not responding.
Comment 7 Matthias Clasen 2008-09-25 15:01:16 EDT
Should be fixed in rawhide

Note You need to log in before you can comment on or make changes to this bug.