Bug 607159

Summary: Continuing libgcrypt threading issue
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: franta, gecko-bugs-nobody, jpopelka, mschmidt, sergey.linux, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:47f1ad37290ac89ce326d61004b7a145c153a2be
Fixed In Version: cups-1.4.4-9.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-30 06:20:00 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:
Attachments:
Description Flags
File: backtrace
none
attempt at reproducer (but doesn't work) none

Description Mads Kiilerich 2010-06-23 12:09:05 UTC
abrt 1.1.1 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: /usr/lib/firefox-3.6/firefox
component: firefox
executable: /usr/lib/firefox-3.6/firefox
global_uuid: 47f1ad37290ac89ce326d61004b7a145c153a2be
kernel: 2.6.33.5-112.fc13.i686.PAE
package: firefox-3.6.3-4.fc13
rating: 3
reason: Process /usr/lib/firefox-3.6/firefox was killed by signal 11 (SIGSEGV)
release: Fedora release 13 (Goddard)

comment
-----
Firefox crashed when I pressed ctrl+p to print. I think it happened twice, and this is the second time it crashed.

There seems to be some embedded python in the stack, and it recurses "inifitely" on:
  File "/usr/share/glib-2.0/gdb/gobject.py", line 45, in is_g_type_instance_helper
    return is_g_type_instance_helper(first_field.type)

Comment 1 Mads Kiilerich 2010-06-23 12:09:09 UTC
Created attachment 426247 [details]
File: backtrace

Comment 2 Mads Kiilerich 2010-06-23 15:34:21 UTC
*** Bug 607240 has been marked as a duplicate of this bug. ***

Comment 3 Mads Kiilerich 2010-06-23 15:40:59 UTC
This is fully reproducible for me right now - see bug 607240 which for some reason got a different abrt hash and thus wasn't filed as duplicate ...

Printing from for example gedit works fine.

Comment 4 David 2010-06-23 23:15:19 UTC
Package: firefox-3.6.3-4.fc13
Architecture: i686
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. Try to print page from firefox
2. Boom
3.

Comment 5 Mads Kiilerich 2010-06-23 23:43:21 UTC
Oh - so I'm not alone on this one. Nice to know. 

On further investigation:
I see crashes with cups*-1.4.4-3.fc13.i686 from updates-testing.

After
yum --disablerepo=updates-testing downgrade 'cups*'
I get cups*-1.4.3-6.fc13.i686 instead, and then it works fine.

Do you other reporters also have update-testing enabled and can you confirm that the problem goes away by downgrading cups*?

I will reassign to cups and vote on https://admin.fedoraproject.org/updates/cups-1.4.4-3.fc13

Comment 6 David 2010-06-24 00:01:10 UTC
Can we get a fixed cups into updates-testing to fix this? Or if there is a new one in koji can it be pushed straight to updates-testing for tomorrows repo cache?

Comment 7 David 2010-06-24 00:07:51 UTC
I also gave negative karma to it in admin updates. Please build a -4 and fix the bug.

Comment 8 Michal Schmidt 2010-06-24 07:25:49 UTC
Opening print preview in Firefox crashes it perfectly reproducibly here. After "yum downgrade cups cups-libs" to 1.4.3 it works again.

Comment 9 Tim Waugh 2010-06-24 09:03:55 UTC
OK.  The history behind this is that gnutls has no way of making its use of libgcrypt thread-safe when used from a library (see bug #553834 and bug #569803).  As a result, CUPS 1.4.4 refuses to link against gnutls in this situation.

Unfortunately, it seems that linking against openssl also fails for some reason.  I think the safest thing to do right now is to switch back to gnutls. :-(

Comment 10 Tim Waugh 2010-06-24 12:06:56 UTC
Novell's bugzilla instance is also tracking this so I've added a reference.

I tried just switching to gnutls and it made no difference(!).  What does seem to work is configuring with '--disable-threads --enable-gnutls', so we'll go with that.

Comment 11 Tim Waugh 2010-06-24 12:29:47 UTC
I've created a separate update.  Please try it out.
https://admin.fedoraproject.org/updates/cups-1.4.4-4.fc13

Comment 12 Michal Schmidt 2010-06-24 12:48:46 UTC
cups-1.4.4-4.fc13 fixes the crash in Firefox print preview for me.

Comment 13 David 2010-07-01 07:30:35 UTC
Agreed 100% fixed in -4

Comment 14 Mads Kiilerich 2010-07-01 08:47:22 UTC
Tim, it seems like you forgot to add this issue on https://admin.fedoraproject.org/updates/cups-1.4.4-5.fc13 (now in request for stable)

Comment 15 Tim Waugh 2010-07-01 11:46:47 UTC
Yes, forgot.  I'll update the status by hand though.

Comment 16 Tim Waugh 2010-09-15 14:42:38 UTC
Re-opening to track the regression caused by --disable-threads.

Comment 17 Tim Waugh 2010-09-15 14:42:52 UTC
*** Bug 612078 has been marked as a duplicate of this bug. ***

Comment 18 Tim Waugh 2010-09-15 15:31:50 UTC
The original gnutls issue: bug #544619.

Comment 19 Tim Waugh 2010-09-15 15:36:02 UTC
And the underlying libgcrypt issue: bug #569803.

Comment 20 Tim Waugh 2010-09-15 15:58:28 UTC
I'm building a cups-1.4.4-8.fc12 package which hopefully addresses this for Fedora 12.  Would love extra testing on it before I merge the change to the other branches...

Comment 21 Jiri Popelka 2010-09-16 14:15:50 UTC
I was not able to reproduce (bug #612078, comment #30) the crash in F12 so I can't verify that cups-1.4.4-8.fc12 fixes it.
So I merged the changes into F13, built cups-1.4.4-10.fc13 and I can verify that it fixes bug #612078 and I can also print from firefox-3.6.7-1.fc13

Comment 22 Tim Waugh 2010-09-16 15:21:50 UTC
Thanks.  When I was testing a F13 merge this morning I did get a Firefox crash while loading the print dialog, but I haven't been able to get it to happen since.

Digging into gcrypt to try to get a patch for the right fix available for review.

Comment 23 Jiri Popelka 2010-09-16 15:31:56 UTC
(In reply to comment #22)
> When I was testing a F13 merge this morning I did get a Firefox crash
> while loading the print dialog,
me too when I built cups locally (fedpkg local), however after building in mock it's ok.

Comment 24 Tim Waugh 2010-09-16 16:28:45 UTC
My crash was from a mock build. :-(

I wish we could get a reliable reproducer to demonstrate the problem, which I still believe is present.  So far my simple attempt (attached) doesn't crash.

Comment 25 Tim Waugh 2010-09-16 16:29:27 UTC
Created attachment 447790 [details]
attempt at reproducer (but doesn't work)

Comment 26 Tim Waugh 2010-09-17 13:57:11 UTC
I've put in a mutex protecting all our calls into gnutls, and taken out the GCRYCTL_SET_THREAD_CBS call altogether.  So far it's looking good in my local testing of a mock build, in that I haven't managed to get Firefox to crash on Ctrl-P yet.

Koji builds building now:

cups-1.4.4-9.fc12
cups-1.4.4-10.fc13

Comment 27 Fedora Update System 2010-09-17 16:38:06 UTC
cups-1.4.4-10.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cups-1.4.4-10.fc14

Comment 28 Fedora Update System 2010-09-17 16:40:14 UTC
cups-1.4.4-10.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/cups-1.4.4-10.fc13

Comment 29 Fedora Update System 2010-09-17 16:41:30 UTC
cups-1.4.4-9.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/cups-1.4.4-9.fc12

Comment 30 Fedora Update System 2010-09-20 18:39:48 UTC
cups-1.4.4-10.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cups'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/cups-1.4.4-10.fc14

Comment 31 Fedora Update System 2010-09-24 20:43:30 UTC
cups-1.4.4-10.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Tim Waugh 2010-09-27 15:05:29 UTC
Re-opening for F-12 and F-14.

Comment 33 Fedora Update System 2010-09-30 06:19:22 UTC
cups-1.4.4-10.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2010-10-08 20:55:06 UTC
cups-1.4.4-9.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.