cloudflare/boringtun

Write lock never released

thrykol opened this issue · 4 comments

I was experimenting to understand the code base better and discovered that a device handle write lock is never released if mut_func panic!s. As a result, the DeviceHandle's remaining event_loop threads are blocked from doing any other work.

Generally it's not an issue unless someone is working on api::api_set(). On MacOS, I see my application "freeze" and I have to sudo kill (not sure why but ctrl-c doesn't work once the condition is hit) the process which results in the utun interface hanging around until I reboot.

I'm hoping to get rid of that thing soon.

Do you have a time frame you're targeting? I might be able to get some cycles to help out if you have a plan for how you want to move forward.

@thrykol unfortunately this isn't a matter of me not having time, it's a matter of us (CF) needing to make some changes to a few edge infrastructure components first. That work is moving along, but not as fast as I would like. Hopefully that gets done in a week or so.

I've actually got this mostly done in a local branch. I might just push my branch up in the meantime so that it can get feedback and can be merged when able.

Having your feature branch available would be fantastic as it'd at least give an idea of how things are anticipated to be implemented moving forward.