From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH] lib/message-file: close stream in destructor
Date: Fri, 10 May 2019 12:33:04 -0300 [thread overview]
Message-ID: <87sgtmgw9b.fsf@tethera.net> (raw)
In-Reply-To: <20190510002324.31140-1-david@tethera.net>
David Bremner <david@tethera.net> writes:
> Without this,
>
> $ make time-test OPTIONS=--small
>
> leads to fatal errors from too many open files.
>
> Thanks to st-gourichon-fid for bringing this problem to my attention in IRC.
> ---
> lib/message-file.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> The regression test could be improved, but I wanted to get a fix out
> and hopefully into master, as this is a problem that seems
> particularly likely to hit new users during their initial notmuch-new.
>
> diff --git a/lib/message-file.c b/lib/message-file.c
> index 50855067..24c5fda4 100644
> --- a/lib/message-file.c
> +++ b/lib/message-file.c
> @@ -46,6 +46,9 @@ _notmuch_message_file_destructor (notmuch_message_file_t *message)
> if (message->message)
> g_object_unref (message->message);
>
> + if (message->stream)
> + g_object_unref (message->stream);
> +
> return 0;
> }
>
> --
> 2.20.1
I received several reports that this fixes the problem, so I've pushed
it to master.
prev parent reply other threads:[~2019-05-10 15:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 0:23 [PATCH] lib/message-file: close stream in destructor David Bremner
2019-05-10 1:05 ` Will Dietz
2019-05-10 1:42 ` David Bremner
2019-05-10 15:33 ` David Bremner [this message]
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=87sgtmgw9b.fsf@tethera.net \
--to=david@tethera.net \
--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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).