Bug 544619

Summary: [abrt] gnutls's use of libgcrypt not initialised as thread-safe
Product: [Fedora] Fedora Reporter: Ameya Gore <ameya.gore>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: caolanm, dtardon, jorton, jpopelka, selinux, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:b8e7fc8ff7be67ca514a67851cf9feb135cb70c0
Fixed In Version: 1.4.2-20.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 550302 (view as bug list) Environment:
Last Closed: 2009-12-27 20:32:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 550302    
Attachments:
Description Flags
File: backtrace
none
something like so perhaps none

Description Ameya Gore 2009-12-05 18:32:25 UTC
abrt 1.0.0 detected a crash.

Comment: I shutdown laptop while openoffice was running.
Attached file: backtrace
cmdline: /usr/lib/openoffice.org3/program/swriter.bin -writer
component: openoffice.org
executable: /usr/lib/openoffice.org3/program/swriter.bin
kernel: 2.6.31.6-145.fc12.i686.PAE
package: openoffice.org-writer-1:3.1.1-19.14.fc12
rating: 4
reason: Process was terminated by signal 6

Comment 1 Ameya Gore 2009-12-05 18:32:27 UTC
Created attachment 376344 [details]
File: backtrace

Comment 2 David Tardon 2009-12-06 14:53:53 UTC
So, the crash is deep inside gcc's exception handling code, but the path that lead to it looks rather suspicious. I bet the application was shutting down when a timer updating toolbar controls was triggered and in the state the application was it couldn't finish normally. The timer itself probably came from a volatile slot; that's been fixed by http://www.openoffice.org/issues/show_bug.cgi?id=83195 .

There were several documents opened over WebDAV: it may or may not make a difference.

Comment 3 Caolan McNamara 2009-12-07 09:52:54 UTC
Thread 1 is the one which is raising the signal that creates the crash, that thread comes all the way from SwAsyncRetrieveInputStreamThread and is inside some webdav foo. I see that Thread 6 is *also* from a SwAsyncRetrieveInputStreamThread and is inside some webdav foo. I rather suspect that the webdav foo isn't thread safe. e.g. two documents opened over webdav with graphics (?) or whatever it is that causes writer to use a SwAsyncRetrieveInputStreamThread thing

Comment 4 Caolan McNamara 2009-12-21 12:08:16 UTC
These are in gnutls, so...

http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html

"Although the GnuTLS library is thread safe by design, some parts of Libgcrypt, such as the random generator, are not. Applications have to register callback functions to ensure proper locking in the sensitive parts of libgcrypt."

neon itself does this when it initializes gnutls, but gnutls + gcrypt are already initialized by the time neon gets used in OOo because cups also uses gnutls and we initialize that earlier in our life-cycle. 

cups doesn't configure gcrypt to be threadsafe when initializing gnutls. This might not sufficient to fix all of this but I think its likely necessary.

Comment 5 Caolan McNamara 2009-12-21 12:08:59 UTC
Created attachment 379603 [details]
something like so perhaps

Comment 6 Tim Waugh 2009-12-21 17:16:11 UTC
Thanks for the patch.  Also affects Fedora 11.

Comment 7 Fedora Update System 2009-12-27 20:32:05 UTC
cups-1.4.2-20.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-01-04 21:18:06 UTC
cups-1.4.2-20.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Tim Waugh 2010-03-01 18:38:41 UTC
Um, is this causing bug #553834?

Comment 10 Tom London 2010-03-01 18:58:02 UTC
Appears to:

Downgrading cups to cups-1.4.2-18.fc13.x86_64.rpm and restarting cups "makes firefox printing work for me".  [I didn't try cups-1.4.2-19.fc13 or later.]