How to debug rlm_perl in multithread?

Boian Jordanov bjordanov at orbitel.bg
Wed Aug 25 23:41:22 CEST 2010


On Aug 23, 2010, at 9:36 PM, Eugen Konkov wrote:

> HI, FreeRadius.
> 
> when run radiusd -X it works fine.
> But when run in multithread (without -X) it core dump after ten or
> twelve queriest to radiusd.

Alan maybe it will be useful to add this info to doc/bugs ?

Eugen Please do the following:

Install or ecompile your libperl with debugging symbols Use "./Configure
-Doptimize='-g'". Recompile rlm_perl with -g. Recompile FreeRadius with
--enable-developer 

Rebuild you rlm_perl with new libperl

Then start it and attach with gdb 

When problem occurs type bt and then look at the backtrace and find the first
function which accepts the my_perl argument

And if the core happens inside Perl post the output of printf "%d:%s\n",
my_perl->Tcurcop->cop_line, my_perl->Tcurcop->cop_file if your perl version is
less than 5.10 otherwise use this printf "%d:%s\n", my_perl->Icurcop->cop_line,
my_perl->Icurcop->cop_file

This will help us to find where the problem occurs.

Very Important.

If you are using DBI and do some queries to DB, please be sure to use CLONE function to initialize DBI connection to DB.





> 
> please help any.
> 
> -- 
> Eugen Konkov                          mailto:kes-kes at yandex.ru
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Best Regards,
Boian Jordanov
Head of Voice Department
tel. +359 2 4004 723
tel. +359 2 4004 002










More information about the Freeradius-Users mailing list