Project

General

Profile

Bug #7919

Logging not working

Added by Steve Wheeler about 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Logging
Target version:
Start date:
10/09/2017
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.4
Affected Architecture:

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

History

#1 Updated by Jim Pingle about 2 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.

#2 Updated by Jim Pingle about 2 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.

#4 Updated by Jim Pingle about 2 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.

#5 Updated by Jim Thompson over 1 year 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.

Also available in: Atom PDF