howto pstack running freeradius process

Doug Hardie bc979 at lafn.org
Fri Jul 24 08:13:03 CEST 2009


On 23 July 2009, at 22:53, George Chelidze wrote:

> On Thu, 2009-07-23 at 22:27 -0700, Doug Hardie wrote:
>> On 23 July 2009, at 22:09, George Chelidze wrote:
>>
>>>
>>> On Thu, 2009-07-23 at 16:10 +0200, Alan DeKok wrote:
>>>> George Chelidze wrote:
>>>>> Hello,
>>>>>
>>>>> I am investigating one issue with freeradius 2.1.6 custom module  
>>>>> and
>>>>> would like to get a stack trace of running process.
>>>>
>>>> This is a local OS issue.  It has nothing to do with FreeRADIUS.
>>>
>>> Hello Alan,
>>>
>>> I didn't say it's an issue with freeradius. I said it's an issue
>>> with a
>>> custom module and I am trying to find the reason that's why I asked
>>> about stack trace.
>>
>> The approach I use to debug a module is to compile it with gdb   
>> (helps
>> to also compile freeradius with gdb).  Then run it under gdb with -X.
>> You can then set breakpoints or other gdb trace commands and then  
>> feed
>> it the input that causes the problem.
>
> Hello Doug,
>
> Thanks for reply. Unfortunately when I start freeradiusd with -X  
> problem
> is gone, it only exists when I start it in background, so I'd like to
> attach to the running daemon and get the stack trace if possible.

that sounds like a threading issue.  Have you tried running it  
restricted to only one thread?  There is a parameter in the  
initialization data (RLM_TYPE_THREAD_UNSAFE) that will prevent it from  
being multi-threaded.  If that doesn't fail, you should have a better  
handle on the cause.



More information about the Freeradius-Users mailing list