While restarting IntelliJ, every time on IntelliJ restart, since I upgraded to IntelliJ 2024.2 and latest Sonarlint.
c.ij.serviceContainer.AlreadyDisposedException: VFS is already closed (disposed)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.alreadyClosedException(FSRecordsImpl.java:467)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1382)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
at c.ij.oa.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
at o.sl.ij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:798)
at o.sl.ij.SonarLintIntelliJClient.listProjectFiles(SonarLintIntelliJClient.kt:758)
at o.sl.ij.SonarLintIntelliJClient.listFiles$lambda$30$lambda$29(SonarLintIntelliJClient.kt:680)
at o.sl.ij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
at c.ij.oa.ap.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
at c.ij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at c.ij.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: c.ij.util.io.ClosedStorageException: Storage already closed
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:414)
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)
at c.ij.platform.util.io.storages.appendonlylog.AppendOnlyLogOverMMappedFile.append(AppendOnlyLogOverMMappedFile.java:530)
at c.ij.oa.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:222)
at c.ij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
at c.ij.oa.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
Hello @fcsonar, thanks for notifying us about this. I’m not aware of such an issue, and I’m not exactly sure how SonarLint could be responsible for it.
Could you try deleting the cache under ~/.cache/JetBrains/IntelliJIdea2024.2
Could you try without SonarLint and see if you face the same issue
Testing on another project or with another IDE version could be great as well
In the meantime, we are going to further investigate.
c.ij.serviceContainer.AlreadyDisposedException: VFS is already closed (disposed)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.alreadyClosedException(FSRecordsImpl.java:467)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.handleError(FSRecordsImpl.java:1382)
at c.ij.oa.vfs.newvfs.persistent.FSRecordsImpl.writeContent(FSRecordsImpl.java:1326)
at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.writeContent(PersistentFSImpl.java:491)
at c.ij.oa.vfs.newvfs.persistent.PersistentFSImpl.contentsToByteArray(PersistentFSImpl.java:838)
at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:120)
at c.ij.oa.vfs.newvfs.impl.VirtualFileImpl.contentsToByteArray(VirtualFileImpl.java:109)
at c.ij.oa.vfs.VfsUtilCore.loadBytes(VfsUtilCore.java:415)
at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.computeCharset(VirtualFileSystemEntry.java:500)
at c.ij.oa.vfs.newvfs.impl.VirtualFileSystemEntry.getCharset(VirtualFileSystemEntry.java:483)
at o.sl.ij.SonarLintIntelliJClient.toClientFileDto(SonarLintIntelliJClient.kt:798)
at o.sl.ij.SonarLintIntelliJClient.listModuleFiles(SonarLintIntelliJClient.kt:736)
at o.sl.ij.SonarLintIntelliJClient.listFiles$lambda$27$lambda$26(SonarLintIntelliJClient.kt:677)
at o.sl.ij.util.ThreadUtilsKt.computeOnPooledThread$lambda$2(ThreadUtils.kt:47)
at c.ij.oa.ap.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$2.call(AnyThreadWriteThreadingSupport.kt:162)
at c.ij.util.concurrency.ContextCallable.call(ContextCallable.java:32)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at c.ij.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: c.ij.util.io.ClosedStorageException: Storage already closed
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndexLocked(MMappedFileStorage.java:414)
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByIndex(MMappedFileStorage.java:243)
at c.ij.platform.util.io.storages.mmapped.MMappedFileStorage.pageByOffset(MMappedFileStorage.java:228)
at c.ij.platform.util.io.storages.appendonlylog.AppendOnlyLogOverMMappedFile.append(AppendOnlyLogOverMMappedFile.java:530)
at c.ij.oa.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.lambda$storeRecord$3(VFSContentStorageOverMMappedFile.java:222)
at c.ij.platform.util.io.storages.intmultimaps.extendiblehashmap.ExtendibleHashMap.lookupOrInsert(ExtendibleHashMap.java:212)
at c.ij.oa.vfs.newvfs.persistent.dev.content.VFSContentStorageOverMMappedFile.storeRecord(VFSContentStorageOverMMappedFile.java:182)
at c.ij.oa.vfs.newvfs.persistent.PersistentFSContentAccessor.writeContent(PersistentFSContentAccessor.java:46)
For your information, we will release a new version early next week including changes on this area. I’m still unsure in which way SonarLint is responsible for this issue, but you should hopefully see an amelioration.