Re: Weird tagging issue

2020-03-20 Thread Daniel Kahn Gillmor
Hi Brian--

On Fri 2020-03-20 11:06:55 +1100, Brian May wrote:
> Brian May  writes:
>
>> I am having a problem with certain messages, in that I remove the tag
>> and it still shows up in search results.
>
> I just recreated the entire database, and I still get the same problem.

This sounds really confusing, and i'm not sure how to help you debug. :/
when you say "recreated the entire database", do you mean you dropped
all tags and everything, and reindexed the entire datastore?

Does the thread that you were working with contain any sensitive or
private messages?  If not, can you isolate the specific files from the
maildir that compose the thread (e.g. with a manual grep) and try to
recreate the failure with a smaller maildir and dedicated notmuch
database?  I know this is tedious, but if you can do it and share the
maildir, then it would help other folks reproduce the problem and dig
into it further.

if i was debugging this locally and i had a dedicated maildir that
demonstrated the problem, i'd probably try to inspect the xapian
database (e.g. with xapian-delve).  There are several folks on the
#notmuch channel on freenode that can probably give pointers.

Sorry to not be more helpful,

  --dkg



signature.asc
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] mime-node: Clean up unwrapped MIME parts correctly.

2020-03-20 Thread Tomi Ollila
On Thu, Mar 19 2020, Daniel Kahn Gillmor wrote:

> Avoid a memory leak in the notmuch command line.
>
> gmime_multipart_encrypted_decrypt returns a GMimeObject marked by
> GMime as "transfer full", so we are supposed to clean up after it.
>
> When parsing a message, notmuch would leak one GMimeObject part per
> multipart/encrypted MIME layer.  We clean it up by analogy with
> cleaning up the signature list associated with a MIME node.
>
> Signed-off-by: Daniel Kahn Gillmor 

Looks good to me.

Tomi

> ---
>  mime-node.c | 22 ++
>  1 file changed, 22 insertions(+)
>
> diff --git a/mime-node.c b/mime-node.c
> index 2a823dfd..ff6805bf 100644
> --- a/mime-node.c
> +++ b/mime-node.c
> @@ -192,6 +192,26 @@ set_signature_list_destructor (mime_node_t *node)
>  }
>  }
>  
> +/* Unwrapped MIME part destructor */
> +static int
> +_unwrapped_child_free (GMimeObject **proxy)
> +{
> +g_object_unref (*proxy);
> +return 0;
> +}
> +
> +/* Set up unwrapped MIME part destructor */
> +static void
> +set_unwrapped_child_destructor (mime_node_t *node)
> +{
> +GMimeObject **proxy = talloc (node, GMimeObject *);
> +
> +if (proxy) {
> + *proxy = node->unwrapped_child;
> + talloc_set_destructor (proxy, _unwrapped_child_free);
> +}
> +}
> +
>  /* Verify a signed mime node */
>  static void
>  node_verify (mime_node_t *node, GMimeObject *part)
> @@ -238,6 +258,8 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject 
> *part)
>
> node->ctx->crypto->decrypt,
>message,
>encrypteddata, 
> _result, );
> + if (node->unwrapped_child)
> + set_unwrapped_child_destructor (node);
>  }
>  if (! node->unwrapped_child) {
>   fprintf (stderr, "Failed to decrypt part: %s\n",
> -- 
> 2.25.1
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch