update-alternatives crashed with SIGSEGV in main()

Bug #1037431 reported by Luke Yelavich
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released

Bug Description

I got this whilst trying to debug why the nvidia-current package wasn't being set up properly. Digging through the postinst, I found the following which is part of a big update-alternatives command to correctly symlink the nvidia xorg driver into place:

update-alternatives --force --slave /usr/lib/xorg/modules/drivers/nvidia_drv.so x86_64-linux-gnu_nvidia_drv /usr/lib/nvidia-current/xorg/nvidia_drv.so

Running this by hand caused this crash.

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: dpkg 1.16.7ubuntu3
ProcVersionSignature: Ubuntu 3.5.0-10.10-generic 3.5.1
Uname: Linux 3.5.0-10-generic x86_64
ApportVersion: 2.4-0ubuntu6
Architecture: amd64
Date: Thu Aug 16 16:28:29 2012
ExecutablePath: /usr/bin/update-alternatives
ProcCmdline: update-alternatives --force --slave /usr/lib/xorg/modules/drivers/nvidia_drv.so x86_64-linux-gnu_nvidia_drv /usr/lib/nvidia-current/xorg/nvidia_drv.so
 PATH=(custom, no user)
 Segfault happened at: 0x4025eb: mov (%rax),%rdi
 PC (0x004025eb) ok
 source "(%rax)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%rdi" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: dpkg
 ?? ()
 __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
 ?? ()
 ?? ()
 ?? ()
Title: update-alternatives crashed with SIGSEGV in __libc_start_main()
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Luke Yelavich (themuso) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

 #0 0x00000000004025eb in main (argc=6, argv=0x7fff1957cac8) at ../../utils/update-alternatives.c:2547
   [Error: ../../utils/update-alternatives.c was not found in source tree]
StacktraceTop: main (argc=6, argv=0x7fff1957cac8) at ../../utils/update-alternatives.c:2547

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 dpkg (Ubuntu):
importance: Undecided → Medium
summary: - update-alternatives crashed with SIGSEGV in __libc_start_main()
+ update-alternatives crashed with SIGSEGV in main()
tags: removed: need-amd64-retrace
visibility: private → public
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.2 KiB)

This bug was fixed in the package dpkg - 1.16.9ubuntu1

dpkg (1.16.9ubuntu1) raring; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Change the multiarch downgrade version checks in prerm/postrm
      from 1.16.2 to 1.16.0~ to reflect when multiarch landed in Ubuntu.
    - Migrate dpkg multiarch conffile (and other multi-arch-related
      conf settings) to the new DB with dpkg --add-architecture, but
      keep a copy of the old conffile if it was modified.
    - Out of paranoia, keep an option handler for foreign-architecture
      that informs people that they need to scrub their config files
      and upgrade, on the off chance that the above migration fails
      for some reason (this mitigates the chances of leaving users with
      a dpkg that fails to run due to a broken config).
    - Add DPKG_UNTRANSLATED_MESSAGES environment check so that higher-level
      tools can get untranslated dpkg terminal log messages while at the
      same time having translated debconf prompts. This is useful for tools
      that hide the dpkg terminal by default and use apport for bug
      reporting with the untranslated error message.
    - Build-depend on gettext:any for cross-building support.
    - Apply patch from Steve McIntyre to special-case armhf/armel ELF
      objects in Shlibs/Objdump.pm, so we don't get incorrect deps.
    - lib/dpkg/pkg-spec.c: map unqualified package names of multiarch-same
      packages to the native arch instead of throwing an error, so that we
      don't break on upgrade when there are unqualified names stored in
      dpkg's own trigger database.
    - Add logic to the postinst to `dpkg --add-architecture i386' on new
      installs on amd64, and to also do so on upgrades from pre-conffile
      Ubuntu versions, mimicking our previous behaviour with the conffile.
    - Apply a workaround from mvo to consider RC packages as multiarch,
      during the dpkg consistency checks. (see LP: 1015567 and 1057367).

dpkg (1.16.9) unstable; urgency=low

  [ Raphaël Hertzog ]
  * Fix dpkg-source regression in "3.0 (quilt)" source packages while
    unapplying patches that remove all files in a directory. Closes: #683547
  * Fix segfault in field format parsing on empty strings, affecting
    «dpkg-query -W -f ''» and «dpkg-deb -W --showformat=''». LP: #1035512
  * Fix dpkg's French usage string which was missing the final “s“ in
    --print-foreign-architectures. Closes: #685863

  [ Guillem Jover ]
  * Use “statoverrides” instead of “statusoverrides” in dpkg-statoverride.
    Closes: #686995
  * Comment out dpkg(1) documentation about disabled --command-fd option.
    Closes: #685677
  * Cleanup dpkg-divert unit-test environment to avoid build failures.
    Closes: #687656
  * Fix update-alternatives test suite to behave correctly on non-Debian
    binary paths. Known to be affecting at least Gentoo and Mac OS X.
  * Do not leak subcall command arguments in update-alternatives.
  * Fix segfault on update-alternatives when passing --slave without any
    action at all. LP: #1037431
  * Fix memory leak in dpkg filesavespackage().
  * Do not print garbage (or worse) on dpkg shared conffil...


Changed in dpkg (Ubuntu):
status: New → Fix Released
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.