I'm trying to use newsyslog on FreeBSD 6.2/freeradius-1.1.6 to rotate
my log files an ensure I will never exceed a certain logfile size. My
newsyslog.conf file says<br>
<br>
/var/log/radius/radius.log barry:admin 640 10
10000 * J /var/run/radiusd/radiusd.pid<br>
/var/log/radius/*tmp barry:admin 600 10
10000 * JBG<br>
/var/log/radius/sqltrace.sql barry:admin 640 10
10000 * J<br>
/var/log/radius/radacct/*/* barry:admin 640 10
10000 * JG<br>
<br>
Now in my particular case when newsyslog runs from cron it finds that
radius.log, sqltrace.sql and one of the radacct/*/* files have exceeded
their filesize, so it renames them (*.log.n), touches a new file, in
the case of radius.log sends a SIGHUP to radiusd and then proceeds to
bzip the renamed logfiles. As you would expect.<br>
<br>
The problem is that when radiusd is running normally it starts to chew
up 98% CPU from this point onwards and completely stops responding to
accounting packets. I have to killall -9 radiusd, it won't even respond
to my SIGTERM. Running in debug mode unfortunately just causes radiusd
to segfault a few seconds after the log rotation (see output below).<br>
<br>
What could be the problem? Does freeradius actually close and reopen
its log files when receiving SIGHUP? I can't find any documentation on
other signals... :-(<br>
<br>
radiusd: FreeRADIUS Version 1.1.6, for host i386-portbld-freebsd6.2,
built on May 13 2007 at 22:44:09<br>
<br>
radiusd -X output<br>
<br>
(...)<br>
Sending Accounting-Response of id 223 to <a href="http://165.145.226.12">165.145.226.12</a> port 3799<br>
Finished request 4<br>
Going to the next request<br>
--- Walking the entire request list ---<br>
Cleaning up request 4 ID 223 with timestamp 464cddb9<br>
Nothing to do. Sleeping until we see a request.<br>
--- Walking the entire request list ---<br>
Nothing to do. Sleeping until we see a request.<br>
Reloading configuration files.<br>
reread_config: reading radiusd.conf<br>
Config: including file: /usr/local/etc/raddb/clients.conf<br>
Config: including file: /usr/local/etc/raddb/postgresql.conf<br>
main: prefix = "/usr/local"<br>
main: localstatedir = "/var"<br>
main: logdir = "/var/log/radius"<br>
main: libdir = "/usr/local/lib"<br>
main: radacctdir = "/var/log/radius/radacct"<br>
main: hostname_lookups = no<br>
main: snmp = no<br>
main: max_request_time = 30<br>
main: cleanup_delay = 5<br>
main: max_requests = 1024<br>
main: delete_blocked_requests = 0<br>
main: port = 62515<br>
main: allow_core_dumps = no<br>
main: log_stripped_names = no<br>
main: log_file = "/var/log/radius/radius.log"<br>
main: log_auth = yes<br>
main: log_auth_badpass = yes<br>
main: log_auth_goodpass = no<br>
main: pidfile = "/var/run/radiusd/radiusd.pid"<br>
main: user = "barry"<br>
main: group = "barry"<br>
main: usercollide = no<br>
main: lower_user = "no"<br>
main: lower_pass = "no"<br>
main: nospace_user = "no"<br>
main: nospace_pass = "no"<br>
main: checkrad = "/usr/local/sbin/checkrad"<br>
main: proxy_requests = no<br>
security: max_attributes = 20<br>
security: reject_delay = 2<br>
security: status_server = no<br>
main: debug_level = 0<br>
read_config_files: reading dictionary<br>
read_config_files: reading naslist<br>
read_config_files: reading clients<br>
read_config_files: reading realms<br>
Fri May 18 00:57:01 2007 : Info: rlm_exec: Wait=yes but no output
defined. Did you mean output=none?<br>
Fri May 18 00:57:01 2007 : Error: radiusd.conf[262] Auth-Type PAP
already configured - skipping<br>
Fri May 18 00:57:01 2007 : Info: rlm_sql (auth): Driver
rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked<br>
Fri May 18 00:57:01 2007 : Info: rlm_sql (auth): Attempting to connect
to radiusd@localhost:/mydb<br>
Fri May 18 00:57:01 2007 : Info: rlm_sql (acct): Driver
rlm_sql_postgresql (module rlm_sql_postgresql) loaded and linked<br>
Fri May 18 00:57:01 2007 : Info: rlm_sql (acct): Attempting to connect
to radiusd@localhost:/mydb<br>
Fri May 18 00:57:01 2007 : Info: Ready to process requests.<br>
Segmentation fault: 11