Today's #TechIsShitDispatch is an update about two different problems, which I've mentioned here previously, that I've been trying to solve: #Thunderbird recently started pausing sometimes for several seconds while delivering outbound email messages; and #SynologyDrive keeps getting confused and failing to sync the files it's supposed to be syncing.
(Also, in the process of further troubleshooting the Thunderbird issue, I discovered three additional Thunderbird bugs.)
#Synology
🧵1/12
About Thunderbird, here's a review of how we got to this point.
In the past few weeks Thunderbird's beta version started regularly delaying for several seconds in the middle of delivering outbound email messages.
My first theory was that OCSP certificate validation was suddenly taking too long for some reason, but disabling OCSP didn't eliminate the delays.
My next theory was that my VPN was causing networking delays, but disabling the VPN didn't solve the problem.
Now on to the new stuff…
🧵2/12
I had previously used strace on the sendmail daemon on my mail server to prove that during the delay it was waiting for data from Thunderbird, but that didn't rule out the possibility that Thunderbird had sent the data but it was being held up in transit on the network. I was able to rule that out by running tcpdump on my computer and confirming that Thunderbird was pausing before sending the data to the server. Definitely a Thunderbird issue!
🧵3/12
Next: can I use mozregression to figure out exactly when the problem was introduced? Well, it turns out that although doesn't happen every time, it happens often enough that I over the course of a day I was indeed able to identify the exact Thunderbird build where the issue first appeared. I added this information to the bug ticket <https://bugzilla.mozilla.org/show_bug.cgi?id=1986367#c5> in the hope that someone smarter than I would be able to figure out next steps.
🧵4/12
1986367 - Intermittent delay in smtp protocol exchange while sending messages

UNCONFIRMED (nobody) in MailNews Core - Networking: SMTP. Last updated 2025-09-02.

In the process of doing the mozregression thing, I discovered not one, but two additional bugs in Thunderbird, which I reported: "changing selected identity but not really in compose window causes modified draft not to be saved" <https://bugzilla.mozilla.org/show_bug.cgi?id=1986558> and "signature specified as path to HTML file does not work when profile directory is copied to non-standard location" <https://bugzilla.mozilla.org/show_bug.cgi?id=1986555>.
🧵5/12
1986558 - changing selected identity but not really in compose window causes modified draft not to be saved

UNCONFIRMED (nobody) in Thunderbird - Message Compose Window. Last updated 2025-09-02.

I was originally planning on just leaving things there and living with the annoying delays until someone from the Thunderbird dev team was able to pick up the investigation where I left off, but while I was writing this thread I ended up doing a bit more digging and discovered that in addition to using OCSP for certificate validation, Firefox also uses something called CRLite, so I decided to see if disabling CRLite would make the problem go away. Alas, no.
🧵6/12
I have another theory… maybe there's something wrong specifically with the STARTTLS code used when connecting to port 587, in which case switching to port 465 and using TLS directly instead of STARTTLS might avoid the problem. I think probably not, but it's worth a try.
While configuring Thunderbird to test this theory, I discovered ANOTHER bug, "message sending hang when you switch outgoing server from port 465 to 587 or vice versa" <https://bugzilla.mozilla.org/show_bug.cgi?id=1986580>.
🧵7/12
1986580 - message sending hang when you switch outgoing server from port 465 to 587 or vice versa

UNCONFIRMED (nobody) in MailNews Core - Networking: SMTP. Last updated 2025-09-02.

Now, on to Synology Drive… my client syncing got messed up again, and this afforded me the opportunity to attempt yet again to debug what was happening and try to come up with a workaround. While doing that I discovered that my workaround for a different Synology Drive issue <https://blog.kamens.us/2021/03/17/synology-drive-client-for-linux-has-a-data-loss-bug-synology-refuses-to-fix-heres-a-workaround/> wasn't working properly.
🧵8/12
Synology Drive Client for Linux has a data-loss bug Synology refuses to fix; here’s a workaround

When a program creates a hard link inside your Synology Drive folder on Linux, the Synology Drive Client doesn’t notice it, and therefore that file never gets synchronized to the server. This…

Something better to do
It's possible that my synology-inotify script not working properly is the cause of the recent sync issues I've been seeing, i.e., it's possible the sync issues are due to the same Synology bug I already knew about rather than a different one. So I guess I need to get to the bottom of why my script isn't doing what it's supposed to?
🧵9/12
Unfortunately, there are no log messages indicating errors, and I couldn't see any problems with the code (that doesn't mean there aren't any!).
So I ended up adding a bunch of new code: more debug logging; the ability to switch the debug logging on and off by sending the script a signal; the ability to tell the script to reset all of its file watchers by sending it a different signal; and the ability to tell the script to run a self-test on itself by sending yet another signal.
🧵10/12
So now I need to wait until the problem happens again, and then with any luck I'll be able to narrow down the reason and figure out how to fix it.
For what it's worth, I think it's possible the problem is a bug in the Python inotify package I'm using. I changed how I'm using it while implementing the other changes described above, and those changes might end up mitigating the bug, so by adding code to help troubleshoot the issue I may have inadvertently fixed it. Let's hope so, anyway!
🧵11/12
I also set up a mechanism for monitoring the consistency of the specific files that keep not getting synced properly, so that the next time they fail to sync properly I'll get email about it within a minute. That way I'll be able to jump in and troubleshoot right away rather than waiting until there's a file conflict and I have to deal with merging changes from two different files into one and it's so long after the actual sync problem occurred that it's no longer possible to debug.
🧵12/12