At 12:33 PM 02/02/01 -0200, you wrote: >can you send the diff of all files that you fix ? > >[]s
I don't have the time right now to make up the diffs (its Friday afternoon and 30 deg C outside :)), but I changed all the localtime & ctime references in the following files: src/main/xlat.c src/lib/valuepair.c src/main/log.c src/modules/rlm_detail/rlm_detail.c You have to change the 'struct tm *TM' declarations to 'struct tm TM' and the 'TM = localtime(&time)' calls to 'localtime_r(&time,&TM)'. Similar for ctime (you may have to create some temp variables though). I am not too familiar with linux, but I suspect you may need some extra #defines to enable the POSIX functions. Regards, Eddie >------------------------------------------------------------ >Marcelo Ferreira >Canbras TVA Cabo Ltda >Canbras Acesso - STA >Phone: +5511-4993-8728 >------------------------------------------------------------ > >----- Original Message ----- >From: "Eddie Stassen" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Friday, February 01, 2002 2:25 PM >Subject: Re: Thread issue - Possible fix > > > > I have been experiencing crashes as well under high accounting load > > (Solaris 7 , mysql accounting). It appears that the use of non thread-safe > > library functions are responsible for this. I have replaced all the > > localtime() and ctime() calls with their POSIX thread safe counterparts > > (localtime_r() and ctime_r()) and radiusd has been running perfectly for > > the last 2 hours under constant heavy load from radclient (1000+ req/sec) > > whereas before it would crash within a few minutes. > > > > There are a few other instances of non thread-safe library functions in >the > > source (gmtime, rand and strtok), but they are used mainly at startup so > > they should not affect the stability, although to be correct, I think they > > should be replaced with the *_r versions as well. > > > > I don't know how applicable these changes are to other OS's (Linux), but > > perhaps someone running FR on linux could try this and see if it helps. > > > > Eddie > > > > > > - > > List info/subscribe/unsubscribe? See >http://www.freeradius.org/list/users.html > > > > >- >List info/subscribe/unsubscribe? See >http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html