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?

Qeychon
  • 477
  • 1
  • 5
  • 15

1 Answers1

0

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

Zdenek Jonas
  • 121
  • 7
  • thank you for your response, where did you have the information? When I check the requirement https://docs.microstream.one/manual/intro/system-requirements.html I didn't read about 32 bit system. But yes, I use the 32bit system. I try to change to 64 bit and try again. – Qeychon Jun 22 '23 at 13:22
  • you have right, after I change the OS from 32bit to 64bit, Microstreams works, thank you – Qeychon Jun 23 '23 at 08:20
  • I work for Microstream as Test Lead and exactly one week ago, we have to solve this problem. It is the reason, why this information is not yet present on our Webpages. – Zdenek Jonas Jun 23 '23 at 14:16