Bug 3011 - crash when using %f Action on two or more uncached (IMAP) messages.
Summary: crash when using %f Action on two or more uncached (IMAP) messages.
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Actions (show other bugs)
Version: 3.9.2
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2013-10-07 06:13 UTC by solowolf
Modified: 2013-11-03 10:15 UTC (History)
0 users

See Also:


Attachments
gdb backtrace after signal received (7.19 KB, text/plain)
2013-10-07 06:15 UTC, solowolf
no flags Details

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!

Note You need to log in before you can comment on or make changes to this bug.