TIMEOUT requests && then Duplicate Requests && then Threads block

Alan DeKok aland at ox.org
Fri Oct 14 23:36:48 CEST 2005

Joe Maimon <jmaimon at ttec.com> wrote:
> Examining the request structure suggests that the TIMEOUT requests never 
> hit rad_decode() or rad_respond()

  Ah... that would be OK, then.

> I am working on the theory now that they were never dequeued.


> How can I tell how many entries are in the queue?
> (theory: at the time of the semaphore there are more requests in the 
> queue than waiting threads)
> lrad_hash_table_num_elements(thread_pool.queue)
> does not appear to return anything other than an ever incrementing number.

  Which would appear to indicate that there's a bug....

  Hmm... I think that the lrad_hash_table_delete() function is being
called in the wrong place in threads.c.  The order SHOULD be:

  entry = finddata(queue, head)
  if (!entry) {
     // DON'T delete, entry==NULL means there's nothing to delete

  delete(queue, head++);

  I think the current order of "head++, delete(queue, head)" is a
little dumb.

  If that works for you, I'll commit a fix.

  Alan DeKok.

More information about the Freeradius-Devel mailing list