unofficial mirror of notmuch@notmuchmail.org
 help / color / Atom feed
From: David Bremner <david@tethera.net>
To: Floris Bruynooghe <flub@devork.be>, notmuch@notmuchmail.org
Subject: Re: Usage after database close
Date: Sun, 28 Jun 2020 19:11:31 -0300
Message-ID: <87a70mlu24.fsf@tethera.net> (raw)
In-Reply-To: <875zbazzlu.fsf@powell.devork.be>

Floris Bruynooghe <flub@devork.be> writes:

>
> Ok, I forgot the "expected behaviour" part of the bug report ;) I think
> that this doesn't work is fine and I'm not surprised by and your
> description of fetching it first is very reasonable.  However I was
> expecting NOTMUCH_STATUS_XAPIAN_EXEPTION instead of bluntly getting
> terminated.  This is what the notmuch_database_close() docs say after
> all.

Sure, uncaught exceptions are never nice. 

>
> I had a little look and this seems to be caused by the
> message->doc.termlist_begin() call in
> _notmuch_message_ensure_metadata(),

I guess almost every Xapian API call will fail with the database closed.

> I didn't have xapian debug symbols and am not familiar with xapian to
> quickly have an idea of whether this case can be improved or not.
> (-dbg debian packages for notmuch and xapian would be very handy ;))
>

You need to add a seperate repo for the new style debug symbols in
Debian:
$ (git)-[master]-% apt policy libxapian30-dbgsym
libxapian30-dbgsym:
  Installed: 1.4.15-1
  Candidate: 1.4.15-1
  Version table:
 *** 1.4.15-1 500
        500 http://debug.mirrors.debian.org/debian-debug testing-debug/main amd64 Packages
        500 http://debug.mirrors.debian.org/debian-debug unstable-debug/main amd64 Packages
        100 /var/lib/dpkg/status

> But part of my question is, *should* this be improved?  Am I
> interpreting notmuch's intended API correctly?

Well, I agree you should get NOTMUCH_STATUS_XAPIAN_EXCEPTION back, or we
should change the docs to say "just don't do that".

d


  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 13:57 Floris Bruynooghe
2020-06-28 16:19 ` David Bremner
2020-06-28 20:47   ` Floris Bruynooghe
2020-06-28 22:11     ` David Bremner [this message]
2020-06-28 22:24       ` David Bremner
2020-06-29 14:39         ` David Bremner
2020-06-29 21:18       ` Floris Bruynooghe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a70mlu24.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=flub@devork.be \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of notmuch@notmuchmail.org

Archives are clonable:
	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git