From a87f618ac0f8f97de7bcc0a6434846421c747a91 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 23 Aug 2012 21:09:22 +2000 Subject: [PATCH] Re: Errors after upgrade to 0.14 --- 3a/f9efff3a49b3422db57a2b9904551b5a976b78 | 138 ++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 3a/f9efff3a49b3422db57a2b9904551b5a976b78 diff --git a/3a/f9efff3a49b3422db57a2b9904551b5a976b78 b/3a/f9efff3a49b3422db57a2b9904551b5a976b78 new file mode 100644 index 000000000..7a5fcc174 --- /dev/null +++ b/3a/f9efff3a49b3422db57a2b9904551b5a976b78 @@ -0,0 +1,138 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 15191431FAF + for ; Wed, 22 Aug 2012 18:09:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id QBNzjSW5ysxt for ; + Wed, 22 Aug 2012 18:09:26 -0700 (PDT) +Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU + [18.9.25.15]) + by olra.theworths.org (Postfix) with ESMTP id 6C7CA431FAE + for ; Wed, 22 Aug 2012 18:09:26 -0700 (PDT) +X-AuditID: 1209190f-b7f306d0000008b4-33-503582c52b3e +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP + id 3F.71.02228.5C285305; Wed, 22 Aug 2012 21:09:25 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q7N19Omm019691; + Wed, 22 Aug 2012 21:09:25 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7N19N6u017455 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Wed, 22 Aug 2012 21:09:24 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1T4LvG-0000b0-Vc; Wed, 22 Aug 2012 21:09:23 -0400 +Date: Wed, 22 Aug 2012 21:09:22 -0400 +From: Austin Clements +To: Bart Bunting +Subject: Re: Errors after upgrade to 0.14 +Message-ID: <20120823010922.GV11179@mit.edu> +References: + <20120823004117.GT11179@mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20120823004117.GT11179@mit.edu> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IR4hRV1j3aZBpgsGWxtcXFPfvZLa7fnMns + wOTxbNUtZo9TXw6xBzBFcdmkpOZklqUW6dslcGU0n1/CVjBfpKLz0BHWBsYX/F2MnBwSAiYS + +5puskHYYhIX7q0Hsrk4hAT2MUq8vPCCCcLZwChx+cNbqMxJJomnR++xQzhLGCXapk5lBOln + EVCVePnvNAuIzSagIbFt/3KgOAeHiICKxJEdfCBhZgFpiW+/m5lAbGEBTYljPVdYQUp4BXQk + zn3OBwkLCfhIrJy3hhnE5hUQlDg58wkLRKuWxI1/L5lAykHGLP/HARLmFNCVODnjDCuILQq0 + aMrJbWwTGIVmIemehaR7FkL3AkbmVYyyKblVurmJmTnFqcm6xcmJeXmpRbomermZJXqpKaWb + GMFBLcm/g/HbQaVDjAIcjEo8vC/MTQOEWBPLiitzDzFKcjApifL+aAAK8SXlp1RmJBZnxBeV + 5qQWH2KU4GBWEuH9Uw2U401JrKxKLcqHSUlzsCiJ815NuekvJJCeWJKanZpakFoEk5Xh4FCS + 4HUHRq+QYFFqempFWmZOCUKaiYMTZDgP0HBrkBre4oLE3OLMdIj8KUZFKXHeCJCEAEgiozQP + rheWdF4xigO9IgzRzgNMWHDdr4AGMwENVrtqDDK4JBEhJdXAmOiXNdXA4V77sV3Smy/cc3FQ + Fa9U9m73sjn4dsHk4sT9qTd87BszNZxbFxf6Tmlm/OhmG2relKqq8yrkxsk7MXaba06cvOjw + uWJ5KnMDq5Nk9R4e15DPxxz93hamtP5Zo37EaS3PBikPC/W53lsL8pq+Si6yWXPwg1Jb3ML/ + y3o+mtUyTJdVYinOSDTUYi4qTgQAcDmCWBUDAAA= +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 23 Aug 2012 01:09:27 -0000 + +Quoth myself on Aug 22 at 8:41 pm: +> Quoth Bart Bunting on Aug 23 at 9:36 am: +> > Good morning, +> > +> > After upgrading to notmuch 014 I am seeing the following messages appear +> > in the messages buffer. +> > +> > error in process filter: byte-code: Wrong type argument: number-or-marker-p, nil +> > error in process filter: Wrong type argument: number-or-marker-p, nil +> > +> > I am also getting a repeating message in the minibuffer (I think) which +> > says something like "json read tail error". Sorry that I am not more +> > specific as I use emacspeak and this message appears to repeat many +> > times interupting speech so I am not 100% sure of what it exactly says. +> +> This is probably "json-readtable-error", which is, unfortunately, +> about the most generic error the JSON parser can give. +> +> > My gut feeling is that it is happening when notmuch is updating the +> > database or something. +> > +> > Is this expected behaviour? It is particularly annoying for me as it +> > sends the speech synth crazy and crashes it for a period of about 30 +> > seconds. +> > +> > If it is expected then I will try and find a way to prevent emacspeak +> > from trying to read it. +> +> This is definitely not expected behavior. Does this happen when +> you're searching for messages or when you're viewing a thread? Can +> you give any more details on what you're doing when you get this +> error? +> +> Try doing M-x toggle-debug-on-error and then triggering the error. +> Hopefully Emacs will give you a buffer with a backtrace that will give +> us a better idea of where this is happening. + +Actually, I might know what's going on here. Based on your suspicion +about notmuch updating the database and assuming that this happens in +the search buffer, I think the parser error recovery code is leaving +the parser in a slightly invalid state, which causes the next +invocation to think it can consume more data when there is no more +data to consume. I would expect that to give at most one readtable +error, but maybe there's something I'm overlooking. + +Could you try the following one line patch? + +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index 900235b..a09c0f6 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -375,7 +375,7 @@ resynchronize after an error by moving point." + + (if (eq (notmuch-json-next jp) 'value) + ;; We're already at a value +- nil ++ (if (eobp) 'retry nil) + ;; Drive the state toward 'expect-value + (skip-chars-forward " \t\r\n") + (or (when (eobp) 'retry) + -- 2.26.2