cryptkeeper segfaults at start sometimes

Bug #1315964 reported by Jaufré Aligé
152
This bug affects 39 people
Affects Status Importance Assigned to Milestone
cryptkeeper (Ubuntu)
Fix Released
High
Unassigned
Declined for Vivid by Simon Quigley
Trusty
Fix Released
High
Vlad Orlov

Bug Description

[Impact]

An uninitialized variable makes cryptkeeper randomly crash on start
in Trusty.

The fix for it had been applied in newer releases (see bug 1420812),
starting from Vivid. Would be nice to apply it in Trusty as well.

The debdiff which is attached to this report contains the fix.

[Test Case]

Since it's a random crash, it may take several attempts to reproduce
it. So just run cryptkeeper a few times from the terminal. It should
crash right on start if it hits some random value in uninitialized
variable.

[Regression Potential]

None. It had been confirmed that the patched version of cryptkeeper
doesn't crash on start anymore (reported by Xenial users for example).

[Original Description]

I don't understand : Most of the time at launch : segfault but sometimes if you reboot the system it starts without complaining. Sometimes not.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: cryptkeeper 0.9.5-5.1ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Mon May 5 02:06:09 2014
SourcePackage: cryptkeeper
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jaufré Aligé (jaufre) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cryptkeeper (Ubuntu):
status: New → Confirmed
Vlad Orlov (monsta)
summary: - segfault at opening sometimes reboot = ok
+ cryptkeeper segfaults at start sometimes
tags: added: utopic
Changed in cryptkeeper (Ubuntu):
importance: Undecided → High
Changed in cryptkeeper (Debian):
status: Unknown → New
Revision history for this message
Vlad Orlov (monsta) wrote :

Attaching the backtrace after segfault. This is in Ubuntu MATE 14.10.

Revision history for this message
Vlad Orlov (monsta) wrote :

The lack of debugging symbols for cryptkeeper itself makes it really hard to guess what's going on there...

Revision history for this message
Vlad Orlov (monsta) wrote :

Interesting - I can't reproduce it anymore after I've rebuild the cryptkeeper package locally and installed it.

Revision history for this message
Sezer Yalcin (sy-y) wrote :

It always works for me after 3 attempts. First 3 fails and fourth try, it works.

Revision history for this message
John Cottier (j-cottier) wrote :

Same here, sometimes fails when started via unity. Then after 3 attempts will start from terminal.

Revision history for this message
John Cottier (j-cottier) wrote :

This is what it generates in the syslog:-
cryptkeeper[3026]: segfault at d3 ip 00007f817fb30935 sp 00007fff389025b0 error 4 in libgtk-x11-2.0
Sometimes different after segfault at, but always error 4.

It is totally random, tried having it run at startup and it random whether it start, generates a crash dialog, or just does not appear.
But I have made a kind of work around :-/ Use this script to run it, it keeps trying to run it every second up to 10 times until it does not error.

Revision history for this message
Vlad Orlov (monsta) wrote :

Guys, just try to rebuild the package from the source (add source package repositories first) and install it:

apt-get source cryptkeeper
sudo apt-get build-dep cryptkeeper

cd cryptkeeper-<version>
dpkg-buildpackage -b -us -uc -rfakeroot

sudo dpkg -i ../cryptkeeper_<version>.deb

Then check if segfaults still happen.

Revision history for this message
zebul666 (zebul666) wrote :

this still happens randomly on 15.04 beta 2, I mean cryptkeeper running or crashing.

Vlad Orlov (monsta)
tags: added: vivid
Revision history for this message
Mark Fuller (mark-nurse) wrote :

Thanks Monsta for #9. I tried it and got errors at the dpkg-buildpackage step. I dont know what they mean but hopefully they are useful to someone. Running Trusty.

Changed in cryptkeeper (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Sezer Yalcin (sy-y) wrote :

How does it work after 3 attempts? Is there a built-in failover mechanism?

Revision history for this message
p_kolya (p-kolya) wrote :

The fix is to allocate storage for reset button in "Edit" window.
Please take a look on attachment and propagate into main source tree.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Segfault fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Ant Dickens (antonydickens) wrote :

Intermittent problem starting cryptkeeper. I often have to start it multiple times before it works

Starting cryptkeeper from the terminal upon failure I get the message:
Segmentation fault (core dumped)

Starting cryptkeeper from the terminal upon success I get the message:
(cryptkeeper:4194): Gtk-CRITICAL **: gtk_box_pack: assertion 'GTK_IS_WIDGET (child)' failed
 - (However, Cryptkeeper works fine)

Linux 3.16.0-53-generic #72~14.04.1-Ubuntu x86_64 GNU/Linux

var/crash/ (attached)

Vlad Orlov (monsta)
tags: added: wily xenial
Revision history for this message
jackdinn (j-jack) wrote :

Im not a linux guru but i was using cryptkeeper on mint 17.2 cinnamon for ages without any problems at all but one day it suddenly started throwing this exact error. However i was v lucky because i had just been tinkering with my themes and what i found is it was because i had changed my icon set ! I switched it back to default and cryptkeeper is again working every time.

It may be helpful to someone :)

