Atomicity does not seem to be given in certain scenarios
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- operating-systems, security
Línea de trabajo
Comienza con el cryptofs_bug_reproducer y EclipseStoreMain enlazados, alternando entre las configuraciones cifrada y sin cifrar. Reproduce el fallo deteniendo la JVM después de “Committing” y antes de “Committed”; después, inspecciona la ruta de lectura de archivos indicada en el trace, incluidos ChunkCache y CleartextFileChannel. Se considera terminado cuando el escenario de detención abrupta tiene un resultado de atomicidad definido y los datos cifrados siguen siendo legibles, o cuando la limitación está documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hey,
We are currently trying to use cryptofs as the backing filesystem for https://github.com/eclipse-store.
EclipseStore offers a type of transaction object, where you can store multiple things and then commit them, flushing them to the storage target.
In this scenario the storage target is a cryptofs instance. When killing the JVM abruptly (not graceful), this will cause broken files that can't be decrypted anymore.
I have created a reproducer repo here:
https://github.com/Bios-Marcel/cryptofs_bug_reproducer
You can switch between the uncrypted and encrypted versions of the reproducer by commenting / uncommenting the respective first line in EclipseStoreMain.
To cause the issue, you need to kill the JVM after the console puts out Committing, but before it says Committed. Given that cryptofs is a filesystem abstraction, I am doubting that EclipseStore does anything wrong here, especially since there is no issue in reading / writing the data without encryption.
Here's the exception:
Exception in thread "main" org.eclipse.store.storage.exceptions.StorageException: Problem in channel #0
at org.eclipse.store.storage.types.StorageChannelTask$Abstract.checkForProblems(StorageChannelTask.java:106)
at org.eclipse.store.storage.types.StorageChannelTask$Abstract.waitOnCompletion(StorageChannelTask.java:168)
at org.eclipse.store.storage.types.StorageSystem$Default.startThreads(StorageSystem.java:332)
at org.eclipse.store.storage.types.StorageSystem$Default.internalStartUp(StorageSystem.java:515)
at org.eclipse.store.storage.types.StorageSystem$Default.start(StorageSystem.java:601)
at org.eclipse.store.storage.types.StorageSystem$Default.start(StorageSystem.java:71)
at org.eclipse.store.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:247)
at org.eclipse.store.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:95)
at EclipseStoreMain.main(EclipseStoreMain.java:33)
Caused by: org.eclipse.store.storage.exceptions.StorageExceptionIoReading
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.fillBuffer(StorageEntityInitializer.java:279)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.indexEntities(StorageEntityInitializer.java:181)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.registerFileEntities(StorageEntityInitializer.java:127)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.registerEntities(StorageEntityInitializer.java:103)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.registerEntities(StorageEntityInitializer.java:85)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.registerEntities(StorageEntityInitializer.java:48)
at org.eclipse.store.storage.types.StorageFileManager$Default.initializeForExistingFiles(StorageFileManager.java:1002)
at org.eclipse.store.storage.types.StorageFileManager$Default.initializeStorage(StorageFileManager.java:886)
at org.eclipse.store.storage.types.StorageChannel$Default.initializeStorage(StorageChannel.java:782)
at org.eclipse.store.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:200)
at org.eclipse.store.storage.types.StorageChannelTaskInitialize$Default.succeed(StorageChannelTaskInitialize.java:34)
at org.eclipse.store.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.synchronizedComplete(StorageChannelSynchronizingTask.java:78)
at org.eclipse.store.storage.types.StorageChannelSynchronizingTask$AbstractCompletingTask.complete(StorageChannelSynchronizingTask.java:126)
at org.eclipse.store.storage.types.StorageChannelTask$Abstract.processBy(StorageChannelTask.java:260)
at org.eclipse.store.storage.types.StorageChannel$Default.work(StorageChannel.java:453)
at org.eclipse.store.storage.types.StorageChannel$Default.run(StorageChannel.java:536)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.eclipse.store.storage.exceptions.StorageExceptionIoReading
at org.eclipse.store.storage.types.StorageFile$Abstract.readBytes(StorageFile.java:176)
at org.eclipse.store.storage.types.StorageEntityInitializer$Default.fillBuffer(StorageEntityInitializer.java:275)
... 16 more
Caused by: org.eclipse.serializer.exceptions.IORuntimeException: java.io.IOException: org.cryptomator.cryptolib.api.AuthenticationFailedException: Content tag mismatch.
at org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificReadBytes(NioIoHandler.java:453)
at org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificReadBytes(NioIoHandler.java:81)
at org.eclipse.serializer.afs.types.AIoHandler$Abstract.readBytes(AIoHandler.java:790)
at org.eclipse.serializer.afs.types.AReadableFile.readBytes(AReadableFile.java:104)
at org.eclipse.store.storage.types.StorageFile$Abstract.readBytes(StorageFile.java:172)
... 17 more
Caused by: java.io.IOException: org.cryptomator.cryptolib.api.AuthenticationFailedException: Content tag mismatch.
at org.cryptomator.cryptofs.fh.ChunkCache.getChunk(ChunkCache.java:123)
at org.cryptomator.cryptofs.ch.CleartextFileChannel.readLocked(CleartextFileChannel.java:112)
at org.cryptomator.cryptofs.ch.AbstractFileChannel.read(AbstractFileChannel.java:155)
at org.eclipse.serializer.io.XIO.internalRead(XIO.java:1238)
at org.eclipse.serializer.io.XIO.read(XIO.java:1198)
at org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificReadBytes(NioIoHandler.java:449)
... 21 more
Caused by: org.cryptomator.cryptolib.api.AuthenticationFailedException: Content tag mismatch.
at org.cryptomator.cryptolib.v2.FileContentCryptorImpl.decryptChunk(FileContentCryptorImpl.java:146)
at org.cryptomator.cryptolib.v2.FileContentCryptorImpl.decryptChunk(FileContentCryptorImpl.java:97)
at org.cryptomator.cryptofs.fh.ChunkLoader.load(ChunkLoader.java:40)
at org.cryptomator.cryptofs.fh.ChunkCache.loadChunk(ChunkCache.java:133)
at org.cryptomator.cryptofs.fh.ChunkCache.lambda$getChunk$2(ChunkCache.java:117)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$remap$16(BoundedLocalCache.java:2858)
at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.remap(BoundedLocalCache.java:2853)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.compute(BoundedLocalCache.java:2803)
at com.github.benmanes.caffeine.cache.LocalCache.compute(LocalCache.java:99)
at org.cryptomator.cryptofs.fh.ChunkCache.getChunk(ChunkCache.java:115)
... 26 more
Caused by: javax.crypto.AEADBadTagException: Tag mismatch
at java.base/com.sun.crypto.provider.GaloisCounterMode$GCMDecrypt.doFinal(GaloisCounterMode.java:1652)
at java.base/com.sun.crypto.provider.GaloisCounterMode.engineDoFinal(GaloisCounterMode.java:458)
at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2543)
at org.cryptomator.cryptolib.v2.FileContentCryptorImpl.decryptChunk(FileContentCryptorImpl.java:143)
... 36 more
- Lenguaje dominante
- Java
- Estrellas
- 110
- Forks
- 39
- Merge medio
- 1 d 28 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cryptomator/cryptofs
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
cryptomator/cryptofs#372 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
cryptomator/cryptofs#177 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
cryptomator/cryptofs#171 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
cryptomator/cryptofs#153 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
cryptomator/cryptofs#151 ·
Todos los issues de cryptomator/cryptofs
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
line/centraldogma#1397 ·
Los mantenedores suelen responder en 2 días
-
[Bug]: Fixed/recurring deposit accounts are treated as savings in ownership and listingsPosiblemente ocupada @Aana123 la tomó hoy. Abiertobug Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/fineract-consumer-facing#252 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
cryptomator/hub#515 ·