<div dir="ltr"><div><div><div><div><div><div><div>I have an application that is using
BIND lightweight resolver ~9.4 - although I've checked the 9.10.2 code
and it looks the same.<br><br></div>I'm seeing an INSIST check failing in lwdclient.c:<br>INSIST((cm->flags & NS_LWDCLIENTMGR_FLAGRECVPENDING) != 0);<br><br></div>I have multi-threading enabled - I have 3 worker threads running in the resolver.<br><br></div>My
question about lwdclient.c is how can the resolver support multiple
threads with no locking mechanism on the ns_lwdclientmgr_t?<br><br></div>Through
debugging I'm seeing one thread creating the event and another thread
waking up to process that event before the first thread has set this
flag, and thus the INSIST check fails.<br><br></div>I understand that
the timing has to be incredibly precise for this case to happen, but
with multiple threads acting on the same client manager, isn't it just a
matter of time until things go bad?<br><br></div>Am I missing some key piece of code that should prevent this?<br><br></div>Thank you.</div>