On Thu, Jan 26, 2023 at 05:07:50PM +0100, Christian Brabandt wrote:
I tried building building latest master with --with-kyotocabinet

Thank you for rebuilding and testing. Since the problem isn't with the header cache backend, this smells like a Mutt bug.

Would you mind opening a ticket so we can debug it without causing too much traffic on mutt-users?

It took me a bit until I found `./prepare` but then I could run configure (and for some reason, it didn't like my installed `libidn2-dev` library, so I build without `--with-idn`, but I suppose for the test it doesn't really matter.)

There is a --with-idn2 configure flag you can use instead.  The packaged
mutt used libidn, so I assumed build-dep would install that library.

But I am afraid, I am seeing the same problem (I haven't waited yet 3 hours until mutt gets disconnected from the IMAP server, but the symptoms look exactly the same.

I'll need some more debug information to try and figure out what's going on. I'm attaching a patch. If you would apply, re-compile and run with debug mode (-d 2), it should hopefully give some useful info about what's happening at the hang point.

You only need to let mutt run for a minute and then kill it. Otherwise the debug file will get really really big. If you would post that to the ticket (taking care to remove the authentication parts), I would appreciate it.

Thank you!

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
From f5b644b42c418b727ecf758d9c706fa429823cd2 Mon Sep 17 00:00:00 2001
From: Kevin McCarthy <ke...@8t8.us>
Date: Thu, 26 Jan 2023 11:00:19 -0800
Subject: [PATCH] wip: debug statements

---
 imap/message.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/imap/message.c b/imap/message.c
index 376b91dc..e27c0bc3 100644
--- a/imap/message.c
+++ b/imap/message.c
@@ -587,12 +587,15 @@ static int read_headers_qresync_eval_cache (IMAP_DATA *idata, char *uid_seqset)
   ctx = idata->ctx;
   msn = 1;
 
+  dprint (2, (debugfile, "seqset: %s\n", uid_seqset));
+
   iter = mutt_seqset_iterator_new (uid_seqset);
   if (!iter)
     return -1;
 
   while ((rc = mutt_seqset_iterator_next (iter, &uid)) == 0)
   {
+    dprint (2, (debugfile, "read seqset uid %u\n", uid));
     /* The seqset may contain more headers than the fetch request, so
      * we need to watch and reallocate the context and msn_index */
     if (msn > idata->msn_index_size)
@@ -601,6 +604,7 @@ static int read_headers_qresync_eval_cache (IMAP_DATA *idata, char *uid_seqset)
     h = imap_hcache_get (idata, uid);
     if (h)
     {
+      dprint (2, (debugfile, "\tfound in header cache\n"));
       idata->max_msn = MAX (idata->max_msn, msn);
       idata->msn_index[msn - 1] = h;
 
@@ -640,7 +644,12 @@ static int read_headers_qresync_eval_cache (IMAP_DATA *idata, char *uid_seqset)
      * stored "blank" in the uid seqset.
      */
     else if (!uid)
+    {
+      dprint (2, (debugfile, "\tblank\n"));
       msn++;
+    }
+    else
+      dprint (2, (debugfile, "\tmissing from header cache\n"));
   }
 
   mutt_seqset_iterator_free (&iter);
-- 
2.39.0

Attachment: signature.asc
Description: PGP signature

Reply via email to