FgForrest / evitaDB

evitaDB is a specialized database with an easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.
https://evitadb.io
Other
62 stars 7 forks source link

NPE on server status #712

Closed lukashornych closed 3 weeks ago

lukashornych commented 3 weeks ago

On M1 Mac when server status is requested through gRPC after startup following NPE is thrown.

22:07:56.102 ERROR i.e.e.g.s.i.GlobalExceptionHandlerInterceptor - Exception occurred during processing of gRPC call: Cannot invoke "io.evitadb.externalApi.observability.metric.ObservabilityProbesDetector$ReadinessWithTimestamp.result()" because the return value of "java.util.concurrent.atomic.AtomicReference.get()" is null
java.lang.NullPointerException: Cannot invoke "io.evitadb.externalApi.observability.metric.ObservabilityProbesDetector$ReadinessWithTimestamp.result()" because the return value of "java.util.concurrent.atomic.AtomicReference.get()" is null
    at io.evitadb.externalApi.observability.metric.ObservabilityProbesDetector.getReadiness(ObservabilityProbesDetector.java:203)
    at io.evitadb.externalApi.grpc.services.EvitaManagementService.lambda$serverStatus$3(EvitaManagementService.java:190)
    at java.base/java.util.Optional.map(Optional.java:260)
    at io.evitadb.externalApi.grpc.services.EvitaManagementService.lambda$serverStatus$11(EvitaManagementService.java:190)
    at io.evitadb.externalApi.grpc.services.EvitaManagementService.lambda$executeWithClientContext$0(EvitaManagementService.java:132)
    at io.evitadb.core.async.ObservableThreadExecutor$ObservableRunnable.run(ObservableThreadExecutor.java:443)
    at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

Weirdly it happened randomly after random crash, now it happens after every startup and doesn't go away.

lukashornych commented 3 weeks ago

Weirdly it happens only from gRPC-web through browser. Seems like it went away after lots of time (maybe 30 minutes?) or it went away randomly.

lukashornych commented 3 weeks ago

Couldn't replicate it after another server restart. Seems like OS anomaly for now, so I'm closing it.