rlm_perl segfault

Grant Zanetti radius at mani.ac.nz
Thu Mar 9 23:39:08 CET 2006


In addition to this I have done a manual compile (non-package) and have
a better back trace perhaps:
        
        Program received signal SIGSEGV, Segmentation fault.
        [Switching to Thread -1211832640 (LWP 6331)]
        0xb7a74ca2 in Perl_hv_clear_placeholders ()
        from /usr/lib/libperl.so.5.8
        (gdb) bt
        #0  0xb7a74ca2 in Perl_hv_clear_placeholders ()
        from /usr/lib/libperl.so.5.8
        #1  0xb7a75369 in Perl_hv_delayfree_ent ()
        from /usr/lib/libperl.so.5.8
        #2  0xb7a762cc in Perl_hv_fetch () from /usr/lib/libperl.so.5.8
        #3  0xb7a217ba in Perl_gv_fetchpv ()
        from /usr/lib/libperl.so.5.8
        #4  0xb7a1e14a in Perl_my_failure_exit ()
        from /usr/lib/libperl.so.5.8
        #5  0xb7a2097d in perl_parse () from /usr/lib/libperl.so.5.8
        #6  0xb7b31ec5 in perl_instantiate (conf=0x80675f0,
        instance=0x0) at
        rlm_perl.c:803
        #7  0x080557c5 in find_module_instance (instname=0x806c268
        "ipalloc") at
        modules.c:358
        #8  0x0805701a in do_compile_modsingle (component=3,
        ci=0x806c248,
        filename=0x8062274 "radiusd.conf", grouptype=0,
        modname=0xbfccda84)
            at modcall.c:1005
        #9  0x08055eef in setup_modules () at modules.c:570
        #10 0x0804cc05 in main (argc=2, argv=0xbfcced84) at
        radiusd.c:960

USE_ITHREADS is defined so it's using cloned perl instances.

