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.
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: UI/Actions (show other bugs)
Version: 3.9.2
Hardware: PC Linux
: P3 normal
Assignee: users
Depends on:
Reported: 2013-10-07 06:13 CEST by solowolf
Modified: 2013-11-03 10:15 CET (History)
0 users

See Also:

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

Note You need to log in before you can comment on or make changes to this bug.
Description solowolf 2013-10-07 06:13:05 CEST

Comment 1 solowolf 2013-10-07 06:15:15 CEST
Created attachment 1300 [details]
gdb backtrace after signal received
Comment 2 solowolf 2013-10-07 06:19:26 CEST
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 CEST
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 CEST
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 CET
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:

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

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!