SonarLint 10.5: File system cache errors cause crash

Regarding using the recent update with IntelliJ 2024.1.
A colleague of mine experienced the following:


A ThreadDump was not available since it crashed.

Hi @dalemb,

Can you verify that your colleague is using 10.5?

 
Thx,
Ann

Hi Ann,

he used the same as me → SonarLint 10.5.0.78339

Kr Daniel

1 Like

Hi Daniel,

Thanks for confirming. I’ve split this to a new topic since it appears (to me) to be a different error.

I’m going to flag this for the SonarLint experts. On your side, could you invite your colleague to the thread so you’re not forced to be the intermediary indefinitely?

 
Thx,
Ann

Hi @dalemb, thank you for your report! We were unaware of this issue, so I created this ticket.

If it ever happens again, could you please share the full stack trace? Also, it would help us greatly if you could tell us which file it failed in. As I understand, we try to get a virtual file’s length (filesize), which appears to cause this issue. Perhaps this is a binary file? Do you have any huge files in your project?

In any case, we will improve the behavior for the next release.

As far as I know, we do not have huge files.

It also happen for somebody else trying to update from 2023.3.6 to 2024.1.
He had the same error, but after a restart it appears to be working, we’ll keep an eye on it.

This would the according thread dump:
threadDump-20240503-100443.txt (443.3 KB)

2 Likes

Hallo,

i’m using SonarLint 10.10.0.79575 and IntelliJ IDEA 2024.2.3 Build #IU-242.23339.11, built on September 25, 2024 and still see this error:

When deinstalling SonarLint, this error did not occur, so i expect SonarLint as reason for this issue.

In my idea.log i see the following exception within the time frame:

2024-09-26 10:54:12,955 [1195600]   INFO - #c.i.o.p.DumbServiceImpl - enter dumb mode [Head]
2024-09-26 10:54:12,982 [1195627]   INFO - #c.i.o.p.MergingQueueGuiExecutor - Running task: (dumb mode task) com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$MyDumbModeTask@38d36bd1 (reason: Push on VFS changes)
2024-09-26 10:54:13,016 [1195661]   INFO - #c.i.o.p.MergingQueueGuiExecutor - Task finished: (dumb mode task) com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$MyDumbModeTask@38d36bd1 (reason: Push on VFS changes)
2024-09-26 10:54:13,038 [1195683] SEVERE - #c.i.o.a.i.AnyThreadWriteThreadingSupport - java.io.IOException: Overflow: storageId(=2157270105) > MAX_INT(2147483647)
java.io.UncheckedIOException: java.io.IOException: Overflow: storageId(=2157270105) > MAX_INT(2147483647)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.lambda$static$0(FSRecordsImpl.java:148)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1390)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:529)
	at com.intellij.openapi.fileEditor.impl.LoadTextUtil.loadText(LoadTextUtil.java:509)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.loadText(FileDocumentManagerBase.java:113)
	at com.intellij.openapi.fileEditor.impl.FileDocumentManagerBase.getDocument(FileDocumentManagerBase.java:63)
	at com.github.copilot.lsp.LSPUtil.createTextDocument(LSPUtil.java:35)
	at com.github.copilot.lsp.LSPManager.lambda$doNotifyDidOpen$1(LSPManager.java:199)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:264)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at com.github.copilot.lsp.LSPManager.doNotifyDidOpen(LSPManager.java:199)
	at com.github.copilot.lsp.LSPManager.notifyDidOpen(LSPManager.java:64)
	at com.github.copilot.lsp.LSPAsyncFileChangesListener$LSPChangeApplier.handlePropertyChangeEvent(LSPAsyncFileChangesListener.java:129)
	at com.github.copilot.lsp.LSPAsyncFileChangesListener$LSPChangeApplier.handleEvent(LSPAsyncFileChangesListener.java:85)
	at com.github.copilot.lsp.LSPAsyncFileChangesListener$LSPChangeApplier.afterVfsChangeAsync(LSPAsyncFileChangesListener.java:71)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:134)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: Overflow: storageId(=2157270105) > MAX_INT(2147483647)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storageIdToContentId(VFSContentStorageOverMMappedFile.java:428)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:228)
	at com.intellij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1318)
	... 31 more
	Suppressed: java.io.IOException: content[37548b], cryptoHash[4d 23 4d 45 53 2c 3c 02 a3 5d db 1d 18 c8 8c 8b 2e 49 3f d5], hash(=1294159173)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:235)
		... 33 more

Not sure if this is the reason for the error message shown. But i expect the issue: [SLI-1387] - Jira is still not fixed.

