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 B041B431FAF for ; Wed, 22 Aug 2012 19:47:30 -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 dSQ55vYOHWAY for ; Wed, 22 Aug 2012 19:47:29 -0700 (PDT) Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU [18.9.25.13]) by olra.theworths.org (Postfix) with ESMTP id 0E42C431FAE for ; Wed, 22 Aug 2012 19:47:28 -0700 (PDT) X-AuditID: 1209190d-b7fd56d000000933-7a-503599bf69ff Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id 8D.62.02355.FB995305; Wed, 22 Aug 2012 22:47:27 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q7N2lRlu020924; Wed, 22 Aug 2012 22:47:27 -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 q7N2lPtW026071 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 22 Aug 2012 22:47:26 -0400 (EDT) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1T4NS9-0000o9-En; Wed, 22 Aug 2012 22:47:25 -0400 Date: Wed, 22 Aug 2012 22:47:25 -0400 From: Austin Clements To: Bart Bunting Subject: Re: Errors after upgrade to 0.14 Message-ID: <20120823024725.GY11179@mit.edu> References: <20120823004117.GT11179@mit.edu> <20120823010922.GV11179@mit.edu> <20120823013412.GX11179@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOKsWRmVeSWpSXmKPExsUixCmqrbt/pmmAwaf/UhYX9+xnt7h+cyaz A5PHs1W3mD1OfTnEHsAUxWWTkpqTWZZapG+XwJWxr3E9c8FrjYpdLxexNzD+Vepi5OSQEDCR +NyzhB3CFpO4cG89WxcjF4eQwD5Gib8zNzNCOBsYJW5eeMEO4Zxkklj1aTYbSIuQwBJGiVXv pUFsFgFViXVn17KA2GwCGhLb9i8H6ubgEBFQkTiygw8kzCwgLfHtdzMTiC0soClxrOcKK4jN K6Aj8WluC9TmT4wSZw78Y4ZICEqcnPmEBaJZS+LGv5dMIDNBBi3/xwER1pZYtvA1WDknUMmB e/PBThMFWjvl5Da2CYzCs5BMmoVk0iyESbOQTFrAyLKKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI 10gvN7NELzWldBMjOA4keXcwvjuodIhRgINRiYf3hblpgBBrYllxZe4hRkkOJiVR3hOTgUJ8 SfkplRmJxRnxRaU5qcWHGCU4mJVEeP9UA+V4UxIrq1KL8mFS0hwsSuK8V1Ju+gsJpCeWpGan phakFsFkZTg4lCR4H88AahQsSk1PrUjLzClBSDNxcIIM5wEafhqkhre4IDG3ODMdIn+KUZfj /8mTdxmFWPLy81KlxHkPgRQJgBRllObBzYGlr1eM4kBvCfNyAZOZEA8w9cFNegW0hAloidpV Y5AlJYkIKakGRpnOZ/9XLa3YYraAI8X0YlG9bL1CifCXj5Hr3q556nC+wGp23MTHwRtbE2Lb dpl/NBL9YMp/5jOPq5zaLhfbL9K9i+1ORfsFrGE1zRS7cuPb69Oz75mU68t11RUG31j0QO3B ng1fNG6/7hc8eMjtuGCiTFd27+1lQc7/jlzYLse4w83/6Ny1fEosxRmJhlrMRcWJAMYNTI86 AwAA 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 02:47:30 -0000 Fun. It looks like several things are colluding to cause problems here. The root problem is still concurrent database access, judging by the error messages embedded in the string passed to notmuch-search-process-filter, but it's being handled poorly at several layers. First, _notmuch_thread_create in the library doesn't notice when notmuch_query_search_messages fails, so it constructs an empty thread object, rather than indicating failure, which notmuch-search.c dutifully emits. But by that point the damage has already been done by the error printed deep in the bowels of the library. Somehow that error message is tripping up the incremental parser (exactly how I'm unclear on) and causing it to read the string "tags" as a list-level JSON object, which it then passes to notmuch-search-show-result as a result object. Since it's not a result object, plist-get returns nil, which causes =3D to raise the error. This is probably a bug in the error recovery of the incremental JSON parser (or its use in search-mode), since the output below looks clean enough that it *should* be able to catch the error and resynchronize. Quoth Bart Bunting on Aug 23 at 11:49 am: > Ok perhaps this is more helpfull? >=20 > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > notmuch-search-show-result("tags") > byte-code("\304=08\305\"\203\306 !\307=3D\203\310\202Q\303\202Q\304=08\= 311\"\203D\312 !\304=0B\313\"\2030\310\202@\304=0B\314\"\203<\315\202@\316= =0B!\210)\202Q\304=08\317\"\203Q\320 !\210\310\304\207" [notmuch-search-pro= cess-state notmuch-search-json-parser done result memql (begin) notmuch-jso= n-begin-compound retry t (result) notmuch-json-read (retry) (end) end notmu= ch-search-show-result (end) notmuch-json-eof] 3) > notmuch-search-process-filter(# ", \"tags\": []= },\nA Xapian exception occurred performing query: The revision being read h= as been discarded - you should call Xapian::Database::reopen() and retry th= e operation\nQuery string was: thread:0000000000020a59\n{\"thread\": \"0000= 00000001fd19\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"matc= hed\": 0, \"total\": 0, \"authors\": \"\", \"subject\": \"\", \"tags\": []}= ,\nA Xapian exception occurred performing query: The revision being read ha= s been discarded - you should call Xapian::Database::reopen() and retry the= operation\nQuery string was: thread:0000000000020a57\n{\"thread\": \"00000= 00000020a59\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"match= ed\": 0, \"total\": 0, \"authors\": \"\", \"subject\": \"\", \"tags\": []},= \nA Xapian exception occurred performing query: The revision being read has= been discarded - you should call Xapian::Database::reopen() and retry the = operation\nQuery string was: thread:0000000000020a57\n{\"thread\": \"000000= 0000020a57\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"matche= d\": 0, \"total\": 0, \"authors\": ") > recursive-edit() > debug(error (error "A Xapian exception occurred opening database: Unabl= e to get write lock on /Users/bart/mail/.notmuch/xapian: already locked")) > ad-Orig-signal(error ("A Xapian exception occurred opening database: Un= able to get write lock on /Users/bart/mail/.notmuch/xapian: already locked"= )) > signal(error ("A Xapian exception occurred opening database: Unable to = get write lock on /Users/bart/mail/.notmuch/xapian: already locked")) > ad-Orig-error("A Xapian exception occurred opening database: Unable to = get write lock on /Users/bart/mail/.notmuch/xapian: already locked") > apply(ad-Orig-error "A Xapian exception occurred opening database: Unab= le to get write lock on /Users/bart/mail/.notmuch/xapian: already locked") > error("A Xapian exception occurred opening database: Unable to get writ= e lock on /Users/bart/mail/.notmuch/xapian: already locked") > notmuch-call-notmuch-process("tag" "-inbox" "--" "thread:00000000000222= 88") > apply(notmuch-call-notmuch-process "tag" ("-inbox" "--" "thread:0000000= 000022288")) > notmuch-tag("thread:0000000000022288" ("-inbox")) > notmuch-search-tag-region(202 202 ("-inbox")) > notmuch-search-tag(("-inbox")) > ad-Orig-notmuch-search-archive-thread() > notmuch-search-archive-thread() > call-interactively(notmuch-search-archive-thread nil nil) > recursive-edit() > debug(error (error "A Xapian exception occurred opening database: Unabl= e to get write lock on /Users/bart/mail/.notmuch/xapian: already locked")) > ad-Orig-signal(error ("A Xapian exception occurred opening database: Un= able to get write lock on /Users/bart/mail/.notmuch/xapian: already locked"= )) > signal(error ("A Xapian exception occurred opening database: Unable to = get write lock on /Users/bart/mail/.notmuch/xapian: already locked")) > ad-Orig-error("A Xapian exception occurred opening database: Unable to = get write lock on /Users/bart/mail/.notmuch/xapian: already locked") > apply(ad-Orig-error "A Xapian exception occurred opening database: Unab= le to get write lock on /Users/bart/mail/.notmuch/xapian: already locked") >=20 >=20 > Kind regards >=20 > Bart