Skip to content

Fix a race in isc_socket destruction.

Witold Krecicki requested to merge wpk/socket-destroy-race-v9_16 into v9_16

There was a very slim chance of a race between isc_socket_detach and process_fd: isc_socket_detach decrements references to 0, and before it calls destroy gets preempted. Second thread calls process_fd, increments socket references temporarily to 1, and then gets preempted, first thread then hits assertion in destroy() as the reference counter is now 1 and not 0.

(cherry picked from commit 81ba0fe0)

Merge request reports