Description
After upgrading to Mailspring 1.25.0, mailsync.bin repeatedly crashes with SIGSEGV during the IMAP IDLE refresh cycle.
The crash is highly reproducible and appears to be a regression from 1.24.1.
Mailspring itself remains usable because the sync processes are restarted automatically, but systemd records multiple core dumps.
Environment
-
Linux x86-64
-
Mailspring installed via Snap
-
Affected version: 1.25.0, Snap revision 626
-
Previous working version: 1.24.1, Snap revision 624
-
Multiple email accounts configured
-
Reproduced on more than one account
Crash
A representative core dump:
Signal: 11 (SEGV)
Command Line:
/snap/mailspring/626/usr/share/mailspring/resources/app.asar.unpacked/mailsync.bin --mode sync --info <account>
Stack trace:
#0 mailcore::IMAPSession::collectVanishedFromLastResponse()
mailsync.bin + 0x444100
#1 mailcore::IMAPSession::takeVanishedMessages(mailcore::String*)
mailsync.bin + 0x4442f0
#2 SyncWorker::idleCycleIteration()
mailsync.bin + 0x269883
#3 runForegroundSyncWorker()
I checked several separate crashes and they all have the same top frames and the same offsets:
collectVanishedFromLastResponse() + 0x444100
takeVanishedMessages() + 0x4442f0
SyncWorker::idleCycleIteration() + 0x269883
Reproduction pattern
The crashes occur almost exactly every 28 minutes.
Example:
20:37:20 SIGSEGV
21:05:24 SIGSEGV
21:33:28 SIGSEGV
22:01:32 SIGSEGV
22:29:36 SIGSEGV
For an individual account, the mailsync log shows:
20:37:22.809 Idling on folder INBOX
...
21:05:23.181 Idle exited with code 1
21:05:24.xxx SIGSEGV
The crash then occurs inside:
idleCycleIteration()
-> takeVanishedMessages()
-> collectVanishedFromLastResponse()
Multiple accounts can crash during the same ~28 minute cycle.
Regression test
I reverted the Snap package from:
Mailspring 1.25.0 rev 626
to:
Mailspring 1.24.1 rev 624
and held the package at 1.24.1.
With 1.24.1 running for multiple IDLE cycles, there were no new coredumps.
For example, several accounts successfully completed repeated IDLE refresh cycles:
12:44 Idle exited with code 0
13:12 Idle exited with code 0
13:40 Idle exited with code 0
More importantly, some IMAP accounts still return:
Idle exited with code 1
on 1.24.1, but the same mailsync process survives and continues with the next IDLE cycle:
12:44 Idle exited with code 1
13:12 Idle exited with code 1
13:40 Idle exited with code 1
There were no SIGSEGVs after the downgrade.
This makes the A/B result:
1.25.0:
IDLE refresh
-> Idle exited
-> collectVanishedFromLastResponse()
-> SIGSEGV
1.24.1:
IDLE refresh
-> Idle exited
-> continues normally
Expected behavior
The foreground sync worker should complete the periodic IMAP IDLE refresh without crashing, as it does in 1.24.1.
Additional observations
-
The UI itself does not crash.
-
Mail can still be opened and used because mailsync processes appear to restart after crashing.
-
Regular background folder synchronization works before the crash.
-
The issue is not isolated to a single account.
-
Downgrading only Mailspring from 1.25.0 to 1.24.1 eliminates the crashes without changing the accounts or server configuration.
I can provide additional coredumpctl output or mailsync logs if useful.