From: James Troup <james.troup@canonical.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] fix file descriptor leak with compressed email
Date: Sun, 22 Sep 2019 19:48:34 +0100 [thread overview]
Message-ID: <87pnjsf9q5.fsf@canonical.com> (raw)
Hi,
I'm trying notmuch for the first time using notmuch 0.29.1-2ubuntu1
backported to Ubuntu 19.04. My email is stored in Gnus nnml format
and is approximately 410K mails with 60% compressed. While trying to
run 'notmuch new' I very quickly ran into issues with 'Too many open
files', even after adjusting the maximum number of open file
descriptor up to 65K.
The patch below solved the problem for me.
diff -ur orig/notmuch-0.29.1/util/gmime-extra.c notmuch-0.29.1/util/gmime-extra.c
--- orig/notmuch-0.29.1/util/gmime-extra.c 2019-06-11 23:16:48.000000000 +0000
+++ notmuch-0.29.1/util/gmime-extra.c 2019-09-22 18:25:28.629546076 +0000
@@ -28,6 +28,8 @@
/* ignore filter id */
(void)g_mime_stream_filter_add ((GMimeStreamFilter *)gzstream, gzfilter);
+ g_object_unref(gzfilter);
+ g_object_unref(file_stream);
return gzstream;
} else {
return file_stream;
--
James
next reply other threads:[~2019-09-22 19:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-22 18:48 James Troup [this message]
2019-09-22 22:43 ` fix file descriptor leak David Bremner
2019-09-22 22:44 ` [PATCH 1/2] test: known broken test file descriptor leak in gzip file open David Bremner
2019-09-22 22:44 ` [PATCH 2/2] util: unreference objects referenced by the returned stream obj David Bremner
2019-10-13 12:31 ` fix file descriptor leak David Bremner
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=87pnjsf9q5.fsf@canonical.com \
--to=james.troup@canonical.com \
--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).