Re: segfault with rlm_perl
Anatoly Ivanov anatoly.iva...@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. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: segfault with rlm_perl
On Jan 4, 2011, at 9:59 PM, Anatoly Ivanov wrote: Hi, 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. This is have to be thread problem. Use CLONE function in your perl code (this is executed per every new thread) to initialize per thread variables and DBI Connections. 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. If you want to debug - search this list or google using keywords debug rlm_perl I understand that freeradius has a newer version available - but I am hesitant to upgrade a production server without a very good reason. And I could not find such reason for an upgrade after reading the CHANGELOG for 2.1.10. But maybe I am wrong? Any ideas? Thank you! Best Regards, Boian Jordanov Head of Voice Department tel. +359 2 4004 723 tel. +359 2 4004 002 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: segfault with rlm_perl
On 2011/01/04 09:59 PM, Anatoly Ivanov wrote: Hi, 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. 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. I understand that freeradius has a newer version available - but I am hesitant to upgrade a production server without a very good reason. And I could not find such reason for an upgrade after reading the CHANGELOG for 2.1.10. But maybe I am wrong? Any ideas? A complete gut feel after reading this says you have a hardware problem - faulty ram. Has this happened from the beginning or suddenly now? You can try memtesting (http://www.memtest.org/) the server, or a trick that I've found works sometimes (if you can't take the server out of production) to show a ram problem, is to compile a kernel. I've seen compilation fail at different stages with faulty RAM. I realiuse the advice might sound ridiculous, but it has worked for me before. -- Johan Meiring Cape PC Services CC Tel: (021) 883-8271 Fax: (021) 886-7782 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: segfault when rlm_perl used
On Oct 16, 2009, at 2:57 PM, Michael Chernyakhovsky wrote: Oct 13 21:58:53 rs kernel: radiusd[11441]: segfault at 20004 ip b7478636 sp b502bcb0 error 4 in rlm_perl-2.1.7.so[b73cb000+15b000] Oct 14 22:09:56 rs kernel: radiusd[17687]: segfault at 8 ip b731e35d sp b6f61ce0 error 4 in rlm_perl-2.1.7.so[b71fd000+15b000] Oct 14 22:14:06 rs kernel: radiusd[18374]: segfault at 8 ip b73d735d sp b701ace0 error 4 in rlm_perl-2.1.7.so[b72b6000+15b000] Oct 15 18:07:58 rs kernel: radiusd[23858]: segfault at 8 ip b745935d sp ae89cce0 error 4 in rlm_perl-2.1.7.so[b7338000+15b000] Oct 15 18:08:56 rs kernel: radiusd[23896]: segfault at c ip b74d400e sp ae919c90 error 4[b73b5000+15b000] Oct 15 18:09:55 rs kernel: radiusd[24042]: segfault at 8 ip b736935d sp b07acce0 error 4 in rlm_perl-2.1.7.so[b7248000+15b000] Could you include the output of gdb, as suggested in doc/bugs? Best Regards, Boian Jordanov RD Expert Orbitel - Next Generation Telecom tel. +359 2 4004 723 tel. +359 2 4004 002 - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html