Date: Sun, 11 Apr 2010 16:30:19 +0300 From: Mikolaj Golub <to.my.trociny@gmail.com> To: freebsd-fs@freebsd.org Subject: hastd: error messages in logs are truncated Message-ID: <86ljcu5d78.fsf@kopusha.onet>
next in thread | raw e-mail | index | archive | help
--=-=-= Hi, I have noticed that hastd truncates error messages writing to syslog, like below: Apr 10 22:32:56 hastb hastd: [storage] (secondary) Unable to create control sockets be: Too many open files Apr 11 13:24:38 hastb hastd: [storage] (primary) Unable to conn: Host is down. Apr 11 13:24:43 hastb hastd: [storage] (primary) Unable to conn: Connection refused. Apr 11 16:11:42 hastb hastd: [storage] (primary) Unable to : Socket is not connected. This is due to the bug in pjdlogv_common(), see the attached patch. -- Mikolaj Golub --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=pjdlog.c.pjdlogv_common.patch --- sbin/hastd/pjdlog.c.orig 2010-04-11 16:07:48.000000000 +0300 +++ sbin/hastd/pjdlog.c 2010-04-11 16:10:42.000000000 +0300 @@ -228,7 +228,7 @@ pjdlogv_common(int loglevel, int debugle len = snprintf(log, sizeof(log), "%s", pjdlog_prefix); if ((size_t)len < sizeof(log)) - len = vsnprintf(log + len, sizeof(log) - len, fmt, ap); + len += vsnprintf(log + len, sizeof(log) - len, fmt, ap); if (error != -1 && (size_t)len < sizeof(log)) { (void)snprintf(log + len, sizeof(log) - len, ": %s.", strerror(error)); --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ljcu5d78.fsf>