Hi List, we use freeradius for authentication wireless users and use rlm_perl to integrate perl scripts which determine e.g. vlan info from our database and lookup the users password. I was having some issues with freeradius segfaulting. In debug mode (-X) everything worked, but normal mode (multithreaded) it segfaults. The segfault would be at a seemingly random place in the perl library. The solution was in the way rlm_perl calls perl_clone (for creating perl-threads). The perl docs say this must be done one after the other, not in parallel. By adding a mutex around the perl_clone calls, the problem went away. I have attached a patch which solved the problem for me. Perhaps this patch is of use to someone else. Suggestions and improvements are welcome? Eike Dehling Quarantainenet
Eike Dehling wrote:
The solution was in the way rlm_perl calls perl_clone (for creating perl-threads). The perl docs say this must be done one after the other, not in parallel. By adding a mutex around the perl_clone calls, the problem went away.
I have attached a patch which solved the problem for me. Perhaps this patch is of use to someone else.
Suggestions and improvements are welcome?
It looks good. I've added it, thanks. Alan DeKok.
participants (2)
-
Alan DeKok -
Eike Dehling