Hi @pschwarzer-tt, thanks for notifying us about that, this is effectively concerning. As I understand from your message, even though the stack trace appears related to Copilot, SonarLint might be the plugin causing this issue. We might be reading too large files, consuming the total file system cache available in the IDE.

I have reopened the ticket, and I will try to make an improvement on this.

Is it possible for you to share with us a reproducible project where this issue occurs? If not, could you share more information about your project specificities? Does it contain any large files, for instance?

Sharing the project is not possible. But it is a very huge project containing different languages (C++, Java, Typescript, XML, HTML, Less, Kotlin). We are using Gradle Kotlin as build tool.

In the build log, i could not identify any huge file, which are read during the exception.
Does this somehow help?

Thank you for your information, this should help to a certain extent. The root cause is still not clear, but I will try to improve on this area and see if we can iterate and make progress from there.

1 Like

Hey @pschwarzer-tt, we have just released SonarLint version 10.11, could you please have a try and see if you notice any improvements? I made quite a lot of refactoring that should reduce the file system usage, hopefully limiting the cache impact.

1 Like

Hello, i tested the new version 10.11.0.79648 but still see the error.

I get 3 exceptions shown in IntelliJ:

1st:

java.io.UncheckedIOException: java.nio.channels.ClosedByInterruptException
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.lambda$static$0(FSRecordsImpl.java:148)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1390)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at com.intellij.openapi.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:798)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:736)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listFiles$lambda$27$lambda$26(SonarLintIntelliJClient.kt:677)
	at org.sonarlint.intellij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.nio.channels.ClosedByInterruptException
	at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:200)
	at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
	at java.base/sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:430)
	at com.intellij.util.io.IOUtil.allocateFileRegion(IOUtil.java:384)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.ensureFileRegionAllocatedAndZeroed(MMappedFileStorage.java:515)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.map(MMappedFileStorage.java:471)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage$Page.<init>(MMappedFileStorage.java:453)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:422)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
	at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)
	at com.intellij.platform.util.io.storages.appendonlylog.AppendOnlyLogOverMMappedFile.append(AppendOnlyLogOverMMappedFile.java:530)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:222)
	at com.intellij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1318)
	... 22 more
	Suppressed: java.io.IOException: content[...], cryptoHash[...], hash()
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:235)
		... 24 more

2nd:

com.intellij.serviceContainer.AlreadyDisposedException: VFS is already closed (disposed)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.alreadyClosedException(FSRecordsImpl.java:467)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1382)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at com.intellij.openapi.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:798)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:736)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listFiles$lambda$27$lambda$26(SonarLintIntelliJClient.kt:677)
	at org.sonarlint.intellij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	Suppressed: com.intellij.util.io.ClosedStorageException: Storage already closed
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:414)
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)
		at com.intellij.platform.util.io.storages.appendonlylog.AppendOnlyLogOverMMappedFile.append(AppendOnlyLogOverMMappedFile.java:530)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:222)
		at com.intellij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
		at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
		at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1318)
		... 22 more
		Suppressed: java.io.IOException: content[...], cryptoHash[..], hash(...)
			at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:235)
			... 24 more

3rd:

com.intellij.serviceContainer.AlreadyDisposedException: VFS is already closed (disposed)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.alreadyClosedException(FSRecordsImpl.java:467)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1382)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.build(StubTreeLoaderImpl.java:58)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:50)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTreeOrFileElement(PsiFileImpl.java:708)
	at com.intellij.psi.impl.source.PsiFileImpl.withGreenStubOrAst(PsiFileImpl.java:648)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getCachedData(JSFileBaseImpl.java:49)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getTestFileType(JSFileBaseImpl.java:108)
	at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.isTestFile(JSFileBaseImpl.java:103)
	at com.intellij.javascript.testFramework.JsTestFileIndexingHandler.isTestFile(JsTestFileIndexingHandler.java:92)
	at com.intellij.javascript.testing.JsTestSourcesFilter.isTestSource(JsTestSourcesFilter.java:12)
	at com.intellij.openapi.roots.TestSourcesFilter.isTestSources(TestSourcesFilter.java:32)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto$lambda$43(SonarLintIntelliJClient.kt:797)
	at org.sonarlint.intellij.common.ui.ReadActionUtils$Companion.computeReadActionSafely$lambda$2(ReadActionUtils.kt:51)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:264)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at org.sonarlint.intellij.common.ui.ReadActionUtils$Companion.computeReadActionSafely(ReadActionUtils.kt:50)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:797)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:736)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listFiles$lambda$27$lambda$26(SonarLintIntelliJClient.kt:677)
	at org.sonarlint.intellij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
	at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
	Suppressed: com.intellij.util.io.ClosedStorageException: Storage already closed
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:414)
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
		at com.intellij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)
		at com.intellij.platform.util.io.storages.appendonlylog.AppendOnlyLogOverMMappedFile.append(AppendOnlyLogOverMMappedFile.java:530)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:222)
		at com.intellij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
		at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
		at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1318)
		... 36 more
		Suppressed: java.io.IOException: content[...], cryptoHash[...], hash(...)
			at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:235)
			... 38 more

