Open bkolobara opened 1 year ago
This is a bit of a hard to reproduce bug. You will need to run some tests from https://github.com/lunatic-solutions/lunatic-rs in a loop to trigger it:
while true; do cargo test --test registry done
I believe the issue is in this unsafe code: https://github.com/lunatic-solutions/lunatic/blob/07454fb4a6657960479386da35d04921a7bd4892/crates/lunatic-registry-api/src/lib.rs#L177-L182
unsafe
One way to resolve this would be to move the "lookup and insert" operation to the process spawning function. In that case we would not require to hold onto a lock across host-guest-host calls.
This is a bit of a hard to reproduce bug. You will need to run some tests from https://github.com/lunatic-solutions/lunatic-rs in a loop to trigger it:
I believe the issue is in this
unsafe
code: https://github.com/lunatic-solutions/lunatic/blob/07454fb4a6657960479386da35d04921a7bd4892/crates/lunatic-registry-api/src/lib.rs#L177-L182One way to resolve this would be to move the "lookup and insert" operation to the process spawning function. In that case we would not require to hold onto a lock across host-guest-host calls.