apport used wrong source package when filing package installation failure

Bug #580419 reported by Philip Muškovac
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt
Natty
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: apport

When filing bug 580412 the link I got from apport-cli was:

https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+filebug/uC18DGGESvZZLYGWCiOgRmtkR0I?field.title=package+trac+0.11.7-3+failed+to+install%2Fupgrade%3A+subprocess+installed+post-installation+script+returned+error+exit+status+2

which for some reason says initramfs-tools, not trac... .crash file attached

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: apport 1.13.4-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-19.28-preempt 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-preempt x86_64
NonfreeKernelModules: vboxnetadp vboxnetflt vboxdrv nls_iso8859_1 nls_cp437 usb_storage ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs reiserfs binfmt_misc rfcomm ppdev sco bridge stp bnep l2cap kvm_intel kvm nfsd exportfs nfs lockd nfs_acl auth_rpcgss sunrpc btrfs zlib_deflate crc32c libcrc32c snd_hda_codec_analog snd_hda_intel joydev snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm usbhid thinkpad_acpi arc4 snd_seq_dummy pcmcia snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event iwlagn snd_seq iwlcore snd_timer snd_seq_device mac80211 yenta_socket rsrc_nonstatic uinput sdhci_pci hid psmouse serio_raw snd nvram btusb bluetooth ricoh_mmc pcmcia_core sdhci led_class video output cfg80211 nvidia soundcore snd_page_alloc intel_agp lp parport dm_raid45 xor vesafb ohci1394 ieee1394 ahci fbcon tileblit font bitblit softcursor e1000e vga16fb vgastate
ApportLog:

Architecture: amd64
CrashReports: 600:0:0:619483:2010-05-14 11:24:36.119428000 +0200:2010-05-14 11:26:12.170427069 +0200:/var/crash/trac.0.crash
Date: Fri May 14 11:35:24 2010
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
SourcePackage: apport

Revision history for this message
Philip Muškovac (yofel) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

A lot of bugs are recently reported against initramfs although they are completely unrelated.

For example: bug 707581, bug 705874

I'm setting the status to confirmed and importance high because many bugs can be lost or additional delays in processing and it generates useless work for the maintainer of initramfs

Changed in apport (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Another recent example is bug 705975

I noticed that higher in the log, but in an other installation session, there is an update-initramfs error, so maybe apport was a bit confused and caught the wrong error.
Here is the initramfs-tools error:
update-initramfs: Generating /boot/initrd.img-2.6.37-12-generic

cryptsetup: WARNING: failed to detect canonical device of /dev/sdb2

.: 17: Can't open /etc/default/keyboard

E: /usr/share/initramfs-tools/hooks/console_setup failed with return 127.

update-initramfs: failed for /boot/initrd.img-2.6.37-12-generic

Failed to create initrd image.

dpkg: error processing linux-image-2.6.37-12-generic (--configure):

 subprocess installed post-installation script returned error exit status 2

That would also explain that sometimes a failure of update-initramfs is filed against initramfs-tools and sometimes against linux.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

If think this is the faulty code of apport in data/general-hooks/ubuntu.py
        if report['Package'] != 'initramfs-tools':
            # update-initramfs emits this when it fails, usually invoked from the linux-image postinst
            # https://wiki.ubuntu.com/KernelTeam/DebuggingUpdateErrors
            if 'DpkgTerminalLog' in report and re.search(r'^update-initramfs: failed for ', report['DpkgTerminalLog'], re.MULTILINE):
                # File these reports on the initramfs-tools package instead
                report['SourcePackage'] = 'initramfs-tools'

The regex is applied to the full term.log, not only the last installation session, and thus it catches a previous failure, not the one triggering the report.

Changed in apport (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti)
Changed in apport (Ubuntu Natty):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
Martin Pitt (pitti)
Changed in apport (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.17.1-0ubuntu3

---------------
apport (1.17.1-0ubuntu3) natty; urgency=low

  * data/general-hooks/ubuntu.py: Add some __main__ code for easy testing,
    which will update a .crash file with that hook's data.
  * data/general-hooks/ubuntu.py: Trim DpkgTerminaLog to the most recent
    install session; not only is this much easier to read, but it also avoids
    confusing the tests further down which check for particular strings in the
    log. (LP: #580419)
 -- Martin Pitt <email address hidden> Wed, 26 Jan 2011 11:44:00 +0100

Changed in apport (Ubuntu Natty):
status: Fix Committed → 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.