Hi! [scala] I'm trying to figure out a possible ca...
# general
f
Hi! [scala] I'm trying to figure out a possible cache race issue with BSP and multiple bsp-groups using the same resolver with overlapping dependencies, where they end up blowing up in native-land materialize due to read-only files seemingly being copied to in parallel. I can put up a repro if it sounds interesting, or maybe there's prior knowledge around it?
So files are copied from the immutable store, but seemingly in parallel, causing it to blow up on trying to write to an existing read-only file in the bsp working directory
I.e. a bsp run ends up with something like:
Copy code
native_engine.IntrinsicError: Error copying bytes from /Users/johngranstrom/.cache/pants/lmdb_store/immutable/files/3a/3aee4e8da9e6f2ddc84d67dce50150f427acf9c62e0aeb7792693985dd974329 to /Users/johngranstrom/code/repros/bsprepro2/.pants.d/bsp/jvm/resolves/jvm/lib/dev.zio_izumi-reflect_2.13_2.3.8.jar: Permission denied (os error 13) (-32602)
I've only been able to reproduce it with the overlap conditions above.
My workaround was making everything one huge bsp group, and then it doesn't occur, so it seems like there's some concurrency-effect in play
I created a repro-repo for this if anyone has any ideas https://github.com/pantsbuild/pants/issues/21532