1 Like

Somehow, this looks promising as these errors do not relate to the original issue you had. They are likely coming from the new 10.11 version. We had a minor release today, version 10.11.1, which contains a fix about this.

Could you please upgrade once more and see if the problem persists?

1 Like

Installed the newest version 10.11.1.79663 now. After restart i saw the error again. But i choosed restart of IntelliJ and after that, i do not see the issue again. Before, it occured always after restarting IntelliJ. I test the new version some days and report back my results.

For now, i so not see the issue. Thanks a lot for looking into this problem.

2 Likes

I do not have good news. Today i saw the error “IDE required a restart” again. So it still seems to happen also with the newest plugin version. The worst thing is, there is no exception in the idea.log anymore. So i can not give any detail, what could be the reason :frowning:. But the MAX_INT error is not shown anymore.

I checked the new plugin version with a colleague and we both had connection issues with the SonarQube server before the error occured. I described this issue here: SonarLint 10.4.2: analysis hanging with newer plugin-versions in IntelliJ

Not sure, if this is linked somehow.

I continue monitoring the issue and report back, when something in the idea.log comes up.

Hi, today i got the error again. I checked the SonarLint log and found multiple errors of that kind:

Analysing '...' (ID 60219bc1-9581-4d95-ae9e-00f61c91b283)...
 [2024-10-11T08:38:53.018] [SonarLint Server RPC request executor] INFO sonarlint - Git Repository not found for E:\ The path E:\ is not in a Git repository
Internal error: java.io.UncheckedIOException: java.io.IOException: Overflow: storageId(=2147516659) > MAX_INT(2147483647)
java.util.concurrent.CompletionException: java.io.UncheckedIOException: java.io.IOException: Overflow: storageId(=2147516659) > MAX_INT(2147483647)
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.UncheckedIOException: java.io.IOException: Overflow: storageId(=2147516659) > MAX_INT(2147483647)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.lambda$static$0(FSRecordsImpl.java:148)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1390)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
	at com.intellij.openapi.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto$lambda$44(SonarLintIntelliJClient.kt:812)
	at org.sonarlint.intellij.common.ui.ReadActionUtils$Companion.computeReadActionSafely$lambda$5(ReadActionUtils.kt:78)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:264)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at org.sonarlint.intellij.common.ui.ReadActionUtils$Companion.computeReadActionSafely(ReadActionUtils.kt:77)
	at org.sonarlint.intellij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:806)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:749)
	at org.sonarlint.intellij.SonarLintIntelliJClient.listFiles(SonarLintIntelliJClient.kt:692)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$31(SonarLintRpcClientImpl.java:348)
	at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:124)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	... 4 more
Caused by: java.io.IOException: Overflow: storageId(=2147516659) > MAX_INT(2147483647)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storageIdToContentId(VFSContentStorageOverMMappedFile.java:428)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:228)
	at com.intellij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
	at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1318)
	... 24 more
	Suppressed: java.io.IOException: content[564b], cryptoHash[...], hash(=...)
		at com.intellij.openapi.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:235)
		... 26 more

Error during analysis ID 60219bc1-9581-4d95-ae9e-00f61c91b283
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Internal error.
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:204)
	at org.sonarsource.sonarlint.core.rpc.protocol.SingleThreadedMessageConsumer.lambda$new$0(SingleThreadedMessageConsumer.java:51)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

So i need to correct myself, the overflow issue is still there with the latest SonarLint plugin version.

Before i got this exception, i had to reconnect the our VPN network, thats why the repository was shortly not available. Thats why we see “Git Repository not found” in the error message.

Thank you very much for the information you provided. I think this is very useful and I may have another hypothesis on what is happening. I believe that your recurrent disconnections are triggering additional file indexing on SonarLint, leading to this memory issue. I will continue on the investigation and keep you updated on the progress.

1 Like

Thanks a lot, we really want to get this fixed, so we can use the SonarLint plugin again. In the current state, we cant.

Anything new here?

Hello @pschwarzer-tt, sorry for the delay. The investigation is still not entirely done.

In the meantime, I created this custom build for you, it includes some improvements based on the logs you provided. I would invite you to install it and see if you are still facing some issues. If you do, please share the logs with us, as it greatly helps us.

Thank you!

1 Like