ome / ZarrReader

Other
5 stars 8 forks source link

Index Out Of Bounds when importing to OMERO docker #77

Open pwalczysko opened 7 months ago

pwalczysko commented 7 months ago

Workflow:

On Mac M1,

  1. pull the image khaledk2/omero-server:arm where there is blosc installed.
  2. Run the image via docker-compose up inside the docker-example-omero repo - see my docker-compose.yml file on a branch https://github.com/pwalczysko/docker-example-omero/blob/server-good/docker-compose.yml
  3. Try to import an ...ome.zarr file compressed with blosc, observe error IndexOutOfBounds...

cc @khaledk2 @dgault @sbesson @will-moore

See also https://github.com/ome/ZarrReader/issues/76.

Note: three setups with the same docker-compose.yml file tried

this problem only occurs in the M1 case.

2024-01-25 13:15:45,470 10394      [l.Client-1] ERROR     ome.formats.importer.cli.ErrorHandler - INTERNAL_EXCEPTION: /Users/pwalczysko/Work/18188.zarr/0/0/0
java.lang.RuntimeException: Failure response on import!
Category: ::omero::grid::ImportRequest
Name: import-request-failure
Parameters: {stacktrace=java.lang.IndexOutOfBoundsException
    at java.base/java.io.DataInputStream.readFully(DataInputStream.java:197)
    at com.bc.zarr.CompressorFactory$BloscCompressor.uncompress(CompressorFactory.java:342)
    at com.bc.zarr.chunk.ChunkReaderWriterImpl_Byte.read(ChunkReaderWriterImpl_Byte.java:50)
    at com.bc.zarr.ZarrArray.read(ZarrArray.java:278)
    at com.bc.zarr.ZarrArray.read(ZarrArray.java:255)
    at loci.formats.services.JZarrServiceImpl.readBytes(JZarrServiceImpl.java:266)
    at loci.formats.in.ZarrReader.openBytes(ZarrReader.java:362)
    at loci.formats.ImageReader.openBytes(ImageReader.java:467)
    at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:169)
    at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:231)
    at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:350)
    at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:350)
    at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:269)
    at ome.services.blitz.repo.ManagedImportRequestI.parseDataByPlane(ManagedImportRequestI.java:872)
    at ome.services.blitz.repo.ManagedImportRequestI.parseData(ManagedImportRequestI.java:803)
    at ome.services.blitz.repo.ManagedImportRequestI.pixelData(ManagedImportRequestI.java:676)
    at ome.services.blitz.repo.ManagedImportRequestI.step(ManagedImportRequestI.java:525)
    at omero.cmd.HandleI.steps(HandleI.java:448)
    at omero.cmd.HandleI$RunSteps.innerWork(HandleI.java:509)
    at omero.cmd.HandleI$2.doWork(HandleI.java:383)
    at omero.cmd.HandleI$2.doWork(HandleI.java:380)
    at jdk.internal.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy82.doWork(Unknown Source)
    at ome.services.util.Executor$Impl.execute(Executor.java:447)
    at omero.cmd.HandleI.run(HandleI.java:379)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at ome.services.util.Executor$Impl$1.call(Executor.java:488)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
, message=}

    at ome.formats.importer.ImportLibrary$ImportCallback.onFinished(ImportLibrary.java:807)
    at omero.cmd.CmdCallbackI.finished(CmdCallbackI.java:334)
    at omero.cmd._CmdCallbackDisp.___finished(_CmdCallbackDisp.java:118)
    at omero.cmd._CmdCallbackDisp.__dispatch(_CmdCallbackDisp.java:145)
    at IceInternal.Incoming.invoke(Incoming.java:221)
    at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
    at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
    at Ice.ConnectionI.message(ConnectionI.java:1056)
    at IceInternal.ThreadPool.run(ThreadPool.java:395)
    at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
    at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
    at java.base/java.lang.Thread.run(Thread.java:829)

java.lang.RuntimeException: Failure response on import!
Category: ::omero::grid::ImportRequest
Name: import-request-failure
Parameters: {stacktrace=java.lang.IndexOutOfBoundsException
    at java.base/java.io.DataInputStream.readFully(DataInputStream.java:197)
    at com.bc.zarr.CompressorFactory$BloscCompressor.uncompress(CompressorFactory.java:342)
    at com.bc.zarr.chunk.ChunkReaderWriterImpl_Byte.read(ChunkReaderWriterImpl_Byte.java:50)
    at com.bc.zarr.ZarrArray.read(ZarrArray.java:278)
    at com.bc.zarr.ZarrArray.read(ZarrArray.java:255)
    at loci.formats.services.JZarrServiceImpl.readBytes(JZarrServiceImpl.java:266)
    at loci.formats.in.ZarrReader.openBytes(ZarrReader.java:362)
    at loci.formats.ImageReader.openBytes(ImageReader.java:467)
    at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:169)
    at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:231)
    at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:350)
    at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:350)
    at loci.formats.MinMaxCalculator.openBytes(MinMaxCalculator.java:269)
    at ome.services.blitz.repo.ManagedImportRequestI.parseDataByPlane(ManagedImportRequestI.java:872)
    at ome.services.blitz.repo.ManagedImportRequestI.parseData(ManagedImportRequestI.java:803)
    at ome.services.blitz.repo.ManagedImportRequestI.pixelData(ManagedImportRequestI.java:676)
    at ome.services.blitz.repo.ManagedImportRequestI.step(ManagedImportRequestI.java:525)
    at omero.cmd.HandleI.steps(HandleI.java:448)
    at omero.cmd.HandleI$RunSteps.innerWork(HandleI.java:509)
    at omero.cmd.HandleI$2.doWork(HandleI.java:383)
    at omero.cmd.HandleI$2.doWork(HandleI.java:380)
    at jdk.internal.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy82.doWork(Unknown Source)
    at ome.services.util.Executor$Impl.execute(Executor.java:447)
    at omero.cmd.HandleI.run(HandleI.java:379)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at ome.services.util.Executor$Impl$1.call(Executor.java:488)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
, message=}

    at ome.formats.importer.ImportLibrary$ImportCallback.onFinished(ImportLibrary.java:807)
    at omero.cmd.CmdCallbackI.finished(CmdCallbackI.java:334)
    at omero.cmd._CmdCallbackDisp.___finished(_CmdCallbackDisp.java:118)
    at omero.cmd._CmdCallbackDisp.__dispatch(_CmdCallbackDisp.java:145)
    at IceInternal.Incoming.invoke(Incoming.java:221)
    at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
    at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
    at Ice.ConnectionI.message(ConnectionI.java:1056)
    at IceInternal.ThreadPool.run(ThreadPool.java:395)
    at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
    at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
    at java.base/java.lang.Thread.run(Thread.java:829)
2024-01-25 13:15:45,484 10408      [2-thread-1] ERROR        ome.formats.importer.ImportLibrary - Error on import
java.lang.Exception: Import failure
    at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:701)
    at ome.formats.importer.ImportLibrary$1.call(ImportLibrary.java:354)
    at ome.formats.importer.ImportLibrary$1.call(ImportLibrary.java:328)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
2024-01-25 13:15:45,484 10408      [2-thread-1] INFO         ome.formats.importer.ImportLibrary - Exiting on error