[OpenAFS-devel] OpenAFS 1.2.7 fileserver repeatedly crashes in rxi_AttachServerProc around 4:30 in the morning

Harald Barth haba@pdc.kth.se
Tue, 17 Dec 2002 13:40:07 +0100 (CET)


> queue_Remove is not exactly a simplistic macro

Is there any problem with changing the macros in rx_queue.h to be
functions (inline for speed)? Or is there any type casting magic that
makes that impossible? Functions would make it possible to add asserts
which could catch broken queue elements before they are discovered 
when runing into NULL later.

> &rx_incomingCallQueue = 0x1aa450
> 
> (struct rx_queue *) call = 0x8693e8
> 
> ((struct rx_queue *) call)->prev = 0x1aa450
> 
> ((struct rx_queue *) call)->prev->next = (nil)

The queue should be double linked, shouldn't it? So the error has
probably happened earlier.

I found one difference in the rx_queue stuff that Arla uses, there the
prev is set to zero, too. But otherwise, the same ugly macros.

/* Remove a queue element (*i) from it's queue.  The next and prev field is 0'd,
 so that any further use of this q entry will hopefully cause a core dump.  Mult
iple removes of the same queue item are not supported */

#define queue_Remove(i) (_QR(i), _RX_QUEUE(i)->next = 0, _RX_QUEUE(i)->prev = 0 )

Harald.