that means there's an operation that depends on many workers.
No two such operation can be launched at once without risking
a deadlock, so other ones must either wait or requeue.
it was still possible to deadlock between stop-listening and pause
events. this is now addressed by testing to see whether the manager is
in the process of pausing, and re-enqueueing stop-listening events
for later. the uv_run() loop is now terminated immediately after
uv_stop() is called, so that the re-enqueued stop-listeneing event
won't be processed until after the manager is unpaused.
this was previously only done in ns_client_endrequest(), which is
called by client_reset_cb() when a client is released. this could
make the system report more recursive clients than were actually
recursing, and caused intermittent test failures in 'fetchlimit'.
there is a window of time after a task finishes running an event
before the task state is reset from 'running' to 'ready' or 'idle'.
previously, if the network manager ran ns__client_request() during
that time, isc_task_pause() would assert.
this supercedes the experiment in commit eab6c2bff
("attach to nmhandle during zerottl refetch"), and ensures that
the client can't be reset before fetch_callback() is reached.
when reconfiguring a server we're in task exclusive mode, which
means the netmgr is paused. previously, when we issued "stoplistening"
events, we would wait for the worker thread to process the event
before proceeding. since that can't happen while paused, we could
hit a deadlock during reconfig if the listen-on addresses changed.
- MSVC doesn't like empty {} initializers
- Emulate stdalign.h on Windows with __declspec(align())
- There's no usleep on Windows
- Add missing symbols to libns.def and libisc.def
- Proper use of SO_REUSE****
- libuv detection in Configure
- Minor fixes to the atomics code
- when we attempt to shut down a parent socket, but its children
still have active handles, the destruction is delayed, and previously
it was never resumed. now, when the last handle for a child socket is
detached, we check again whether the parent can be destroyed.
- the netmgr is not shut down until all references to it are detached.
- document functions in netmgr.h and netmgr-int.h
- combine identical callback typedefs into one
- remove functions that were never called
- make functions called in only one file static
- rename isc__nm_handle_*() functions to isc__nm_async_*() to avoid
confusion with the isc__nmhandle type.
- clean up isc_nmevent structures - make generic types and just typedef to them
- fix atomic clang warnings in astack
- add pause/resume read for TCP
- add sequential (not-pipelining) support for TCPDNS
- keep peer address in the socket for TCP connections, it's constant for a socket