cancelling requests due to max_request_time
fcusack at fcusack.com
Mon Jan 15 18:39:06 CET 2007
request_list.c around line 574, calling pthread_cancel() on the thread
handling a timed out request is a bad idea. It can leave resources
hanging, like a locked mutex for ownership of an ldap file descriptor.
In order for pthread_cancel() to be a good idea, most modules would
need to take care to disable cancellation while they hold resources
open, and/or set cancellation handlers to clean them up. That's a
lot of work and there's a lot of room for bugs there.
But I can't think of a better approach. You don't want to let threads
just run to completion and waste resources.
More information about the Freeradius-Devel