Summary: | Kmail crashes when "Server supports sieve" enabled | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Mike Goodwin <mike> |
Component: | sieve | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | crash | CC: | bugs, carmelo.piccione, montel, shtetldik, tom, tommy.lehmann, wouter |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.1.3 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | sieve scripts and config that crashes kmail |
Description
Mike Goodwin
2016-05-30 23:07:54 UTC
*** Bug 363722 has been marked as a duplicate of this bug. *** Noticing the sieve remarks in the last thread, I turned off sieve support for my kolab server account and have not been able to reproduce the bug again. I restarted kontact and kmail ten times each to confirm. After enabling sieve again, both crash 1-2 seconds after the main window renders. Changing something from my initial report, it does not *ALWAYS* crash, but does so 90% of the time. Every once in a while it starts normally and functions properly... Do you have script in sieve server or not ? Regards Yes I do. Two separate scripts. One named "roundcube" (because that is the default created by kolab/roundcube on setup" and a separate one I named "Default" that I currently use. Default mostly contains stuff like: # rule:[kde-lists-fpo] if header :contains "list-id" "kde.lists.fedoraproject.org" { fileinto "Mailing Lists/Fedora/kde"; stop; } While roundcube empty (but contains a header comment) I see where this is going so I'll try and do some more sleuthing with regard to a specific rule, or maybe the empty file and report back if I find anything. Some findings: 1. Neither script causes the problem when enabled separately/individually. 2. When both are enabled is when the crash happens, only then. 3. Related problem: a. When using the checkbox action to disable/enable scripts, selecting or unselecting either one results in the message "Sieve operation failed The server responded: script errors:" b. After clicking ok, the circular refreshing icon is perpetually present. You must restart the client for that to go away c. Checking the result of the action with roundcube separately, you can see that it actually carried the enable/disable action before erroring out (i.e. the script that was unchecked/checked is enabled/disabled) I do not believe there to be errors in the scripts as they were generated with roundcube. If you know of a way to syntax check or lint sieve scripts, that would be useful. I see that the built-in kmail sieve script editor has a syntax checker (now that I can get to it), and it is reporting "No errors found" for both scripts. How are you able to activate both ? in kmail or roundcube ? I can enable both in roundcube I activated two sieve script in roundcube+kolab too but I can't have crash. What is your kdepim version ? kmail version ? see in about dialogbox please. 5.1.x ? 5.2.x ? Version 5.1.3 Using: KDE Frameworks 5.22.0 Qt 5.6.0 (built against 5.6.0) The xcb windowing system $ rpm -qa | egrep "kmail|kdepim" kdepim-libs-15.12.3-1.fc24.x86_64 kdepimlibs-kxmlrpcclient-4.14.10-13.fc24.x86_64 kmail-15.12.3-1.fc24.x86_64 kdepimlibs-akonadi-4.14.10-13.fc24.x86_64 kdepim-runtime-15.12.3-1.fc24.x86_64 kdepimlibs-4.14.10-13.fc24.x86_64 kmail-libs-15.12.3-1.fc24.x86_64 kdepim-runtime-libs-15.12.3-1.fc24.x86_64 kdepim-common-15.12.3-1.fc24.x86_64 kf5-kmailtransport-15.12.3-1.fc24.x86_64 kdepimlibs-gpgme-4.14.10-13.fc24.x86_64 Created attachment 99280 [details]
sieve scripts and config that crashes kmail
Hmm, I did some more testing. This is turning out to seem like a very specific edge case.
I made a new blank script called "test". So now I have
1. Default (has real scripts) - enabled
2. roundcube (blank) - disabled
3. test (blank) - enabled
This combination doesn't crash. Nor does 1-disabled, 2-enabled, 3-enabled; or 1-enabled, 2-disabled, 3-disabled.
Only 1-enabled, 2-enabled, 3-(n/a or disabled) crashes.
The literal contents of the sieve scripts are attached. I confirmed that it crashed kmail before I tarred them directly from my kolab server. Hopefully that helps.
I only noticed this because I upgraded from F23 to F24 today. I didn't see this crash in 4.x version of kmail
... And it gets even stranger. There are lots of possibilities here so as I try them all I try to report back here. ONLY "Default' also crashes, so: 1. "Default" - crashes 2. "Default" + "roundcube" (Literal contents are '/* empty script */') with roundcube enabled crashes. 3. "Default" + "~roundcube~" ( same as above but roundcube is now disabled ) does not crash. In other words, it seems like the problem is more or less "Default script crashes unless a second AND disabled script is present" *** Bug 363987 has been marked as a duplicate of this bug. *** I have a similar crash (Arch Linux, see bug 363987 - already marked as dupe). My setup has 4 different Kolab mailboxes and one GMail without Sieve support. Account 1: a "Filters" enabled script, and a disabled "roundcube" script Account 2: one disabled "Filters" script. NOTE: The syntax checker of KMail succeeds, but trying to enable this one from KMail results in an error: "Sieve operation failed. The server responded: script errors:" (no further details) Account 3: an enabled "Filters" script Account 4: an enabled "roundcube" script All scripts were edited through Roundcube. this bug hit me after i installed a new imap account (without custom sieve filters) i had another imap account installed that uses a sieve script Adding the section [siever] SieveSupport=false to the newly created akonadi_imap_resource_5rc file in ~/.config solved the problem. Apparently the creation of a new imap resource missed adding this necessary section. I still experience this crash with the current (2017-03-21) source build. Digging through the code and the stack trace, it seems the problem is in libksieve's VacationCheckJob::getNextScript() method. This code does a range of mScriptPos check on a list mAvailableScripts (through isLastScript()), but then doesn't return. This causes "mAvailableScripts[mScriptPos]" (line 185 in vacationcheckjob.cpp) to be out of range and triggers the crash. It seems to me that adding a return statement if the last script is reached will solve the crash, but I haven't confirmed that yet. Git commit 45beafbe61cee226aa9083abdf24f1f2ed7c0269 by Montel Laurent. Committed on 22/03/2017 at 08:10. Pushed by mlaurent into branch 'Applications/17.04'. We need a return here. Thanks to Wouter Haffmans to investigate it. M +1 -0 src/ksieveui/vacation/vacationcheckjob.cpp https://commits.kde.org/libksieve/45beafbe61cee226aa9083abdf24f1f2ed7c0269 I haven't seen this crash anymore since applying the fix. As far as I'm concerned I think this can be closed. *** Bug 379573 has been marked as a duplicate of this bug. *** I was bitten by this because Debian testing is still using Kmail 16.04.3. I can confirm, that setting SieveSupport=false manually in config file for the corresponding resource helped to work around it. *** Bug 384227 has been marked as a duplicate of this bug. *** *** Bug 372379 has been marked as a duplicate of this bug. *** Thank you for the crash report. As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |