-
Bug
-
Resolution: Done
-
Major
-
14.0.17.Final
-
None
When mashona log writing is on the classpath SIFS will attempt to open a new file channel with it. The mashona dep is optional and normally not in the classpath, but however when running in an IDE or other development environment it very easily can be on the classpath, but most machines will not have support for PMEM. Thus it will create an entire stack trace on every file opening, which in some tests can be extreme.
We should only log the message once per FileProvider instance as we can't do it globally since it is entirely plausible to have mashona on the classpath but different directories may or may not have PMEM supported mapped directories.
Example DEBUG message
13:49:58,194 DEBUG (blocking-thread-SoftIndexFileStoreStressTest-NodeA-p3-t3:[]) [i.m.l.PmemUtil] mmap failed for path /home/wburns/RedHat/infinispan/core/target/infinispanTempFiles/SoftIndexFileStoreStressTest/data/stress-test-cache/data java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] at io.mashona.logwriting.PmemUtil.isPmemSupportedFor(PmemUtil.java:118) ~[mashona-logwriting-1.0.0.jar:?] at io.mashona.logwriting.PmemUtil.pmemChannelFor(PmemUtil.java:157) ~[mashona-logwriting-1.0.0.jar:?] at org.infinispan.persistence.sifs.pmem.PmemUtilWrapper.pmemChannelFor(PmemUtilWrapper.java:20) ~[classes/:?] at org.infinispan.persistence.sifs.FileProvider.openChannel(FileProvider.java:213) ~[classes/:?] at org.infinispan.persistence.sifs.FileProvider.getFileForLog(FileProvider.java:244) ~[classes/:?] at org.infinispan.persistence.sifs.LogAppender.accept(LogAppender.java:243) ~[classes/:?] at org.infinispan.persistence.sifs.LogAppender.accept(LogAppender.java:24) ~[classes/:?] at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) ~[rxjava-3.1.4.jar:?] at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:404) ~[rxjava-3.1.4.jar:?] at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:178) ~[rxjava-3.1.4.jar:?] at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:324) ~[rxjava-3.1.4.jar:?] at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.runEager(ExecutorScheduler.java:289) ~[rxjava-3.1.4.jar:?] at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:250) ~[rxjava-3.1.4.jar:?] at org.infinispan.util.concurrent.BlockingManagerImpl.lambda$asExecutor$9(BlockingManagerImpl.java:336) ~[classes/:?] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) [jboss-threads-3.5.0.Final.jar:3.5.0.Final] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) [jboss-threads-3.5.0.Final.jar:3.5.0.Final] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) [jboss-threads-3.5.0.Final.jar:3.5.0.Final] at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: java.io.IOException: Operation not supported at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[?:?] at sun.nio.ch.FileChannelImpl.mapInternal(FileChannelImpl.java:1113) ~[?:?] at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:1032) ~[?:?] at io.mashona.logwriting.MappedFileChannelMetadata.<init>(MappedFileChannelMetadata.java:102) ~[mashona-logwriting-1.0.0.jar:?] at io.mashona.logwriting.MappedFileChannelMetadata.<init>(MappedFileChannelMetadata.java:81) ~[mashona-logwriting-1.0.0.jar:?] ... 23 more