Bug 3011

Summary: crash when using %f Action on two or more uncached (IMAP) messages.
Product: Claws Mail (GTK 2) Reporter: solowolf
Component: UI/ActionsAssignee: users
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.9.2   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
gdb backtrace after signal received none

Description solowolf 2013-10-07 06:13:05 UTC

    
Comment 1 solowolf 2013-10-07 06:15:15 UTC
Created attachment 1300 [details]
gdb backtrace after signal received
Comment 2 solowolf 2013-10-07 06:19:26 UTC
I defined an action to feed messages to an external spam/ham classifier.  The action looks like this:

safecat /home/itz/spam-corpora/ham/tmp /home/itz/spam-corpora/ham/new < %f

safecat is the handy shell level Maildir delivery program.

Anyway, this works fine when I select n messages and then I run the action, as long as n < 4.  When n > 4, it always crashes claws with SIGABRT.  When n == 4, it's even odds it will work or not.
Comment 3 solowolf 2013-10-07 06:52:46 UTC
As a workaround, I wrote a trivial shell script that takes multiple
filenames and exectues safecat on each of them.  When this script is set
as the action (with %F rather than %f), everything works withhout any
apparent limit on the number of selected messages.

This suggests the problem is not the size of input or output, but the
handling of the extra processes (waiting and reaping).

Also of some interest is that mine is a quad core machine (see how
number 4 figures in my original comment).
Comment 4 Paul 2013-10-07 09:00:33 UTC
This is actually caused by performing this Action on uncached IMAP messages. 4 is not an important number, it can be triggered by any amount greater than 1.

So, to reiterate, this is caused by using %f on two or more uncached messages.
Comment 5 users 2013-11-02 09:17:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=88f2dca82039301d0c3f6ac7f01cdd6e057ab873
Merge: 53be0f5 6c24a52
Author: Colin Leroy <colin@colino.net>
Date:   Sat Nov 2 09:17:02 2013 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=6c24a52c96905f126c45a30805eb2a277cdc91b6
Author: Colin Leroy <colin@colino.net>
Date:   Sat Nov 2 09:14:56 2013 +0100

    Fix bug #3011, "crash when using %f Action on two or more uncached
    (IMAP) messages". Thanks Paul for the idea!