rlm_perl: perl 5.6 & segmentation fault when reloaded
Milan Holub
holub at thenet.ch
Thu Apr 19 09:52:07 CEST 2007
Hi all,
I'm using cvs head on debian woody(historical reasons). I'm using
rlm_perl module with perl 5.6:
`dpkg -l '*perl*'`
...
ii libperl-dev 5.6.1-8.9
ii libperl5.6 5.6.1-8.9
ii libsnmp-perl 4.2.3-2
...
This version of perl is without ithreads and does not support
multiplicity.
I experienced following behaviour when sending HUP to radius process:
Program received signal SIGSEGV, Segmentation fault.
0x404525dd in Perl_gv_fetchpv () from /usr/lib/libperl.so.5.6
(gdb) bt
#0 0x404525dd in Perl_gv_fetchpv () from /usr/lib/libperl.so.5.6
#1 0x4044d347 in perl_get_cv () from /usr/lib/libperl.so.5.6
#2 0x4044d4b6 in perl_call_pv () from /usr/lib/libperl.so.5.6
#3 0x4042a030 in _init () from /usr/lib/freeradius/rlm_perl-2.0.0-pre0.so
#4 0x08055e12 in free_mainconfig ()
#5 0x0804eec5 in cf_pair_free ()
#6 0x0804f1fc in cf_section_free ()
#7 0x0804f21b in cf_section_free ()
#8 0x0804f21b in cf_section_free ()
#9 0x080558c4 in read_mainconfig ()
#10 0x08058ee2 in main ()
#11 0x4024714f in __libc_start_main () from /lib/libc.so.6
Problem was localized to detach section of perl module and here is a
dummy patch(do not call custom detach function as I do not need it...)
Index: src/modules/rlm_perl/rlm_perl.c
===================================================================
RCS file: /source/radiusd/src/modules/rlm_perl/rlm_perl.c,v
retrieving revision 1.51
diff -u -r1.51 rlm_perl.c
--- src/modules/rlm_perl/rlm_perl.c 17 Apr 2007 16:08:00 -0000 1.51
+++ src/modules/rlm_perl/rlm_perl.c 19 Apr 2007 07:47:51 -0000
@@ -1258,6 +1258,7 @@
{
dTHXa(inst->perl);
#endif /* USE_ITHREADS */
+#if 0
PERL_SET_CONTEXT(inst->perl);
{
dSP; ENTER; SAVETMPS;
@@ -1276,6 +1277,7 @@
FREETMPS;
LEAVE;
}
+#endif
#ifdef USE_ITHREADS
}
#endif
Hope this can help someone...
Milan Holub
holub (at) thenet (dot) ch
--------------------------------------
TheNet-Internet Services AG,
im Bernertechnopark, Morgenstr. 129
CH-3018, Bern, Switzerland
031 998 4333, Fax 031 998 4330
http://www.thenet.ch
http://wlan.thenet.ch
--------------------------------------
More information about the Freeradius-Users
mailing list