[syslog-ng] load failures in afsocket and afsql
Matthew Hall
mhall at mhcomputing.net
Wed Dec 15 03:49:12 CET 2010
OK. I still have no idea why spoof source libnet and sql libdbi fail to load.
But I did get a good idea why the init still fails with the cryptic
pipeline message with those disabled.
#0 log_db_parser_init (s=0x3dcb270, cfg=0x3d9d860) at dbparser.c:147
#1 0x00002abeea802f79 in log_parser_init (s=0x3dcb270, cfg=0x3d9d860) at logparser.h:56
#2 0x00002abeea802f27 in log_parser_rule_init (s=0x3dcb360, cfg=0x3d9d860) at logparser.c:105
#3 0x00002abeea803269 in log_process_rule_init (s=0x3dcb360, cfg=0x3d9d860) at logprocess.h:62
#4 0x00002abeea803238 in log_process_pipe_init (s=0x3dccdd0) at logprocess.c:60
#5 0x00002abeea7f0036 in log_pipe_init (s=0x3dccdd0, cfg=0x3d9d860) at logpipe.h:91
#6 0x00002abeea7eff34 in log_center_init (self=0x3da96f0, cfg=0x3d9d860) at center.c:508
#7 0x00002abeea7e6caf in cfg_init (cfg=0x3d9d860) at cfg.c:245
#8 0x00002abeea7e7846 in cfg_initial_init (cfg=0x3d9d860, persist_filename=0x402d10 "/home/y/var/run/syslog-ng/syslog-ng.persist") at cfg.c:510
#9 0x00000000004027f6 in initial_init (cfg=0x7fff1e086978) at main.c:287
#10 0x0000000000402b4c in main (argc=1, argv=0x7fff1e086a78) at main.c:426
log_db_parser_init can fail an init without logging an error and pass it
all the way back up to log_center_init without explaining what failed,
why it failed, or how it failed, in some cases. log_center_init is so
far up it doesn't know how to log a useful message about what really
happened.
Apparently, in log_db_parser_reload_database from dbparser.c you can get
a case where:
if ((self->db_file_inode == st.st_ino && self->db_file_mtime == st.st_mtime))
forces an early return despite the fact that self->db is still NULL.
I think this can happen when cfg_persist_config_fetch is supposed to
have the DB stored already but it unexpectedly does not.
I will have to investigate what's gone wrong with the persistent storage
on my system. Probably a missing directory cause a file write failure,
etc.
Breakpoint 46, log_db_parser_init (s=0x1009d270, cfg=0x1006f860) at dbparser.c:121
121 LogDBParser *self = (LogDBParser *) s;
123 self->db = cfg_persist_config_fetch(cfg, log_db_parser_format_persist_name(self));
124 if (self->db)
(gdb) print self->db
*** self->db fails to initialize via cfg_persist_config_fetch ***
$32 = (PatternDB *) 0x0
142 log_db_parser_reload_database(self);
Breakpoint 49, log_db_parser_reload_database (self=0x1009d270) at dbparser.c:61
61 if (stat(self->db_file, &st) < 0)
68 if ((self->db_file_inode == st.st_ino && self->db_file_mtime == st.st_mtime))
*** early return happens here without checking if self->db == NULL ***
98 }
...
Breakpoint 47, log_db_parser_init (s=0x1009d270, cfg=0x1006f860) at dbparser.c:146
146 return self->db != NULL;
(gdb) print self->db
$33 = (PatternDB *) 0x0
(gdb) n
...
log_parser_rule_init (s=0x1009d360, cfg=0x1006f860) at logparser.c:106
106 success = FALSE;
...
log_pipe_init (s=0x1009edd0, cfg=0x1006f860) at logpipe.h:96
96 return FALSE;
...
log_center_init (self=0x1007b6f0, cfg=0x1006f860) at center.c:510
510 msg_error("Error initializing message pipeline",
Matthew.
More information about the syslog-ng
mailing list