Revision history for this message
Peter Ludwig (peter-ludwig) wrote :

Mint Mate 17.3 (rosa)

As written in post #7 - after the third try it is running ... funny.

Please apply patch. Thanks for the good work!

Revision history for this message
lamenteel (lamenteel) wrote :

I have the same error:

(cryptkeeper:20887): Gtk-CRITICAL **: gtk_box_pack: assertion 'GTK_IS_WIDGET (child)' failed

my computer:

Ubuntu 14.04 LTS 64bit (Gnome)
Intel i5-4460
Geforce Gt610

Revision history for this message
Elbarbudo (patricearnal) wrote :

The Gtk error tells that Cryptkeeper is running :

patrice@internity:~$ cryptkeeper
Erreur de segmentation (core dumped)
patrice@internity:~$ cryptkeeper
Erreur de segmentation (core dumped)
patrice@internity:~$ cryptkeeper

(cryptkeeper:30759): Gtk-CRITICAL **: gtk_box_pack: assertion 'GTK_IS_WIDGET (child)' failed

-------------- Cryptkeeper running...

Revision history for this message
Jaufré Aligé (jaufre) wrote :

It looks like the problem is solved in 16.04. I had this problem uneder 14.04 but now, it's gone. Cryptkeeper version is 0.9.5.

Revision history for this message
Elbarbudo (patricearnal) wrote : Re: [Bug 1315964] Re: cryptkeeper segfaults at start sometimes

Le 21/07/2016 à 03:10, Jaufré Aligé a écrit :
> It looks like the problem is solved in 16.04. I had this problem uneder
> 14.04 but now, it's gone. Cryptkeeper version is 0.9.5.
>
I have the same version of Cryptkeeper and Ubuntu 14.04 64 bits : core
dumps 2 times out of 3 (abaout)

Revision history for this message
Jaufré Aligé (jaufre) wrote :

Maybe it is related to gnome version ?

Changed in cryptkeeper (Debian):
status: New → Fix Released
Revision history for this message
Oliver R. (oliverr) wrote :

So, is there a workaround for 14.04?

Vlad Orlov (monsta)
no longer affects: cryptkeeper (Debian)
Revision history for this message
Vlad Orlov (monsta) wrote :

I think I know what fixed it in 16.04. I didn't realize it back then, but my patch for bug 1420812 fixed not just the runtime warning, but also the crash, because the uninitialized widget was removed. The patch posted here by p-kolya is good too, as it adds variable initialization, but then we end up with a new button that doesn't do anything, so it could be confusing to the users. So I'll add the debdiff with my patch here.

tags: removed: utopic vivid wily xenial
Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :

[Impact]

An uninitialized variable makes cryptkeeper randomly crash on start
in Trusty.

The fix for it had been applied in newer releases (see bug 1420812),
starting from Vivid. Would be nice to apply it in Trusty as well.

The debdiff which is attached to this report contains the fix.

[Test Case]

Since it's a random crash, it may take several attempts to reproduce
it. So just run cryptkeeper a few times from the terminal. It should
crash right on start if it hits some random value in uninitialized
variable.

[Regression Potential]

None. It had been confirmed that the patched version of cryptkeeper
doesn't crash on start anymore (reported by Xenial users for example).

Simon Quigley (tsimonq2)
description: updated
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Uploaded to Trusty.

Changed in cryptkeeper (Ubuntu Trusty):
status: New → Fix Committed
Changed in cryptkeeper (Ubuntu):
status: Triaged → Fix Released
Changed in cryptkeeper (Ubuntu Trusty):
importance: Undecided → High
assignee: nobody → Vlad Orlov (monsta)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jaufré, or anyone else affected,

Accepted cryptkeeper into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cryptkeeper/0.9.5-5.1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-trusty
Revision history for this message
Vlad Orlov (monsta) wrote :

Testing in Xubuntu 14.04...

- removed my locally built cryptkeeper
- installed 0.9.5-5.1ubuntu3.1 from trusty-proposed
- launched cryptkeeper a few times
- all good, cryptkeeper doesn't crash on start

tags: added: verification-done verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Oliver R. (oliverr) wrote :

Also for me in Mint 17.3: all good with the proposed package! Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cryptkeeper - 0.9.5-5.1ubuntu3.1

---------------
cryptkeeper (0.9.5-5.1ubuntu3.1) trusty; urgency=medium

  * debian/patches/add_support_for_appindicator.patch:
    - remove unused and uninitialized widget to fix
      random crashes on start (LP: #1315964)

 -- Vlad Orlov <email address hidden> Sat, 09 Sep 2017 13:40:49 +0300

Changed in cryptkeeper (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for cryptkeeper has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.