On Wed, 2006-03-08 at 11:20 +0200, Boian Jordanov wrote:
> Can you check which version of libperl you are using ? I think on Debian it 
> was separate package ? Also please can you try to run freeradius with 
> example.pl which is included in freeradius. 
> 
> On Wednesday 08 March 2006 05:12, Grant Zanetti wrote:
> > I've just tried to get the rlm_perl module working.
> >
> > I'm running debian 3.1 with perl 5.8.8.  I've tried installing the
> > prebuilt debian packages as well as from source with "dpkg-buildpackage
> > -rfakeroot -uc -b"
> >
> > However after loading the module freeradius segfaults.
> >
> > Freeradius config:
> > modules {
> >  perl ipalloc {
> >   module = /etc/freeradius/dynip.pl
> >   func_accounting = accounting
> >   func_post_auth = post_auth
> >  }
> > }
> >
> > post-auth {
> >  ipalloc
> > }
> >
> > When running freeradius I get
> >
> > traffic:/etc/freeradius# freeradius -X
> > Starting - reading configuration files ...
> > reread_config:  reading radiusd.conf
> > Config:   including file: /etc/freeradius/proxy.conf
> > Config:   including file: /etc/freeradius/clients.conf
> > Config:   including file: /etc/freeradius/snmp.conf
> > Config:   including file: /etc/freeradius/eap.conf
> > Config:   including file: /etc/freeradius/sql.conf
> >  main: prefix = "/usr"
> >  main: localstatedir = "/var"
> >  main: logdir = "/var/log/freeradius"
> >  main: libdir = "/usr/lib/freeradius"
> >  main: radacctdir = "/var/log/freeradius/radacct"
> >  main: hostname_lookups = no
> >  main: max_request_time = 30
> >  main: cleanup_delay = 5
> >  main: max_requests = 1024
> >  main: delete_blocked_requests = 0
> >  main: port = 0
> >  main: allow_core_dumps = no
> >  main: log_stripped_names = no
> >  main: log_file = "/var/log/freeradius/radius.log"
> >  main: log_auth = no
> >  main: log_auth_badpass = no
> >  main: log_auth_goodpass = no
> >  main: pidfile = "/var/run/freeradius/freeradius.pid"
> >  main: user = "freerad"
> >  main: group = "freerad"
> >  main: usercollide = no
> >  main: lower_user = "no"
> >  main: lower_pass = "no"
> >  main: nospace_user = "no"
> >  main: nospace_pass = "no"
> >  main: checkrad = "/usr/sbin/checkrad"
> >  main: proxy_requests = yes
> >  proxy: retry_delay = 5
> >  proxy: retry_count = 3
> >  proxy: synchronous = no
> >  proxy: default_fallback = yes
> >  proxy: dead_time = 120
> >  proxy: post_proxy_authorize = no
> >  proxy: wake_all_if_all_dead = no
> >  security: max_attributes = 200
> >  security: reject_delay = 1
> >  security: status_server = no
> >  main: debug_level = 0
> > read_config_files:  reading dictionary
> > read_config_files:  reading naslist
> > Using deprecated naslist file.  Support for this will go away soon.
> > read_config_files:  reading clients
> > read_config_files:  reading realms
> > radiusd:  entering modules setup
> > Module: Library search path is /usr/lib/freeradius
> > Module: Loaded exec
> >  exec: wait = yes
> >  exec: program = "(null)"
> >  exec: input_pairs = "request"
> >  exec: output_pairs = "(null)"
> >  exec: packet_type = "(null)"
> > rlm_exec: Wait=yes but no output defined. Did you mean output=none?
> > Module: Instantiated exec (exec)
> > Module: Loaded expr
> > Module: Instantiated expr (expr)
> > Module: Loaded PAP
> >  pap: encryption_scheme = "crypt"
> > Module: Instantiated pap (pap)
> > Module: Loaded CHAP
> > Module: Instantiated chap (chap)
> > Module: Loaded MS-CHAP
> >  mschap: use_mppe = yes
> >  mschap: require_encryption = no
> >  mschap: require_strong = no
> >  mschap: with_ntdomain_hack = no
> >  mschap: passwd = "(null)"
> >  mschap: authtype = "MS-CHAP"
> >  mschap: ntlm_auth = "(null)"
> > Module: Instantiated mschap (mschap)
> > Module: Loaded System
> >  unix: cache = no
> >  unix: passwd = "(null)"
> >  unix: shadow = "/etc/shadow"
> >  unix: group = "(null)"
> >  unix: radwtmp = "/var/log/freeradius/radwtmp"
> >  unix: usegroup = no
> >  unix: cache_reload = 600
> > Module: Instantiated unix (unix)
> > Module: Loaded eap
> >  eap: default_eap_type = "md5"
> >  eap: timer_expire = 60
> >  eap: ignore_unknown_eap_types = no
> >  eap: cisco_accounting_username_bug = no
> > rlm_eap: Loaded and initialized type md5
> > rlm_eap: Loaded and initialized type leap
> >  gtc: challenge = "Password: "
> >  gtc: auth_type = "PAP"
> > rlm_eap: Loaded and initialized type gtc
> >  mschapv2: with_ntdomain_hack = no
> > rlm_eap: Loaded and initialized type mschapv2
> > Module: Instantiated eap (eap)
> > Module: Loaded preprocess
> >  preprocess: huntgroups = "/etc/freeradius/huntgroups"
> >  preprocess: hints = "/etc/freeradius/hints"
> >  preprocess: with_ascend_hack = no
> >  preprocess: ascend_channels_per_line = 23
> >  preprocess: with_ntdomain_hack = no
> >  preprocess: with_specialix_jetstream_hack = no
> >  preprocess: with_cisco_vsa_hack = no
> > Module: Instantiated preprocess (preprocess)
> > Module: Loaded realm
> >  realm: format = "suffix"
> >  realm: delimiter = "@"
> >  realm: ignore_default = no
> >  realm: ignore_null = no
> > Module: Instantiated realm (suffix)
> > Module: Loaded files
> >  files: usersfile = "/etc/freeradius/users"
> >  files: acctusersfile = "/etc/freeradius/acct_users"
> >  files: preproxy_usersfile = "/etc/freeradius/preproxy_users"
> >  files: compat = "no"
> > Module: Instantiated files (files)
> > Module: Loaded Acct-Unique-Session-Id
> >  acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address,
> > Client-IP-Address, NAS-Port"
> > Module: Instantiated acct_unique (acct_unique)
> > Module: Loaded detail
> >  detail: detailfile =
> > "/var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
> >  detail: detailperm = 384
> >  detail: dirperm = 493
> >  detail: locking = no
> > Module: Instantiated detail (detail)
> > Module: Loaded radutmp
> >  radutmp: filename = "/var/log/freeradius/radutmp"
> >  radutmp: username = "%{User-Name}"
> >  radutmp: case_sensitive = yes
> >  radutmp: check_with_nas = yes
> >  radutmp: perm = 384
> >  radutmp: callerid = yes
> > Module: Instantiated radutmp (radutmp)
> > Module: Loaded perl
> >  perl: module = "/etc/freeradius/dynip.pl"
> >  perl: func_authorize = "authorize"
> >  perl: func_authenticate = "authenticate"
> >  perl: func_accounting = "accounting"
> >  perl: func_preacct = "preacct"
> >  perl: func_checksimul = "checksimul"
> >  perl: func_detach = "detach"
> >  perl: func_xlat = "xlat"
> >  perl: func_pre_proxy = "pre_proxy"
> >  perl: func_post_proxy = "post_proxy"
> >  perl: func_post_auth = "post_auth"
> >  perl: perl_flags = "(null)"
> >  perl: func_start_accounting = "(null)"
> >  perl: func_stop_accounting = "(null)"
> > Segmentation fault
> >
> > The file "/etc/freeradius/dynip.pl" exists and is readable but the
> > segfault is the same whether it exists or not.
> >
> > This is the output from gdb
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1210271424 (LWP 866)]
> > 0xb7c12ca2 in Perl_hv_clear_placeholders () from /usr/lib/libperl.so.5.8
> > (gdb) bt
> > #0  0xb7c12ca2 in Perl_hv_clear_placeholders ()
> > from /usr/lib/libperl.so.5.8
> > #1  0xb7c13369 in Perl_hv_delayfree_ent () from /usr/lib/libperl.so.5.8
> > #2  0xb7c142cc in Perl_hv_fetch () from /usr/lib/libperl.so.5.8
> > #3  0xb7bbf7ba in Perl_gv_fetchpv () from /usr/lib/libperl.so.5.8
> > #4  0xb7bbc14a in Perl_my_failure_exit () from /usr/lib/libperl.so.5.8
> > #5  0xb7bbe97d in perl_parse () from /usr/lib/libperl.so.5.8
> > #6  0xb7cbcd5d in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #7  0x0812e590 in ?? ()
> > #8  0xb7cbc130 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #9  0x00000003 in ?? ()
> > #10 0xbffa29b0 in ?? ()
> > #11 0x00000000 in ?? ()
> > #12 0x0812e590 in ?? ()
> > #13 0xb7cc0060 in rlm_perl () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #14 0xb7cc0350 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #15 0xb7b99618 in ?? () from /usr/lib/libperl.so.5.8
> > #16 0xb7cc0344 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #17 0x0811a9e8 in ?? ()
> > #18 0x08119c68 in ?? ()
> > #19 0x00000000 in ?? ()
> > #20 0x0812e4c8 in ?? ()
> > #21 0xb7cbf6a0 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
> > #22 0x08050455 in log_debug ()
> > #23 0x08055332 in find_module_instance ()
> > #24 0x08056a4f in modcallable_free ()
> > #25 0x080559e4 in setup_modules ()
> > #26 0x0804cd80 in main ()
> >
> > I have tried with perl 5.8.4 with the same result.
> >
> > Any help would be appreciated.  I'm not sure how to get more debug out
> > of freeradius with gdb.
> >
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> 
> -- 
> Best Regards,
> Boian Jordanov
> SNE
> 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




More information about the Freeradius-Users mailing list