> Two perl instances running different perl scripts! I would suggest
> following instructions in doc/bugs to find out what is causing the
> segfault.

rlm_perl is acting very strangely on my 2.1.6 test system (beyond what 
I've already mentioned).  I have two instances of a script called
write_log_data.pl that are called in post_auth.  One instance is called
write_log_accept (post_auth = post_auth_accept) and the other is
write_log_reject (post_auth = post_auth_reject).  I have another
script called dumplists.pl that is not called in post_auth at all.  
When I was testing (trying to recreate SegFault), post_auth_accept
was calling dumplists.pl (I added subroutines post_auth_accept and
post_auth_reject to dumplists.pl and had them write msgs via
&radiusd::radlog).  I changed the message in dumplists.pl 
post_auth_accept and restarted.  Now rlm_perl properly called
script write_log_data.pl sub post_auth_accept - but output an
error that it couldn't find it.  So, it returned reject which
caused an attempt to call write_log_data sub post_auth_reject;
which also output an error saying it couldn't find it (undefined
subroutine as Igor and I described in previous msgs).

So, I took your advice above and rebuilt FR with symbols and ran
Under gdb.  But, I also decided to look back at the build output for rlm_perl.  
I believe the errors below are causing my problems (redundant
declarations coming from /usr/include).  I'm thinking it should be
using the perl version of the definitions as opposed to the version 
in /usr/include.  I'll test this theory..

I can post the FR debug and gdb output if someone thinks the errors
below are normal.

Igor: Can you rebuild FR and look at the output of rlm_perl on
your system to see if you see similar errors?

Here is the output from building rlm_perl on my system:

Making all in rlm_perl...
gmake[6]: Entering directory 
`/usr/ports/net/freeradius2/work/freeradius-server-2.1.6/src/modules/rlm_perl'
/usr/local/bin/libtool --mode=compile cc  -pipe -I/usr/local/include 
-L/usr/local/lib -DLDAP_DEPRECATED -pthread -Wall -D_GNU_SOURCE    -g -Wshadow 
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wmissing-declarations    -Wnested-externs -W 
-Wredundant-decls -Wundef 
-I/usr/ports/net/freeradius2/work/freeradius-server-2.1.6/src 
-I/usr/ports/net/freeradi   us2/work/freeradius-server-2.1.6/libltdl `perl 
-MExtUtils::Embed -e ccopts` -c rlm_perl.c
mkdir .libs
 cc -pipe -I/usr/local/include -L/usr/local/lib -DLDAP_DEPRECATED -pthread 
-Wall -D_GNU_SOURCE -g -Wshadow -Wpointer-arith -Wcast-qua   l -Wcast-align 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
-Wnested-externs -W -Wredundant-decls    -Wundef 
-I/usr/ports/net/freeradius2/work/freeradius-server-2.1.6/src 
-I/usr/ports/net/freeradius2/work/freeradius-server-2.1.6/liblt   dl 
-DAPPLLIB_EXP=\"/usr/local/lib/perl5/5.8.9/BSDPAN\" -DHAS_FPSETMASK 
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/   include 
-I/usr/local/lib/perl5/5.8.9/mach/CORE -c rlm_perl.c  -fPIC -DPIC -o 
.libs/rlm_perl.o
In file included from rlm_perl.c:39:
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:1207: warning: redundant 
redeclaration of 'strerror'
/usr/include/string.h:83: warning: previous declaration of 'strerror' was here
In file included from rlm_perl.c:39:
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3380: warning: redundant 
redeclaration of 'getuid'
/usr/include/unistd.h:349: warning: previous declaration of 'getuid' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3381: warning: redundant 
redeclaration of 'geteuid'
/usr/include/unistd.h:342: warning: previous declaration of 'geteuid' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3382: warning: redundant 
redeclaration of 'getgid'
/usr/include/unistd.h:343: warning: previous declaration of 'getgid' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3383: warning: redundant 
redeclaration of 'getegid'
/usr/include/unistd.h:341: warning: previous declaration of 'getegid' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3678: warning: redundant 
redeclaration of 'mktemp'
/usr/include/unistd.h:506: warning: previous declaration of 'mktemp' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3680: warning: redundant 
redeclaration of 'atof'
/usr/include/stdlib.h:86: warning: previous declaration of 'atof' was here
In file included from rlm_perl.c:39:
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3771: warning: redundant 
redeclaration of 'crypt'
/usr/include/unistd.h:427: warning: previous declaration of 'crypt' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3777: warning: redundant 
redeclaration of 'getenv'
/usr/include/stdlib.h:95: warning: previous declaration of 'getenv' was here
/usr/local/lib/perl5/5.8.9/mach/CORE/perl.h:3788: warning: redundant 
redeclaration of 'getlogin'
/usr/include/unistd.h:345: warning: previous declaration of 'getlogin' was here
rlm_perl.c: In function 'rlm_perl_get_handles':
rlm_perl.c:164: warning: cast to pointer from integer of different size
rlm_perl.c: In function 'rlm_perl_destruct':
rlm_perl.c:206: warning: declaration of 'my_perl' shadows a previous local
rlm_perl.c:197: warning: shadowed declaration is here
rlm_perl.c: In function 'rlm_perl_make_key':
rlm_perl.c:238: warning: passing argument 2 of 'pthread_key_create' from 
incompatible pointer type
rlm_perl.c: In function 'rlm_perl_clone':
rlm_perl.c:268: warning: format '%d' expects type 'int', but argument 3 has 
type 'pthread_t'
rlm_perl.c: In function 'xs_init':
rlm_perl.c:276: warning: initialization discards qualifiers from pointer target 
type
rlm_perl.c:279: warning: passing argument 2 of 'Perl_newXS' discards qualifiers 
from pointer target type
rlm_perl.c: In function 'perl_xlat':
rlm_perl.c:362: warning: value computed is not used
rlm_perl.c: In function 'perl_instantiate':
rlm_perl.c:429: warning: assignment discards qualifiers from pointer target type
rlm_perl.c:433: warning: assignment discards qualifiers from pointer target type
rlm_perl.c:477: warning: passing argument 2 of 'Perl_newXS' discards qualifiers 
from pointer target type
rlm_perl.c:477: warning: passing argument 4 of 'Perl_newXS' discards qualifiers 
from pointer target type
rlm_perl.c: In function 'perl_store_vps':
rlm_perl.c:524: warning: assignment discards qualifiers from pointer target type
rlm_perl.c:537: warning: value computed is not used
rlm_perl.c:549: warning: value computed is not used
rlm_perl.c: In function 'rlmperl_call':
rlm_perl.c:704: warning: value computed is not used


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to