[CalendarServer-dev] Exception in recvfd --was: Re: continuing work on FreeBSD ports

Axel Rau Axel.Rau at Chaos1.DE
Thu Feb 21 09:30:58 PST 2013


Am 21.02.2013 um 01:15 schrieb glyph at twistedmatrix.com:

> Your patch also appears to introduce its own segfault.  I can't see exactly where yet, but 'char ddfile[30]' makes me suspicious; variables like this should always be [PATH_MAX].
My pathname has a maximum of 21 bytes.
>  You also have no error-checking on fopen().
I'm now handling fopen(3) errors (see below).
> 
> 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.
I have prepared a gziped tar archive here
	http://www.chaos1.de/downloads/2013-02-21-sendmsg.tar.gz
containing
2013.02.21/
2013.02.21/debug.dat.50376
2013.02.21/debug.dat.50400
2013.02.21/debug.dat.50402
2013.02.21/debug.dat.50404
2013.02.21/debug.dat.50406
2013.02.21/debug.trace
2013.02.21/ps.txt
2013.02.21/sendmsg.diff

debug.trace contains a complete truss trace with the modified patch (sendmsg.diff), showing all worker processes.
This version hangs after the accept() instead of segfaulting.
ps.txt shows ps + commands corresponding to the trace.
I think the message 'truss: can not attach to target process: No such process' can be ignored, as all processes appear in the trace.
debug.dat.* have the debug output from the patched sendmsg.c.

Axel
---
PGP-Key:29E99DD6  ☀ +49 151 2300 9283  ☀ computing @ chaos claudius



More information about the calendarserver-dev mailing list