oxen-io / oxen-mq

Communications layer used for both the Oxen storage server and oxend
https://oxen.io
BSD 3-Clause "New" or "Revised" License
19 stars 35 forks source link

Attempt to fix a race condition #82

Closed jagerman closed 1 year ago

jagerman commented 1 year ago

There's a very rare race condition where a tagged thread doesn't seem to exist when the proxy tries syncing startup with them, and so the proxy thread hangs in startup.

This is an attempt to fix it by avoiding looking at the proxy_thread variable (which probably isn't thread safe) in the worker's startup.

(This is currently just a guess though).

Looks like it solved it: this passed 3000 consecutive test suite runs with no stall in lokinet, whereas without it we were getting a failure roughly every 100-200 or so runs.