From owner-freebsd-fs@FreeBSD.ORG Sun Apr 11 13:30:24 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08687106564A for ; Sun, 11 Apr 2010 13:30:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id 896698FC19 for ; Sun, 11 Apr 2010 13:30:23 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 22so293863fge.13 for ; Sun, 11 Apr 2010 06:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:organization:from :date:message-id:user-agent:mime-version:content-type; bh=9GHUB0u3j5B4QdDQiE4a35+roUD/+jqwViUk4dPAGHA=; b=Ch1jwxUQeEr5df10gcmipftMwjh0Rww7kMo6zDWaP3xwH8nIhWqcyvwKI5ViNSsCDl aKEnQriJy3fc34aX8Bi3L9Wl8V+X0DKqXxjzdDCavSA7aJO0Nu4GfFl+M7phSO7hhyGF 26flO1Q9Y0GAVMwyOd5wDVoJPoZYR6yOzO0oY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:organization:from:date:message-id:user-agent :mime-version:content-type; b=NJOpvrDjJ5FKU308IG4OCMQLQDLzL9r9yWG2W2YpSpnm4R8JVgBDxlLC8Ce+X/xEWA JVWLVi7ogD4gZLWcCPZEXLCaqPq8ne7TJ8iAJzUOSBwrReP7rBxODesTpz+R8q8fL+TU yVm5yv8drAwgb/skqBDJanijiJyfoZpS3GSjs= Received: by 10.223.29.199 with SMTP id r7mr1943687fac.73.1270992622322; Sun, 11 Apr 2010 06:30:22 -0700 (PDT) Received: from localhost ([95.69.173.44]) by mx.google.com with ESMTPS id f31sm6613373fkf.18.2010.04.11.06.30.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 Apr 2010 06:30:21 -0700 (PDT) To: freebsd-fs@freebsd.org Organization: Home From: Mikolaj Golub Date: Sun, 11 Apr 2010 16:30:19 +0300 Message-ID: <86ljcu5d78.fsf@kopusha.onet> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: hastd: error messages in logs are truncated X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 13:30:24 -0000 --=-=-= 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)); --=-=-=--