Search code examples
javamicrostream

Microstream one.microstream.storage.exceptions.StorageException: Problem in channel #0


I have following code:

 return vertx.fileSystem().exists(storeFile).onSuccess(isExists -> {
        try {
            if (isExists) {
                this.storageManager = EmbeddedStorage.start(NioFileSystem.New().ensureDirectoryPath(this.filePath));
                this.model = tClass.cast(this.storageManager.root());
                log.atDebug().log("[PROVIDER] DB {} Model load successfully!", this.storageManager.databaseName());
            } else {
                this.model = tClass.getDeclaredConstructor().newInstance();
                this.storageManager = EmbeddedStorage.start(this.model, NioFileSystem.New().ensureDirectoryPath(this.filePath));
                log.atDebug().log("[PROVIDER] DB {} Create new model!", this.storageManager.databaseName());
            }
        } catch (InvocationTargetException | InstantiationException | IllegalAccessException |
                 NoSuchMethodException e) {
            log.atError().withThrowable(e).log("Store file {} cannot be created", storeFile);
        }
    });

on Mac the code is working, but on Raspberry Pi Linux, I receive the message

one.microstream.storage.exceptions.StorageException: Problem in channel #1
at one.microstream.storage.types.StorageChannelTask$Abstract.checkForProblems(StorageChannelTask.java:114) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelTask$Abstract.waitOnCompletion(StorageChannelTask.java:173) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageSystem$Default.startThreads(StorageSystem.java:336) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageSystem$Default.internalStartUp(StorageSystem.java:516) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageSystem$Default.start(StorageSystem.java:600) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageSystem$Default.start(StorageSystem.java:78) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:245) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:97) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.embedded.types.EmbeddedStorage.createAndStartStorageManager(EmbeddedStorage.java:615) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.embedded.types.EmbeddedStorage.start(EmbeddedStorage.java:559) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.embedded.types.EmbeddedStorage.start(EmbeddedStorage.java:392) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at tools.vlab.alpha.core.DataProviderAsync.start(DataProviderAsync.java:33) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:106) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$5(DeploymentManager.java:196) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
at one.microstream.storage.types.StorageTransactionsAnalysis$Logic.setEntryCommon(StorageTransactionsAnalysis.java:189) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageTransactionsAnalysis$Logic.setEntryFileCreation(StorageTransactionsAnalysis.java:199) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageFileManager$Default.writeTransactionsEntryFileCreation(StorageFileManager.java:1133) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageFileManager$Default.createNewStorageFile(StorageFileManager.java:513) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageFileManager$Default.addFirstFile(StorageFileManager.java:312) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageFileManager$Default.initializeForNoFiles(StorageFileManager.java:1040) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageFileManager$Default.initializeStorage(StorageFileManager.java:866) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannel$Default.initializeStorage(StorageChannel.java:738) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:201) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:36) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.synchronizedComplete(StorageChannelSynchronizingTask.java:84) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.complete(StorageChannelSynchronizingTask.java:132) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannelTask$Abstract.processBy(StorageChannelTask.java:268) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannel$Default.work(StorageChannel.java:409) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
at one.microstream.storage.types.StorageChannel$Default.run(StorageChannel.java:492) ~[alpha-ressource-1.0-SNAPSHOT-jar-with-dependencies.jar:?]
... 1 more

So Microstream just work on Mac not on Linux. At first I thought because of the permission, but i execute the Java code with root. Do some knows why the behavior of Microstream on Mac is different than on Linux?


Solution

  • Please check, that you are using 64 bit system on Rasberry. Default is 32 bit and under 32 bit Microstream does not work.