How to disable threads in 2.1.7
I am trying to build a version of 2.1.7 without threads (trying to debug an abandoned child process issue). on a redhat AS5 Linux system Every configure option I try seems to be ignored. In config.log I find entries like, Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix I have tried the following options for configure, all with no apparent luck, ./configure --with-threads=no ./configure --disable-threads ./configure --enable-threads=NO ./configure --enable-threads=no --with-threads=no --disable-threads --disable-thread --with-thread=no ./configure --disable-threads --disable-thread ./configure --disable-pthreads --disable-thread ./configure --disable-pthreads --disable-thread Has anyone determined how to disable threads? Thanks, -craig Craig Campbell craig.campb...@ccraft.ca CampbellCraft Consulting Inc 2 Kenny Court Whitby, Ontario Canada L1R 2L8 905 922-2789 __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
> I am trying to build a version of 2.1.7 without threads (trying to debug > an abandoned child process issue). on a redhat AS5 Linux system You don't build it without threads, you start it without threads. See man radiusd. Ivan Kalik Kalik Informatika ISP - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
So I cannot have multi processes without having threads as well? - Original Message - From: "Ivan Kalik" To: "FreeRadius users mailing list" Sent: Friday, October 16, 2009 7:57 AM Subject: Re: How to disable threads in 2.1.7 I am trying to build a version of 2.1.7 without threads (trying to debug an abandoned child process issue). on a redhat AS5 Linux system You don't build it without threads, you start it without threads. See man radiusd. Ivan Kalik Kalik Informatika ISP - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
On 10/16/2009 08:03 AM, Craig Campbell wrote: So I cannot have multi processes without having threads as well? What does that mean? -- John Dennis Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
Craig Campbell wrote: > So I cannot have multi processes without having threads as well? What does that mean? Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
On 10/16/2009 08:15 AM, Alan DeKok wrote: What does that mean? That was strange :-) Our two responses were word for word identical and almost at the same time When I was a kid and two people said the same thing at the same time it became a race to see who would say this next: "Jinx! You owe me a bottle of Coke." often followed by: "No backs. No takes. No refunds. No penny tax." so ... Jinx! You owe me a bottle of Coke. :-) :-) -- John Dennis Looking to carve out IT costs? www.redhat.com/carveoutcosts/ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
On Friday 16 October 2009 13:27:28 John Dennis wrote: > On 10/16/2009 08:15 AM, Alan DeKok wrote: > >What does that mean? > > That was strange :-) Our two responses were word for word identical and > almost at the same time > > When I was a kid and two people said the same thing at the same time it > became a race to see who would say this next: > > "Jinx! You owe me a bottle of Coke." > > often followed by: > > "No backs. No takes. No refunds. No penny tax." Where I'm from we say different things when that happens, but I heard that same thing from a old loony in the Spielberg's "Always" movie :D . > > so ... > > Jinx! You owe me a bottle of Coke. :-) :-) - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
I was hoping to build a version that could fork children, but not spawn threads. There are known 'challenges' in using the fork command in multi threaded environments. (As opposed to a process that forks children for different processing branches.) A couple of years ago I had an extremely challenging time modifying an existing threaded application to additionally fork off children to perform certain other tasks. The issue I am seeing of stranded/hung children looks similar (that is not to say I have caught the culprit... just suspicion at this point). The issue seems to happen only sometimes during bursts of increased load. (Same as my previous experience.) If I were to GUESS, at this point I'd look for interrupts that result in children when mute locks are in place and unintentionally inherited by the child process. (My solution was to acquire ALL locks before a fork, then have the child and parent clear them all after) - see man pthread_atfork section: RATIONALE if you have access to a Linux system). I cannot explain why apparently no one else is seeing the issue I am chasing. As far as I can tell, my configuration is quite basic. I am now trying a run with the -s option but, if successful, it won't tell us much about why. Thanks for all the assistance, -craig - Original Message - From: "Alan DeKok" To: "FreeRadius users mailing list" Sent: Friday, October 16, 2009 8:15 AM Subject: Re: How to disable threads in 2.1.7 Craig Campbell wrote: So I cannot have multi processes without having threads as well? What does that mean? Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
Craig Campbell wrote: I was hoping to build a version that could fork children, but not spawn threads. Not possible. You could run lots of copies with a single thread bound to different UDP ports, and load-balance them somehow. I cannot explain why apparently no one else is seeing the issue I am chasing. As far as I can tell, my configuration is quite basic. The fact that it's not happening for anyone else would tend to indicate it's specific to your system. We fork processes on accounting in some of our virtual servers, and this doesn't happen. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
Craig Campbell wrote: > I was hoping to build a version that could fork children, but not spawn > threads. The server can "exec" child shell scripts. It *cannot* run multiple RADIUS servers as child processes. > There are known 'challenges' in using the fork command in multi threaded > environments. (As opposed to a process that forks children for > different processing branches.) A couple of years ago I had an > extremely challenging time modifying an existing threaded application to > additionally fork off children to perform certain other tasks. The challenge is in ensuring that the right thread catches the right child exit. If you run the server with "radiusd -s", it won't spawn threads. > The issue I am seeing of stranded/hung children looks similar (that is > not to say I have caught the culprit... just suspicion at this point). > The issue seems to happen only sometimes during bursts of increased > load. (Same as my previous experience.) It may be a race condition under heavy load. But I don't see why... the thread that forks then waits for the child to exit, and grabs the exit code. This should ensure that the child dies, rather than staying as a zombie. > If I were to GUESS, at this point I'd look for interrupts that result in > children when mute locks are in place and unintentionally inherited by > the child process. Except that the server doesn't fork... and continue running. It forks, and immediately exec's the shell script. If the shell script fails to be executed, the child *still* dies. The child doesn't obtain *or* check mutexes in between the fork() and exec(). It does almost *nothing*, as there is only a 100 lines of code between the fork() and exec() > (My solution was to acquire ALL locks before a fork, > then have the child and parent clear them all after) - see man > pthread_atfork section: RATIONALE if you have access to a Linux system). That is for long-running children. We don't do that. > I cannot explain why apparently no one else is seeing the issue I am > chasing. As far as I can tell, my configuration is quite basic. Kernel bugs? Possible race conditions in the code? > I am now trying a run with the -s option but, if successful, it won't > tell us much about why. If it works... Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: How to disable threads in 2.1.7
From the man page for radiusd, the -s option specifies, "Some systems have issues with threading, however, so running in "single server" mode may help to address those issues." I cannot help but wonder if in fact others have been seeing this, and just opted for -s and less efficiency. At this point all the (troubled) server receives are accounting packets It then relays these packets to two (2) other radius servers, and processed them according to acct_users, which in turn runs a script for Stop packets. Thus far, only running an external script has been identified (thanks Alan) as creating child processes of radiusd. I really would LOVE for this to be a configuration error on my part, but so far I cannot locate one. Thanks, -craig - Original Message - From: "Phil Mayers" To: "FreeRadius users mailing list" Sent: Friday, October 16, 2009 8:52 AM Subject: Re: How to disable threads in 2.1.7 Craig Campbell wrote: I was hoping to build a version that could fork children, but not spawn threads. Not possible. You could run lots of copies with a single thread bound to different UDP ports, and load-balance them somehow. I cannot explain why apparently no one else is seeing the issue I am chasing. As far as I can tell, my configuration is quite basic. The fact that it's not happening for anyone else would tend to indicate it's specific to your system. We fork processes on accounting in some of our virtual servers, and this doesn't happen. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4514 (20091016) __ The message was checked by ESET Smart Security. http://www.eset.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html