segfault with rlm_perl

Alexander Clouter alex at digriz.org.uk
Wed Jan 5 08:31:12 CET 2011


Anatoly Ivanov <anatoly.ivanov at gmail.com> wrote:
> 
> I am running freeradius (2.1.8) with rlm_perl (5.10.1, USE_ITHREADS) on a
> Debian-Lenny system.
> 
> The problem is radius fails with segfault ??? periodically and intermittently.
> I have no way to reliably reproduce the problem ??? it happens only in
> production, and it is impossible to reliably predict when or backtrace why.
>
Stab in the dark, is your Perl code actually thread safe...including 
*all* the Perl modules you use?  Seems DBD::MySQL is safe (that actually 
surprises me):

http://search.cpan.org/~capttofu/DBD-mysql-4.018/lib/DBD/mysql.pm#MULTITHREADING
 
Are you using any global variables in your script, and if so have you 
protected them from concurrent access?

The really quick test is to tell freeradius not to enable threading to 
your module and comment out 'use threads(::shared)?;' in your code.

> It seems that I am running into some kind of memory allocation error.
> 
> Coredump type #3 (see below) is the most "popular" one; coredumps with
> backtrace going into perl seem to be rather random (it fails in different
> parts of libperl.so) - again, see below.
> 
Looks like if you install some more debugging libraries (libc6-dbg and 
any others you think might help, looks like you have already installed 
perl-debug) a few more blanks will be filled in.

Cheers

-- 
Alexander Clouter
.sigmonster says: Avoid gunfire in the bathroom tonight.




More information about the Freeradius-Users mailing list