https://bugzilla.balabit.com/show_bug.cgi?id=20 Summary: crash on SIGHUP if an optional log file input source is not present Product: syslog-ng Version: 2.0.x Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: sayler@cs.duke.edu Type of the Report: bug Estimated Hours: 0.0 It looks like optional files break kill -HUP I have this in my configuration file pipe("/root/na/log/na.log" optional(yes)); Core was generated by `/usr/research/home/sayler/syslog-ng-2.0.8+20080303/src/syslog-ng -p /var/run/sy'. Program terminated with signal 11, Segmentation fault. #0 0x0805f1d5 in log_reader_get_pos (self=0x0) at logreader.c:506 506 res = lseek(self->fd->fd, 0, SEEK_CUR); (gdb) bt #0 0x0805f1d5 in log_reader_get_pos (self=0x0) at logreader.c:506 #1 0x08056a9f in affile_sd_deinit (s=0x8094a38, cfg=0x808f900, persist=0x8150db8) at affile.c:247 #2 0x08053bc2 in log_source_group_deinit (s=0x8094ac8, cfg=0x808f900, persist=0x8150db8) at sgroup.c:79 #3 0x080545d6 in log_center_deinit_component (key=0x8094b10 "s_all", value=0x8094ac8, self=0x8090260) at center.c:188 #4 0x08060642 in g_hash_table_foreach () #5 0x080549f1 in log_center_deinit (s=0x8090260, cfg=0x808f900, persist=0x8150db8) at center.c:281 #6 0x0804c800 in cfg_deinit (cfg=0x808f900, persist=0x8150db8) at cfg.c:218 #7 0x0804cd8a in cfg_reload_config ( fname=0x808b640 "/etc/syslog-ng/syslog-ng.conf", cfg=0x808f900) at cfg.c:383 #8 0x0804af1e in main_loop_run (cfg=0xbfa15638) at main.c:169 #9 0x0804b5cd in main (argc=5, argv=0xbfa156f4) at main.c:434 (gdb) list 501 off_t 502 log_reader_get_pos(LogReader *self) 503 { 504 off_t res; 505 506 res = lseek(self->fd->fd, 0, SEEK_CUR); 507 508 if (res >= 0) 509 return res - self->ofs; 510 return res; ... (gdb) print self $1 = (LogReader *) 0x0 (gdb) up #1 0x08056a9f in affile_sd_deinit (s=0x8094a38, cfg=0x808f900, persist=0x8150db8) at affile.c:247 247 cur_pos = log_reader_get_pos((LogReader *) self->reader); (gdb) list 242 if (persist) 243 { 244 gchar str[32]; 245 off_t cur_pos; 246 247 cur_pos = log_reader_get_pos((LogReader *) self->reader); 248 g_snprintf(str, sizeof(str), "%" G_GINT64_FORMAT, (gint64) cur_pos); 249 250 persist_config_add_survivor(persist, affile_sd_format_persist_name(self), str); 251 } (gdb) print self $2 = (AFFileSourceDriver *) 0x8094a38 (gdb) print (self A syntax error in expression, near `'. (gdb) print *self $3 = {super = {super = {ref_cnt = 1, pipe_next = 0x8094ac8, init = 0x80567c3 <affile_sd_init>, deinit = 0x8056a7f <affile_sd_deinit>, queue = 0x80538c3 <log_pipe_forward_msg>, free_fn = 0x8056b38 <affile_sd_free>, notify = 0x80565df <affile_sd_notify>}, optional = 1, drv_next = 0x0}, filename = 0x808f530, reader = 0x0, reader_options = {source_opts = { init_window_size = 100, window_size = 100}, options = 0, padding = 0, prefix = 0x0, msg_size = 8192, follow_filename = 0x8094aa0 "/root/na/log/na.log", follow_freq = -1, fetch_limit = 10, zone_offset = -1, keep_timestamp = 1, bad_hostname = 0x0}, flags = 1} -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.