Errors after upgrade to 0.14

Austin Clements amdragon at MIT.EDU
Wed Aug 22 19:47:25 PDT 2012


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 = 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?
> 
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   notmuch-search-show-result("tags")
>   byte-code("\304\305\"\203\306	!\307=\203\310\202Q\303\202Q\304\311\"\203D\312	!\304\313\"\2030\310\202@\304\314\"\203<\315\202@\316!\210)\202Q\304\317\"\203Q\320	!\210\310\304\207" [notmuch-search-process-state notmuch-search-json-parser done result memql (begin) notmuch-json-begin-compound retry t (result) notmuch-json-read (retry) (end) end notmuch-search-show-result (end) notmuch-json-eof] 3)
>   notmuch-search-process-filter(#<process notmuch-search> ", \"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:0000000000020a59\n{\"thread\": \"000000000001fd19\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"matched\": 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\": \"0000000000020a59\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"matched\": 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\": \"0000000000020a57\", \"timestamp\": 0, \"date_relative\": \"1970-01-01\", \"matched\": 0, \"total\": 0, \"authors\": ")
>   recursive-edit()
>   debug(error (error "A Xapian exception occurred opening database: Unable to get write lock on /Users/bart/mail/.notmuch/xapian: already locked"))
>   ad-Orig-signal(error ("A Xapian exception occurred opening database: Unable 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: Unable to get write lock on /Users/bart/mail/.notmuch/xapian: already locked")
>   error("A Xapian exception occurred opening database: Unable to get write lock on /Users/bart/mail/.notmuch/xapian: already locked")
>   notmuch-call-notmuch-process("tag" "-inbox" "--" "thread:0000000000022288")
>   apply(notmuch-call-notmuch-process "tag" ("-inbox" "--" "thread:0000000000022288"))
>   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: Unable to get write lock on /Users/bart/mail/.notmuch/xapian: already locked"))
>   ad-Orig-signal(error ("A Xapian exception occurred opening database: Unable 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: Unable to get write lock on /Users/bart/mail/.notmuch/xapian: already locked")
> 
> 
> Kind regards
> 
> Bart


More information about the notmuch mailing list