Stuck on "Waiting for upload to finish"

Thank you for showing your custom WhenAll workaround. Do you recall what status it stuck at before?

Most of the time of the backup appears to be spent in “Phase”: “Backup_ProcessingFiles”, moving into “Phase”: “Backup_WaitForUpload” towards the end, and that’s the “Waiting for upload to finish” status.

Above was from a Wireshark capture on Duplicati’s connection (typically on the loopback at port 8200), however the long phase is easy to see at About → System Info in the lastPgEvent saying for example “Phase”:“Backup_ProcessingFiles”. You can use browser search to find it, or look for its extremely long line where one can sort of use the horizontal scrollbar to see that this phase is the majority of a backup.

Ordinarily "Phase”: “Backup_WaitForUpload” goes by pretty fast (which is why I watched the network), however in a “stuck” case, I assume this screen would show it while status bar shows longer message.

@calebjay and @Canada1 can check their screen if a backup gets stuck, to see if this lines up so far. Alternatively @Xavron (who has had success reproducing this) can try, but if it needs encouragement could probably change the rescue-timeout into a sabotage-delay to see how stuck WhenAll messages.

Unfortunately it’s probably not a guaranteed thing that all “stuck” end results come due to same causes. Getting good test cases for an expert developer to put a debugger on would help, but we didn’t get that. What we did get was quite a number of profiling logs, and from this it seems we can get some thoughts.

Looking for the WhenAll in question, I think we’re at the below

which is run from

and at the end we join up with the code I cited , showing how it reaches the phase of status message.
Question to @Xavron is – if it got stuck at WhenAll in RunMainOperation at the top of above citation, wouldn’t it be at a different message than “Waiting for upload to finish”, or is there some explanation?

is the one and only place where this phase is set, and that’s just a little before the RunMainOperation, presumably (and verified experimentally two ways) staying until WhenAll finishes, and phase changes.

That’s not likely to happen without a C# developer plus some complicated build mechanics and delays. There is certainly precedent from lots of years ago to add debugs to production code, but shipping it is going to need at least a Canary build to be rolled out for a typical user to test. Let’s try existing log first.