[CalendarServer-dev] Exception in recvfd --was: Re: continuing work on FreeBSD ports
glyph at twistedmatrix.com
Wed Feb 20 16:15:52 PST 2013
On Feb 20, 2013, at 1:51 AM, Axel Rau <Axel.Rau at Chaos1.DE> wrote:
> With my debug code, the master process dies immediately on connect to the web server.
> This does not happen, with the unmodified sendmsg.c.
Your patch appears to be backwards.
Your patch also appears to introduce its own segfault. I can't see exactly where yet, but 'char ddfile' makes me suspicious; variables like this should always be [PATH_MAX]. You also have no error-checking on fopen().
I can't tell what's going on in the trace you sent, because the 'ps' output at the top has PIDs which don't correspond to the PIDs below. It also appears to be a trace only of the master, not of the worker.
Also, a Python traceback from the invocation of sendmsg() would be helpful. The 'ancillary' that your debug code is printing is the Python argument value for 'ancillary', which means that Python code is getting invoked with no ancillary list. There are only two invocations of sendmsg in the whole codebase, and the one that sends the FD is hard-coded to pass a list with one element in it along (in sendfd). sendmsg is also called to report status from the worker to the master, and that's expected to come along with no sendmsg arguments.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the calendarserver-dev