Bug #7919
closedLogging not working
0%
Description
On new installs logging is failing with:
Starting syslog...done. Oct 8 18:26:24 syslogd: /var/log/routing.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/ntpd.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/gateways.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/resolver.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/dhcpd.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/filter.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/nginx.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/dhcpd.log: Operation not supported by device Oct 8 18:26:24 syslogd: /var/log/system.log: Operation not supported by device
Updated by Jim Pingle about 7 years ago
- Status changed from New to Confirmed
- Target version set to 2.4.0
It looks like clog is failing to recognize its own file header somehow.
: clog system.log CLOGI���Oct 9 12:36:13 pfSense syslogd: kernel boot file is /boot/kernel/kernel clog: ERROR: could not write output (Bad address) : cat system.log CLOGI���Oct 9 12:36:13 pfSense syslogd: kernel boot file is /boot/kernel/kernel
Upgraded installs seem to be OK, only new installs from around Friday or later are affected.
Updated by Jim Pingle about 7 years ago
It's also possible syslogd is writing bad data to the file which breaks the clog format, so maybe the syslogd clog patch didn't make it to the 11.1 tree. If that were the case I'd expect upgrades to be broken as well, however.
Updated by Kill Bill about 7 years ago
Updated by Jim Pingle about 7 years ago
- Status changed from Confirmed to Resolved
- Assignee set to Luiz Souza
Luiz pushed some fixes to clog to correct this, next new snapshot we're testing internally is good.
Updated by Jim Thompson over 6 years ago
#define ENODEV 19 /* Operation not supported by device */
if (memcmp(&(f->f_un.f_ring.f_footer->cf_magic),MAGIC_CONST,4)!=0) {
(void)munmap(f->f_un.f_ring.f_footer,sizeof(struct clog_footer));
(void)close(f->f_file);
f->f_type = F_UNUSED;
errno = ENODEV;
logerror(p+1);
break;
}
So if the CLOG magic is missing CLOG will return ENODEV and spit the error message. The original issue that Luiz fixes was that syslog (clog) was writing after the end of buffer and the 'magic was overwritten.