[bind10-dev] What to do when msgq can't write to a reader?
Shane Kerr
shane at isc.org
Wed Jan 5 16:34:19 UTC 2011
All,
I have a ticket concerning a bug that makes BIND 10 stop working
properly on my server, ticket #420:
https://bind10.isc.org/ticket/420
Basically if something is not reading it's msgq properly then the msgq
blocks writing to it.
It's annoying me enough that I want to fix it. The question is, what is
the correct behavior if a reader is not reading?
I think there are two basic options:
1. Close the connection.
2. Buffer the data.
Neither are perfect or simple.
Option #1 means that a process that is busy for a period of time may get
disconnected.
Option #2 still needs some sort of way to handle a full buffer (after
all, Unix sockets have something like 4096 bytes of buffer, so there is
some already), uses more resources, and delays quick handling of a
broken connections.
So, I think I would like to implement option #1 (also naming & shaming
the process involved for debugging purposes!), unless there are any
objections.
(Note that a more extreme version of #1 might be to terminate the stuck
process, rather than simply closing the connection.)
BTW, when looking at this I found a cool page about Unix domain sockets:
http://www.wsinnovations.com/softeng/articles/uds.html
This even points out some Linux-specific features that I wish were
portable. :-P
--
Shane
More information about the bind10-dev
mailing list