Summary:ASTERISK-00516: * should report and not die on SIGXFSZ
Reporter:collinr (collinr)Labels:
Date Opened:2003-11-11 15:45:46.000-0600Date Closed:2004-09-25 02:49:15
Versions:Frequency of
Environment:Attachments:( 0) asterisk.h.diff
( 1) asterisk-logrotate.txt
( 2) logger.c.diff
Description:When a log file (possibly CDR also) (for me it was messages) reaches the OS size limitation, asterisk cores with the following:

Core was generated by `asterisk -vvvvgc'.
Program terminated with signal 25, File size limit exceeded.

Comments:By: Brian West (bkw918) 2003-11-11 16:04:32.000-0600

Please read  bug 000265 and bug 000345 .. you have no need for 2 gig log files.. rotate them.. and use the command logger reload to reopen the files.


By: collinr (collinr) 2003-11-11 16:16:23.000-0600

It is true that we don't need logs greater than 2G; the problem is that * doesn't handle the signal 25 correctly.  Rather than coring with a cryptic error, it should give a meaningful error stating which file (or maybe possible files) has exceeded OS size limitations and then exit cleanly (IMHO core dumping isn't very clean).

By: Brian West (bkw918) 2003-11-11 16:47:54.000-0600

have any idea how to fix it where its more graceful?

By: Mark Spencer (markster) 2003-11-11 19:46:45.000-0600

Unfortunately I don't think we have a way to know the file that is too big. We just get the signal.

By: exomorph (exomorph) 2003-11-24 22:23:29.000-0600

Added an improved version of bkw's logrotate entry from bug ASTERISK-262...

By: Anthony Minessale (anthm) 2003-11-25 16:47:56.000-0600

Patched logger.c and asterisk.h to fix and imporve.


"logger reload"            : updated to open and close all the logs not just
                            the eventlog.

"logger rotate" cli command: this does the same as logger reload
                            except it also rotates all the files

SIGXFSZ handler            : executes "logger rotate" if received.

syslog keyword               : This special keyword logs to syslog facility
                            local0 edit /etc/syslog.conf and add
                            local0.* /var/log/myastlog

                             syslog => notice,warning,error

as a bonus you can bring about a log roatation from the command line with
this command:  kill -25 `cat /var/run/asterisk.pid`

see attached diffs

edited on: 11-25-03 17:04

By: Brian West (bkw918) 2003-11-26 14:50:42.000-0600

Fixed in CVS