Bug 544619 - [abrt] gnutls's use of libgcrypt not initialised as thread-safe
Summary: [abrt] gnutls's use of libgcrypt not initialised as thread-safe
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 12
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b8e7fc8ff7be67ca514a67851cf...
Depends On:
Blocks: 550302
TreeView+ depends on / blocked
 
Reported: 2009-12-05 18:32 UTC by Ameya Gore
Modified: 2010-03-01 18:58 UTC (History)
6 users (show)

Fixed In Version: 1.4.2-20.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 550302 (view as bug list)
Environment:
Last Closed: 2009-12-27 20:32:57 UTC


Attachments (Terms of Use)
File: backtrace (74.81 KB, text/plain)
2009-12-05 18:32 UTC, Ameya Gore
no flags Details
something like so perhaps (1.59 KB, patch)
2009-12-21 12:08 UTC, Caolan McNamara
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
CUPS Bugs and Features 3461 None None None Never
OpenOffice.org 83195 None None None Never
OpenOffice.org 90013 None None None Never
OpenOffice.org 91000 None None None Never
OpenOffice.org 93044 None None None Never

Internal Links: 637738

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.]


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