Spare threads not exiting

Alan DeKok aland at deployingradius.com
Thu Mar 8 08:48:34 CET 2012


Matt Ezell wrote:
> I instrumented threads.c, and it appears that a thread's "request"
> field doesn't get set to NULL after it handles a requests*.  This is a
> problem, because the thread reaper uses the condition (handle->request
> == NULL) to mark a thread as THREAD_CANCELLED.

  That sounds right.

> I tested a small patch that appears to allow threads to cleanup, but
> I'm not sure if it's the right way to proceed with this.  I tried to
> setup a pull request on github, but it looks like it tired to push my
> entire 2.1.x branch onto master
> (https://github.com/alandekok/freeradius-server/pull/51).

  You clicked on "pull request" when you were viewing the branch.  You
should have viewed the commit, and then clicked on "pull request".

> * I added the following code in threads.c in thread_pool_manage()
> 
> if (handle->request != NULL) {
>   DEBUG2("Threads: thread %d NOT canceled, processing
> %i\n",handle->thread_num,handle->request->number);
> }

  I'll take a look.

  Alan DeKok.



More information about the Freeradius-Devel mailing list