Rubymine perpetually stuck scanning files to index

Answered

Hi there,

I've searched around a lot trying to figure out what's going on with my IDE but haven't had much luck. This originally happened on 2018.3, and I've since upgraded to 2019.3 without much luck. I've tried clearing all directories as listed here to try and replicate a fresh start, but am still seeing the same behavior. I've also disabled all downloaded plugins. 

The most I've seen so far involves this error when I try to invalidate caches and restart: 

2020-02-07 10:56:47,055 [ 243709] INFO - il.indexing.FileBasedIndexImpl - Requesting explicit indices invalidation
java.lang.Throwable
at com.intellij.util.indexing.FileBasedIndexImpl.invalidateCaches(FileBasedIndexImpl.java:2577)
at com.intellij.ide.actions.InvalidateCachesAction.actionPerformed(InvalidateCachesAction.java:84)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:298)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:315)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:294)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:263)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:77)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:107)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:116)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:401)
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
at java.desktop/com.apple.laf.ScreenMenuItemCheckbox.itemStateChanged(ScreenMenuItemCheckbox.java:198)
at java.desktop/java.awt.CheckboxMenuItem.processItemEvent(CheckboxMenuItem.java:396)
at java.desktop/java.awt.CheckboxMenuItem.processEvent(CheckboxMenuItem.java:364)
at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:375)
at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:363)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

This seems to be a closely related issue from before, but did not find a related solution: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360002018980-Frequent-cache-corruption-in-2018-3

Here's the entire idea.log - I uploaded it via https://uploads.services.jetbrains.com/?_ga=2.265397263.1445679192.1581036840-1729923346.1577746123

 

4 comments
Comment actions Permalink

Another update - I've been trying at this for hours - this time, I removed every file I could find in ~/Library with the text "rubyname" in the file. On fresh startup, I see this in the logs: 

 


2020-02-07 17:53:12,531 [ 20502] INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index Stubs
java.lang.Throwable
at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:64)
at org.jetbrains.plugins.ruby.settings.RubyMineSettingsInitializer.<init>(RubyMineSettingsInitializer.java:44)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:44)
at com.intellij.serviceContainer.PlatformComponentManagerImpl.instantiateClassWithConstructorInjection(PlatformComponentManagerImpl.kt:505)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:72)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:65)
at com.intellij.serviceContainer.PlatformComponentManagerImpl.createComponents(PlatformComponentManagerImpl.kt:177)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$loadComponents$3(ApplicationImpl.java:346)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
at com.intellij.openapi.application.impl.ApplicationImpl.loadComponents(ApplicationImpl.java:346)
at com.intellij.idea.ApplicationLoader$startApp$6$loadComponentInEdtFuture$1.run(ApplicationLoader.kt:204)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:398)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

It seems that the indexer is still having trouble, getting stuck with no change at "scanning files to index". Manually invalidating the cache throws the same error as above.

0
Comment actions Permalink

Hello Albert,

do I understand it right that you've tried invoking File - Invalidate caches but that didn't help? Would it be possible to check how it goes in the latest 2020.1 EAP? Does it happen in only one certain project?

0
Comment actions Permalink

Yes, invalidating caches did not help. I was able to isolate it to one single project, which I think I was able to debug the root cause. For my specific project, we have a lot of different react apps in subdirectories, which each pull in their own set of node modules. I think the repeated set of javascript dependencies led to too many files/folders for the indexer, which led it to fail silently.

 

I was able to get the indexer to run again once I added 'node_modules' to the 'ignore files and folders' setting in the project preferences, but this is slightly less than ideal since I am unable to run ESlint or other tools which rely on node modules. With the workaround, I'm at least able to continue working, even without all javascript dependencies being indexed. 

0
Comment actions Permalink

Albert,

the problem you described looks similar to https://youtrack.jetbrains.com/issue/WEB-41606 So in case you still face infinite indexing of node modules in 2020.1 EAP it's worth submitting an issue on the tracker: https://youtrack.jetbrains.com/issues/WEB (the project responsible for Node.js) and providing there the whole logs' folder.

0

Please sign in to leave a comment.