Hi, when using rlm_perl with a very simple Perl script that does *not* use DynaLoader to load some *.so files, upon thread exit, FreeRADIUS (current v2.x.x branch) throws errors: Error: Could not get @DynaLoader::dl_librefs for unloading. The errors originate from rlm_perl_get_handles(), which is invoked via pthread_key_create(key, rlm_destroy_perl): https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/src/modules/rlm_... Adding an (otherwise useless) 'require DynaLoader;' to the Perl script fixes the errors. Why is this an error case, rather than "no libs, no unloading necessary"? Thanks, Julius
Julius Plenz wrote:
when using rlm_perl with a very simple Perl script that does *not* use DynaLoader to load some *.so files, upon thread exit, FreeRADIUS (current v2.x.x branch) throws errors:
Error: Could not get @DynaLoader::dl_librefs for unloading.
That shouldn't be an error. I'll go fix that.
Why is this an error case, rather than "no libs, no unloading necessary"?
It's a minor bug. Alan DeKok.
Hi, Alan! * Alan DeKok <aland@deployingradius.com> [2012-11-22 15:22]:
Why is this an error case, rather than "no libs, no unloading necessary"?
It's a minor bug.
Thank you for the bug fix I found at https://github.com/FreeRADIUS/freeradius-server/commit/bfaf23b7d930364d680e7... However, by fixing the minor bug, you seem to have introduced a major one: FreeRADIUS segfaults on startup. Backtrace: #0 0x00007fe8bc912ffe in Perl_newXS () from /usr/lib/libperl.so.5.10 #1 0x00007fe8bcc495d4 in perl_instantiate (conf=0x24451a0, instance=0x2589c98) at rlm_perl.c:484 #2 0x000000000041a413 in find_module_instance (modules=<value optimized out>, instname=0x2448150 "perl", do_link=<value optimized out>) at modules.c:610 #3 0x000000000041c273 in do_compile_modsingle (parent=0x0, component=<value optimized out>, ci=0x2448110, grouptype=<value optimized out>, modname=0x7fffa89e15d0) at modcall.c:1921 #4 0x000000000041a8f1 in load_component_section (cs=0x2447c50, components=<value optimized out>, comp=1) at modules.c:898 #5 0x000000000041adbc in load_byserver (cs=0x2447ad0) at modules.c:1099 #6 0x000000000041b1c8 in virtual_servers_load (config=0x243f100) at modules.c:1230 #7 0x000000000041b520 in setup_modules (reload=<value optimized out>, config=0x243f100) at modules.c:1558 #8 0x00000000004194ea in read_mainconfig (reload=<value optimized out>) at mainconfig.c:967 #9 0x000000000041e2fe in main (argc=6, argv=0x7fffa89e1ee8) at radiusd.c:270 Maybe you shouldn't have moved the newXS() call to *before* the perl_parse(inst->perl, xs_init, ...) call? Moving it after that line fixes the segfault. Julius
Julius Plenz wrote:
Hi, Alan!
* Alan DeKok <aland@deployingradius.com> [2012-11-22 15:22]:
Why is this an error case, rather than "no libs, no unloading necessary"? It's a minor bug.
Thank you for the bug fix I found at https://github.com/FreeRADIUS/freeradius-server/commit/bfaf23b7d930364d680e7...
However, by fixing the minor bug, you seem to have introduced a major one: FreeRADIUS segfaults on startup. Backtrace: ... Maybe you shouldn't have moved the newXS() call to *before* the perl_parse(inst->perl, xs_init, ...) call? Moving it after that line fixes the segfault.
Ok, fixed. Alan DeKok.
participants (2)
-
Alan DeKok -
Julius Plenz