Bug 677133

Summary: [abrt] claws-mail-3.7.8-3.fc14: Crash in mimeview_check_sig_cancel_thread at mimeview.c:1052 (SIGSEGV)
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: claws-mailAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: andreas.bierfert, bugs.michael, martin.nyhus, tomspur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Unspecified   
URL: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2361
Whiteboard: abrt_hash:58d115113a90443503282f60e34234b14c47eb06
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-04 21:25:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace none

Description Michael Schwendt 2011-02-13 15:46:55 UTC
abrt version: 1.1.17
architecture: i686
Attached file: backtrace, 19433 bytes
cmdline: claws-mail
component: claws-mail
Attached file: coredump, 65204224 bytes
crash_function: mimeview_check_sig_cancel_thread
executable: /usr/bin/claws-mail
kernel: 2.6.35.11-83.fc14.i686.PAE
package: claws-mail-3.7.8-3.fc14
rating: 4
reason: Process /usr/bin/claws-mail was killed by signal 11 (SIGSEGV)
release: Fedora release 14 (Laughlin)
time: 1297611580
uid: 500

comment
-----
From the earlier backtrace:

> /usr/lib64/claws-mail/plugins/pgpcore.so
> /usr/lib64/claws-mail/plugins/pgpmime.so
> /usr/lib64/claws-mail/plugins/bogofilter.so

The mimeview.c code:

  /* creates a thread to check the signature, and a second one
   * to kill the first one after a timeout */

The mimeview_check_sig_cancel_thread() that crashes is the second thread (aka the "killer thread") that tries to cancel the first thread:

	/* too late, go away checker thread */
	debug_print("killing checker thread\n");
->	pthread_cancel(mimeview->check_data->th);

How to reproduce
-----
First tried to reproduce what is mentioned in comment 2, but then modified the test-case because I couldn't reproduce. It is not necessary to import any key manually:

1. delete the test GPG key from your keyring
2. in summary view, double-click a GPG signed message to open it in a new window (Ctrl+Alt+N or menu View > Open in new window)
3. click the "lock" icon at the message window's left bottom in quick succession (i.e. two or more times)
4. shortly after, close the window

Sometimes Claws Mail 3.7.8 crashes instantly. Other times it stays open but crashes as soon as one changes into a different folder.

Comment 1 Michael Schwendt 2011-02-13 15:46:58 UTC
Created attachment 478483 [details]
File: backtrace

Comment 2 Michael Schwendt 2011-02-13 15:47:43 UTC
*** Bug 604295 has been marked as a duplicate of this bug. ***

Comment 3 Michael Schwendt 2011-04-08 20:38:23 UTC
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2361#c5

2011-02-13 [colin]    3.7.8cvs55

    * src/mimeview.c
    * src/mimeview.h
        Fix bug #2361, "Claws crashes after PGP Check in separate
        msg view". Don't let the cancel thread lie around after
        the verification ended.