https crashed with SIGSEGV in lookup_or_create_bucket()

Bug #911436 reported by Anders Kaseorg
This bug affects 293 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Medium
Unassigned
p11-kit (Ubuntu)
Fix Released
Critical
Adam Conrad

Bug Description

This happened after a slightly broken upgrade, but it can be reproduced with

$ sudo cp /etc/pkcs11/modules/gnome-keyring-module /etc/pkcs11/modules/gnome-keyring-module.dpkg-new
$ sudo apt-get update
p11-kit: duplicate configured module: gnome-keyring-module: /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
E: Method https has died unexpectedly!
E: Sub-process https received a segmentation fault.

There are two bugs here, I suppose. One is that pkcs11 should ignore *.dpkg-new files (usually this would be done by reading, e.g., /etc/pkcs11/modules/*.conf instead of /etc/pkcs11/modules/*), and the other is that a duplicate file shouldn’t cause a crash.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apt-transport-https 0.8.16~exp5ubuntu14.1
ProcVersionSignature: Ubuntu 3.2.0-7.13-generic 3.2.0-rc7
Uname: Linux 3.2.0-7-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Tue Jan 3 15:17:28 2012
ExecutablePath: /usr/lib/apt/methods/https
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20101202)
ProcCmdline: /usr/lib/apt/methods/https
SegvAnalysis:
 Segfault happened at: 0x1dd4460: add %al,(%rax)
 PC (0x01dd4460) in non-executable VMA region: 0x01db9000-0x01dda000 rw-p [heap]
 source "%al" ok
 destination "(%rax)" (0x000078b1) not located in a known VMA region (needed writable region)!
SegvReason:
 executing writable VMA [heap]
 writing NULL VMA
Signal: 11
SourcePackage: apt
StacktraceTop:
 ?? ()
 ?? () from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
 p11_kit_initialize_registered () from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
Title: https crashed with SIGSEGV in p11_kit_initialize_registered()
UpgradeStatus: Upgraded to precise on 2011-11-16 (48 days ago)
UserGroups:

Related branches

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ?? ()
 lookup_or_create_bucket (map=0x1dd4320, key=0x7fa730361f00, create=0) at hashmap.c:109
 _p11_hash_get (map=<optimized out>, key=<optimized out>) at hashmap.c:139
 take_config_and_load_module_unlocked (config=0x7fff41124950, name=0x7fff41124948) at modules.c:412
 load_registered_modules_unlocked () at modules.c:462

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in apt (Ubuntu):
importance: Undecided → Medium
summary: - https crashed with SIGSEGV in p11_kit_initialize_registered()
+ https crashed with SIGSEGV in lookup_or_create_bucket()
tags: removed: need-amd64-retrace
Anders Kaseorg (andersk)
visibility: private → public
Steve Langasek (vorlon)
Changed in p11-kit (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

Thanks for the analysis here, Anders.

Changed in apt (Ubuntu):
status: Confirmed → Invalid
tags: added: rls-mgr-p-tracking
Revision history for this message
mario catena (mcblackmar02) wrote :

bug appare during "sudo apt-get upgrade"

WARNING:softwarecenter.db.update:The file: '/usr/share/app-install/desktop/deja-dup:deja-dup-ccpanel.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application
WARNING:softwarecenter.db.update:The file: '/usr/share/app-install/desktop/rar.desktop' could not be read correctly. The application associated with this file will not be included in the software catalog. Please consider raising a bug report for this issue with the maintainer of that application

this Warning in the upgrade (no dist-upgrade)

Changed in p11-kit (Ubuntu):
importance: High → Critical
Changed in p11-kit (Ubuntu):
milestone: none → ubuntu-12.04-beta-1
Revision history for this message
sojourner (itsmealso2) wrote :

happened to me during an upgrade with synaptic .

tags: added: qa-manual-testing
tags: added: bugpattern-written
Steve Langasek (vorlon)
Changed in p11-kit (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Adam Conrad (adconrad)
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
Steve Langasek (vorlon)
tags: added: rls-p-tracking
Revision history for this message
Tom Pino (metalsmith-rangeweb) wrote :

Bug #933973 has been named a duplicate of this one. Not sure why but I will post this here as that bug is not confirmed.

Had upgrades for the same packages today in Xubuntu 12.04 and in Debian Wheezy.

The Xubuntu packages, all related to cups and bluez will not install in a chroot environment. They will install fine when I boot into the OS and run "dpkg --configure -a".

The same packages install under Wheezy. They did hang for a short while today and throw a message that they could not access the gnome keyring or the /temp/keyring.

I have another install of Wheezy that has the gnome keyring install as it started life as vanilla Squeeze (gnome). It is now running xfce like the other 2 OS's I have mentioned. The upgrades had no trouble at all there.

My theory has always been that this is an install script problem. I feel that these result indicate just that. Debian has put some exceptions in their script to get around thes problem with just the warning of non access.

Revision history for this message
Steve Langasek (vorlon) wrote :

> Bug #933973 has been named a duplicate of this one. Not sure why but I
> will post this here as that bug is not confirmed.

It was marked a duplicate in error. Bug #933973 is unrelated to this one.

However, it's also not a bug. Packages that provide services expect to
enable them at install time; in the case of cups and bluez, they do this
using upstart jobs. If you're running Ubuntu in a chroot on Debian, you
don't have upstart running to make this possible.

If you want to avoid packages trying to start services on upgrade inside a
chroot (which is generally advisable anyway), you should configure
/usr/sbin/policy-rc.d to tell invoke-rc.d not to try to start them.

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

This bug was fixed in the package p11-kit - 0.12-2ubuntu1

---------------
p11-kit (0.12-2ubuntu1) precise; urgency=low

  * Merge with Debian, bringing in upstream module and build fixes.
  * Add valid-config-files.patch, introducing a static function to
    validate config filenames against a sane pattern (LP: #911436)
  * Add duplicate-module-fix.patch, making sure that after we unload
    a duplicate module, we stop trying to reference it (LP: #911436)

p11-kit (0.12-2) unstable; urgency=low

  * Upload to unstable.

p11-kit (0.12-1) experimental; urgency=low

  * Drop DEB_CPPFLAGS_MAINT_APPEND = -D_XOPEN_SOURCE=600 -D_BSD_SOURCE,
    upstream's usage of AC_USE_SYSTEM_EXTENSIONS should make this unnecessary.
  * Upload to experimental, let 0.11-3 propagate to wheezy.

p11-kit (0.11-3) unstable; urgency=low

  * Do not export CPPFLAGS in debian/rules, it disabled the respective
    hardening-options. (Thanks, Simon Ruderich) Closes: #662100

p11-kit (0.11-2) unstable; urgency=low

  * Bump versioning of p11_kit_initialize_registered,
    p11_kit_initialize_module and p11_kit_load_initialize_module.
    (Due to upstream change "Remove automatic reinitialization of PKCS#11
    after fork")
  * Use debhelper v9 compat to get dpkg-buildflags. Drop --libdir argument to
    ./configure, bump b-d.

p11-kit (0.11-1) unstable; urgency=low

  * New upstream version.
 -- Adam Conrad <email address hidden> Fri, 23 Mar 2012 15:39:09 -0600

Changed in p11-kit (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
mfauzirahman (mfauzirahman) wrote :

will update it by today...thanks

Revision history for this message
martyfelker (martyfelker-gmail) wrote : Re: [Bug 911436] Re: https crashed with SIGSEGV in lookup_or_create_bucket()

Thank you! how ca I find the fix? Just did a distribution update of
Precise today - how would I know?

On 3/23/2012 7:55 PM, mfauzirahman wrote:
> will update it by today...thanks
>

Revision history for this message
Steve Langasek (vorlon) wrote :

On Sat, Mar 24, 2012 at 02:13:53AM -0000, martyfelker wrote:
> Thank you! how ca I find the fix? Just did a distribution update of
> Precise today - how would I know?

This issue only affects the upgrade itself. If you've already updated,
there shouldn't be anything else you need to do.

If you're still seeing issues with cups starting even after the upgrade has
completed, then you have a different bug.

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

FWIW I have fwded this upstream to https://bugs.freedesktop.org/show_bug.cgi?id=48154

Revision history for this message
Barry Warsaw (barry) wrote :

FWIW, I just upgraded from precise to quantal and hit this bug. It looks like /etc/pkcs11/modules is left with two identical files, one called gnome-keyring-module and one called gnome-keyring.module. No crash, but the warnings (e.g. `virsh list`) are annoying. It's not clear to me which is the "right" file, but removing gnome-keyring-module eliminates the warnings.

Revision history for this message
Steve Langasek (vorlon) wrote :

Barry, please file a new bug report and assign it to the desktop team. This is a separate issue from the original, and entirely the fault of the maintainer for changing conffile names gratuitously and not cleaning up afterwards.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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