Crash when creating and reading local variable concurrently #754
Comments
Aha, you found a concurrency bug. This is happening because we use maps for scopes in Elvish, and since pipelines are executed in parallel, this line will both read and write to the scope:
The read comes from I have failed to construct a smallest reproduction though. This code should trigger the same crash, but I haven't succeeded yet:
|
Meanwhile, you can workaround the problem by moving the output construct up one level:
Also, you can use
|
The test now fails with "go test -race".
I don't have a reproduction locally, but at least I have a test that now fails when run with |
I believe this issue was fixed in 8c71635. Since I haven't been able to reproduce this locally and can't verify it, please reopen if this still reproduces. |
I added the following to my
rc.elv
(it usesfzf
for directory history matching):Crash happens randomly. Probably when multiple
fzf
instances are running (I have a slow CPU).OS: Void Linux
glibc
, but it also happens on Arch Linux (bothx86_64
).Version (on Void):
Backtrace:
The text was updated successfully, but these errors were encountered: