On Sat, Apr 08, 2017 at 04:26:00PM +0200, Malte Deiseroth wrote:
> MaxSize wasnt set in the beginning. I didnt know about it in the beginning
> and then set it due to Gmail complaining about it. I never increased it
> actively though.
>
hmm. then the fix may not work, but you can still give it a try.
attached is a version which works with both the 1.1 and 1.2 branches.
> So I need to Compiler mbsync Form wip/next, clear the journal and try
> again.
>
as i said in private, never clear the journal alone. the last resort is
discarding the entire sync state. but the preferable option is to let it
finish properly (which can only work if you stay on the 1.1 branch (or
try 1.2, which is compatible in this regard, but i don't think this will
help with the problem at hand), so it commits the new state (which then
also throws away the now useless journal).
if it still crashes with the assert, apply the second patch as well, and
mail me the output. note that once the patch is applied, this particular
crash will definitely go away, so please capture the output on the first
try.
once it doesn't crash, execute it in a loop until it exits successfully.
(of course, there should be some observable progress between the runs.
if there isn't, something else is wrong and we need to investigate that
as well.)
>From a7328e22cea9a94cc12311332773fd427417c235 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <o...@users.sf.net>
Date: Thu, 30 Mar 2017 19:48:08 +0200
Subject: [PATCH 1/2] fix sync resumption with re-newed messages
the UID of the entries needs to be bumped from -1 to -2, as otherwise
the resumed run would see a TUID in a sync entry which may not have one.
---
src/sync.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/sync.c b/src/sync.c
index 443da1b..edd5300 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1313,6 +1313,11 @@ box_loaded( int sts, void *aux )
Fprintf( svars->jfp, "* %d %d %u\n", srec->uid[M], srec->uid[S], srec->flags );
debug( " -> updated flags to %u\n", tmsg->flags );
}
+ if (srec->uid[t] == -1) {
+ debug( " -> not too big any more\n" );
+ Fprintf( svars->jfp, "%c %d %d -2\n", "<>"[t], srec->uid[M], srec->uid[S] );
+ srec->uid[t] = -2;
+ }
for (t1 = 0; t1 < TUIDL; t1++) {
t2 = arc4_getbyte() & 0x3f;
srec->tuid[t1] = t2 < 26 ? t2 + 'A' : t2 < 52 ? t2 + 'a' - 26 : t2 < 62 ? t2 + '0' - 52 : t2 == 62 ? '+' : '/';
--
2.12.2.90.g1abc40c
>From ca826269479e3fad7861e62436b066f5469fc4b3 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <o...@users.sf.net>
Date: Sun, 9 Apr 2017 10:40:06 +0200
Subject: [PATCH 2/2] make sync records with stray TUID non-fatal
while the situation indicates an internal error, it is harmless in
itself. also, printing some more information may help identify the
problem.
---
src/sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sync.c b/src/sync.c
index edd5300..c6cb255 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -1002,7 +1002,7 @@ box_selected( int sts, void *aux )
else if (srec->uid[S] == -2)
opts[S] |= OPEN_NEW|OPEN_FIND, svars->state[S] |= ST_FIND_OLD;
else
- assert( !"sync record with stray TUID" );
+ warn( "Warning: sync record (%d,%d) has stray TUID. Ignoring.\n", srec->uid[M], srec->uid[S] );
}
}
svars->drv[M]->prepare_opts( ctx[M], opts[M] );
--
2.12.2.90.g1abc40c
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel