BIND 10 #2398: msgq crash
BIND 10 Development
do-not-reply at isc.org
Wed Nov 21 15:58:12 UTC 2012
#2398: msgq crash
-------------------------------------+-------------------------------------
Reporter: jreed | Owner: UnAssigned
Type: | Status: reviewing
defect | Milestone:
Priority: | Sprint-20121204
medium | Resolution:
Component: msgq | Sensitive: 0
Keywords: | Sub-Project: Core
Defect Severity: High | Estimated Difficulty: 4
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by jelte):
* owner: jelte => UnAssigned
* status: assigned => reviewing
Comment:
Ready for review.
As far as msgq itself is concerned, I only addressed the SIGPIPE, which
did not turn out to be much of a problem (there is already code to handle
remote sockets that are suddenly closed, so it's really only a question of
catching and handling the error).
It does *not* handle and recover any other exceptions (except the socket
errors that were already handled). I don't think we should catchall here,
as depending on the exception we should handle it differently (and perhaps
simply crash, if it is a syntax error for example). Also, I kept it to
send() calls only. If we want we can do something similar for recv()
(which should now be a lot easier, as I think the tests could be extended
to test that too).
As for the changes:
Most of the diff is testing code. I took a look at the existing fork() and
run() code, but it is a bit brittle imo, and chances are that it leaves
processes hanging and it is difficult to communicate errors back to check
for them.
So I made a pretty simple and naive threading class that does nothing but
call msgq.run() and store any exception it raises.
Secondly, I added a BadSocket class which wraps an existing socket and
optionally raises a given exception after a given number of bytes have
been sent. I added tests for some existing handling (eagain and
ewouldblock), and a few new ones.
--
Ticket URL: <http://bind10.isc.org/ticket/2398#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list