bjordanov at orbitel.bg
Thu Jan 6 10:26:07 CET 2011
On Jan 6, 2011, at 1:51 AM, Anatoly Ivanov wrote:
> Hi everybody,
> I have a couple of questions regarding modules/rlm_perl/rlm_perl.c:
> 1. Is it correct to call PERL_SYS_TERM in detach()?
> I am experiencing quite random and unpredictable segfaults with radius 2.1.8
> and rlm_perl, and it really looks like memory allocation/multithreading
> error. I have very similar system running radius 2.1.7, and it works just
> fine. The most significant difference in rlm_perl between 2.1.7 and 2.1.8 is
> that PERL_SYS_TERM call.
> According to the documentation
> (http://perldoc.perl.org/perlembed.html), PERL_SYS_TERM
> should be called only once. In our case, it is called once per detaching
In fact it is called only once in the end of life of module. You can see that when a thread is destroyed is called
/* Create Key */
static void rlm_perl_make_key(pthread_key_t *key)
rlm_destroy_perl which destroy only particular interp
So the best will be to produce gdb trace file as i already wrote in my previous mail.
> 2. This code:
> embed = rad_malloc(4*(sizeof(char *)));
> memset(embed, 0, sizeof(4*(sizeof(char *))));
> looks like a misprint to me. Not that it would cause any real errors, but it
> is inaccurate anyway.
> Thank you,
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Head of Voice Department
tel. +359 2 4004 723
tel. +359 2 4004 002
More information about the Freeradius-Devel