From patchwork Wed Jul 5 15:01:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ron Brash X-Patchwork-Id: 784669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x2kcP50Nxz9s75 for ; Thu, 6 Jul 2017 01:02:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FxXFA7NX"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gmvrs3CS"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:To:Message-ID:Date:From: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=EpxVIahsrTjQK/qcWb9mJsMB00hM/ilh2i77gmrrcz4=; b=FxX FA7NX4uQNJ4YSCUbNStjS+KN6lmI2sJ9bqZ28s3o/zC4++51Vi6j0NIrRC4ntD+ycydbt6VFjZry6 tQZBf2LMqoG+pZR4IDBFS3whSltQpnWipZZOJNbZtJFnGLqrYI079m1/GkY0TBJUwKRb3aqk+/6SR V17dDyPDoQiu6NaC9a2Zw8AR4ECziHPxgEuFsZ/RyrbURHq2+5cyin4Zfce7/Adt9EGTWldBYU8zj 9WwCA4Y4jgzRmXEcqEJV7uTZkDxa0upK8YIm+6VWDqkw+hF6F4SkijY/2BDfllsXwTn08oV3nFnpX Av5q0iysJ2ugrPgsNiXgiMaJFULnE1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dSloZ-0005gV-OD; Wed, 05 Jul 2017 15:02:03 +0000 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dSloR-0005Vp-CZ for lede-dev@lists.infradead.org; Wed, 05 Jul 2017 15:02:01 +0000 Received: by mail-qk0-x229.google.com with SMTP id d78so191299001qkb.1 for ; Wed, 05 Jul 2017 08:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=lZd0tRCZCR8xEV2ttbak5h1D9OguSL1dNUg6o1J1BfA=; b=gmvrs3CSJ+dsKbpY+sjZZCj19eCYLLJKJz+JDVl4xI3qPHx4/wn/H8w5qE5Zoz8HlD RmNTc9vzLsgzY0V0EO7KM/0y71sPzJFLUIFZDQSDHFTFB9ZIjo/HVHcqw08knabB7Pb5 /DsCJPArP/zqhCKt7CLtWU1niOSlArdNeYppXFYM2fFFDRjwt1mF3t2gEag0KfO7acB8 lL6x13A6MEAnCcu6IOI/PEijIKhwaaHhbjq0IbzpgceJsExFFjAsBLVy5zILc1OIi3zT VZOPsxaRtsU5RNO2Ch/1SClDVwaT0YNjghrdFkwdl1k9E7y1Oj1vbhIqX8/4WDHHK+FD AN8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=lZd0tRCZCR8xEV2ttbak5h1D9OguSL1dNUg6o1J1BfA=; b=TU/rWoCYqGiEGBS5T8Q0XW8Q3x05JLjbydSZVvEwT/yS/CTOU2vaUsA+AZqvUv6TTj X/OfpZgpzmbayrJSRnPS92ovPPGR4/CnOAmpFbVG6sWvnjS1pqnzgxYK9b9XbO8hmoNr LP/iNdG81Xrv4A82ETm6VcLfoRM4lniIg4+3557EDdG8rqhhJNaLE03rxShYOk8HU5Nu XxkK1TRNkFdfEIzXBc1DFWoNdFg96MJV+RrNdgfqxQFSp3o8iG/CHG6k1Jrh7z1Y4wgL M9jcVzr2LU7+G7rmPBuTEZDChzRupYHpxjpgboSxeAtff7dearDxVbNpAan6oIbRlUVH bRaA== X-Gm-Message-State: AKS2vOw/Jq+b/kGJLc4hI4C5dOu+Eb9Q1MJ3MOBIz+Rv+i265f/h7AWq ysdCZgQ7GzhVUD1aGK8yUwWduhs8upMS7B0= X-Received: by 10.55.97.148 with SMTP id v142mr55551880qkb.107.1499266893487; Wed, 05 Jul 2017 08:01:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.56.130 with HTTP; Wed, 5 Jul 2017 08:01:32 -0700 (PDT) From: Ron Brash Date: Wed, 5 Jul 2017 11:01:32 -0400 Message-ID: To: lede-dev@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170705_080155_541389_F9740299 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400d:c09:0:0:0:229 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ron.brash[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH ubox] Fix logread starvation X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello all, Here is a repost of the previous concatonated patch. This patch contains the fix we needed to stop the logger from silently starving after a number of logs were generated. It was around the 16K mark when the daemons would stop writing to the /var/log/messages file, yet still remain alive. Restarting the log service would force a hard fix, but here is the fix we implemented, which worked. Ron diff --git a/log/logread.c b/log/logread.c index edac1d9..2032819 100644 --- a/log/logread.c +++ b/log/logread.c @@ -230,8 +230,10 @@ static void logread_fd_data_cb(struct ustream *s, int bytes) break; cur_len = blob_len(a) + sizeof(*a); - if (len < cur_len) + if (len < cur_len) { + ustream_consume(s, len); break; + } log_notify(a);