[OpenAFS-devel] Re: Fileserver (from openafs-server-1.6.5-1.el6.x86_64)
segmentation fault
Andrew Deason
adeason@sinenomine.net
Tue, 13 Aug 2013 10:41:35 -0500
On Tue, 13 Aug 2013 11:05:01 +0200 (CEST)
Harald Barth <haba@kth.se> wrote:
> 2002 for (queue_Scan(&rx_incomingCallQueue, tcall, ncall, rx_call)) {
> 2003 service = tcall->conn->service;
> 2004 if (!QuotaOK(service)) {
> 2005 continue;
> 2006 }
> (gdb)
>
> queue_Scan seems to be a hideous macro. So some assistance
> appreciated.
This should expand to something like
for (tcall = ((struct rx_queue*)(&rx_incomingCallQueue))->next,
ncall = ((struct rx_queue*)tcall)->next;
tcall != &rx_incomingCallQueue;
tcall = ncall, ncall = ((struct rx_queue*)tcall)->next)
So I assume it's that last ncall assignment that's dereferencing a NULL
tcall. tcall shouldn't be able to be NULL there; even if we're at the
end of the queue, it should be &incomingCallQueue. So, traverse
incomingCallQueue and see if one of the pointers is NULL. I thought
there was a bug regarding this, but I must be thinking of
339438c8473110bebdd31b23706e2e387560723f. That commit is a bit curious
wrt this, though... maybe it is possible that a NULL gets on the queue
somehow.
--
Andrew Deason
adeason@sinenomine.net