Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI freeze with hotspot in JavaModelManager.determineIfOnClasspath() #3470

Open
jukzi opened this issue Dec 17, 2024 · 1 comment
Open

UI freeze with hotspot in JavaModelManager.determineIfOnClasspath() #3470

jukzi opened this issue Dec 17, 2024 · 1 comment

Comments

@jukzi
Copy link
Contributor

jukzi commented Dec 17, 2024

I just had a ~ 2min UI freeze after changing branches while Package Explorer was open
image

eclipse.buildId=4.35.0.I20241216-1800

Example stack trace:

"main" #1 [29680] prio=6 os_prio=0 cpu=537109.38ms elapsed=9777.28s tid=0x0000023f2ceb4fa0 nid=29680 runnable  [0x000000cc5592c000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.core.internal.resources.ProjectPreferences.internalGet(ProjectPreferences.java:525)
        at org.eclipse.core.internal.preferences.EclipsePreferences.get(EclipsePreferences.java:447)
        at org.eclipse.jdt.internal.core.JavaModelManager.getOption(JavaModelManager.java:2349)
        at org.eclipse.jdt.internal.core.JavaProject.getOption(JavaProject.java:2061)
        at org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath(JavaModelManager.java:1121)
        at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:1011)
        at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:3799)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.getHierarchicalPackagesInFolder(PackageExplorerContentProvider.java:490)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.getFolderContent(PackageExplorerContentProvider.java:284)
        at org.eclipse.jdt.ui.StandardJavaElementContentProvider.getChildren(StandardJavaElementContentProvider.java:193)
        at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.getChildren(PackageExplorerContentProvider.java:309)
        at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.getChildren(JavaNavigatorContentProvider.java:177)
        at org.eclipse.jdt.ui.StandardJavaElementContentProvider.hasChildren(StandardJavaElementContentProvider.java:240)
        at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.hasChildren(JavaNavigatorContentProvider.java:165)
        at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:110)
        at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.callNormalHasChildren(NavigatorContentServiceContentProvider.java:444)
        at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.pipelineHasChildren(NavigatorContentServiceContentProvider.java:463)
        at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$3.run(NavigatorContentServiceContentProvider.java:413)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
        at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:392)
        at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:436)
        at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2262)
        at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:553)
        at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2299)
        at org.eclipse.jface.viewers.AbstractTreeViewer.optionallyPruneChildren(AbstractTreeViewer.java:3064)
        at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2859)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:2031)
        at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:684)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:2037)
        at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:684)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:2037)
        at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:684)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:2037)
        at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:684)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:2004)
        at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1961)
        at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:529)
        at org.eclipse.jface.viewers.StructuredViewer.lambda$3(StructuredViewer.java:1486)
        at org.eclipse.jface.viewers.StructuredViewer$$Lambda/0x0000023f516bbde0.run(Unknown Source)
        at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392)
        at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:367)
        at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353)
        at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1486)
        at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:533)
        at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:352)
        at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:492)
        at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1417)
        at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$WorkingSetManagerListener.propertyChange(WorkingSetActionProvider.java:116)
        at org.eclipse.ui.internal.AbstractWorkingSetManager$5.run(AbstractWorkingSetManager.java:378)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
        at org.eclipse.ui.internal.AbstractWorkingSetManager.lambda$1(AbstractWorkingSetManager.java:386)
        at org.eclipse.ui.internal.AbstractWorkingSetManager$$Lambda/0x0000023f51783c38.run(Unknown Source)
        at org.eclipse.ui.internal.AbstractWorkingSetManager.firePropertyChange(AbstractWorkingSetManager.java:391)
        at org.eclipse.ui.internal.AbstractWorkingSetManager.workingSetChanged(AbstractWorkingSetManager.java:410)
        at org.eclipse.ui.internal.WorkingSetManager.workingSetChanged(WorkingSetManager.java:157)
        at org.eclipse.ui.internal.AbstractWorkingSet.fireWorkingSetChanged(AbstractWorkingSet.java:137)
        at org.eclipse.ui.internal.WorkingSet.setElements(WorkingSet.java:240)
        at org.eclipse.oomph.workingsets.presentation.WorkingSetManager.apply(WorkingSetManager.java:217)
        at org.eclipse.oomph.workingsets.presentation.WorkingSetManager$3.run(WorkingSetManager.java:429)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
        - locked <0x0000000704a2b730> (a org.eclipse.swt.widgets.RunnableLock)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4082)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
        at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:663)
        at org.eclipse.ui.internal.Workbench$$Lambda/0x0000023f511f7d30.run(Unknown Source)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:570)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:178)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
        at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic([email protected]/DirectMethodHandle$Holder)
        at java.lang.invoke.LambdaForm$MH/0x0000023f51007800.invoke([email protected]/LambdaForm$MH)
        at java.lang.invoke.LambdaForm$MH/0x0000023f51007c00.invokeExact_MT([email protected]/LambdaForm$MH)
        at jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl([email protected]/DirectMethodHandleAccessor.java:155)
        at jdk.internal.reflect.DirectMethodHandleAccessor.invoke([email protected]/DirectMethodHandleAccessor.java:103)
        at java.lang.reflect.Method.invoke([email protected]/Method.java:580)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

sampling:

image

@jukzi
Copy link
Contributor Author

jukzi commented Dec 17, 2024

jukzi added a commit to jukzi/eclipse.jdt.core that referenced this issue Dec 18, 2024
…dt#3470

Instead of randomly looping over all projects try the last successful
first.

Tested by JavaModelTests.testCreatePkgHandleInDifferentProject()

eclipse-jdt#3470
jukzi added a commit to jukzi/eclipse.jdt.core that referenced this issue Dec 18, 2024
…dt#3470

Instead of randomly looping over all projects try the last successful
first.

Tested by JavaModelTests.testCreatePkgHandleInDifferentProject()

eclipse-jdt#3470
jukzi added a commit to jukzi/eclipse.jdt.core that referenced this issue Dec 18, 2024
…dt#3470

Instead of randomly looping over all projects try the last successful
first.

Tested by JavaModelTests.testCreatePkgHandleInDifferentProject()

eclipse-jdt#3470
jukzi added a commit to jukzi/eclipse.jdt.core that referenced this issue Dec 18, 2024
…dt#3470

Instead of randomly looping over all projects try the last successful
first.

Tested by JavaModelTests.testCreatePkgHandleInDifferentProject()

eclipse-jdt#3470
jukzi added a commit that referenced this issue Dec 20, 2024
Instead of randomly looping over all projects try the last successful
first.

Tested by JavaModelTests.testCreatePkgHandleInDifferentProject()

#3470
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant