Re: Migrating to threaded rlm_perl

2011-06-24 Thread Energ
Rolling back to Freeradius 2.1.10 solved problem with memory leaks. I did not debug it, but it seems like accountig problem in 2.1.11. -- View this message in context: http://freeradius.1045715.n5.nabble.com/Migrating-to-threaded-rlm-perl-tp4506040p4521029.html Sent from the FreeRadius - User

Re: Migrating to threaded rlm_perl

2011-06-24 Thread Alan DeKok
Energ wrote: Rolling back to Freeradius 2.1.10 solved problem with memory leaks. I did not debug it, but it seems like accountig problem in 2.1.11. rlm_detail seems to have an issue. Patch is in github, v2.1.x branch. Alan DeKok. - List info/subscribe/unsubscribe? See

Re: Migrating to threaded rlm_perl

2011-06-22 Thread Energ
Seems like BEGIN{} block did the trick. Thanks, Alexander. I also moved from IPC to SQLite. But now i am faced with another problem - memory leak. For about an hour of uptime i get this: 5575 radius 2874M 2870M sleep 590 0:01:25 1.2% radiusd/9 and it countinues to grow. thread pool:

Migrating to threaded rlm_perl

2011-06-20 Thread Energ
Hi everyone! Please, help me with understanding of concept how to rewrite my perl module to work with threaded perl. Now it looks like this: my %options_pools = (create=1, exclusive=0, mode=0644, destroy=1); tie my %pooldb, 'IPC::Shareable', $pools_glue, { %options_pools } or die Tie failed:

Re: Migrating to threaded rlm_perl

2011-06-20 Thread Alexander Clouter
Energ po...@ponch.ru wrote: Please, help me with understanding of concept how to rewrite my perl module to work with threaded perl. Now it looks like this: [snipped thread unsafe code] While non-threaded perl it works as expected. But threading breaks creation of Shared memory (cuz

Re: Migrating to threaded rlm_perl

2011-06-20 Thread Energ
Thanks, Alexander! But, would it make any difference by using BEGIN{} block for creating shared memory segment? Wont threaded rlm_perl process this section in every thread it starts? -- View this message in context:

Re: Migrating to threaded rlm_perl

2011-06-20 Thread Alexander Clouter
Energ po...@ponch.ru wrote: But, would it make any difference by using BEGIN{} block for creating shared memory segment? Wont threaded rlm_perl process this section in every thread it starts? Threaded to FreeRADIUS means those methods you define are reentrant. IIRC BEGIN{} is called only