whoopsie.postinst crashes silently if /var/crash is missing

Bug #978502 reported by Colin Watson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
whoopsie-daisy (Ubuntu)
Fix Released
High
Evan
Precise
Fix Released
High
Evan

Bug Description

In a fresh install, such as when building an image - e.g. http://people.canonical.com/~ubuntu-archive/livefs-build-logs/precise/ubuntu-zh_CN/20120410/livecd-20120410-i386.out - whoopsie may be configured before apport or (hopefully!) before anything crashes, and in that case it will fail to configure because /var/crash does not exist yet. Worse, it does so silently, with the only clue being:

  Setting up whoopsie (0.1.27) ...
  dpkg: error processing whoopsie (--configure):
   subprocess installed post-installation script returned error exit status 1

1) whoopsie.postinst should run 'mkdir -p -m 3777 /var/crash' before operating on it.

2) '/dev/null 2>&1' should be removed from the first pair of chmod/chgrp calls, the ones that may cause the postinst to fail. I can understand why you wouldn't want error output from the second pair, since you'll get glob failures if there are no *.crash files in /var/crash/, but if either 'chmod g+s /var/crash' or 'chgrp whoopsie /var/crash' emits any output then it will almost certainly be a reason for exiting non-zero and such error output should not be thrown away.

Colin Watson (cjwatson)
Changed in whoopsie-daisy (Ubuntu):
importance: Undecided → High
tags: added: rls-p-tracking
Changed in whoopsie-daisy (Ubuntu):
assignee: nobody → Evan Dandrea (ev)
milestone: none → ubuntu-12.04
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in whoopsie-daisy (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie-daisy - 0.1.28

---------------
whoopsie-daisy (0.1.28) precise; urgency=low

  * Create /var/crash if it doesn't already exist. Don't silence the
    chmod and chgrp calls on it. Thanks Colin Watson (LP: #978502)!
 -- Evan Dandrea <email address hidden> Wed, 11 Apr 2012 09:44:12 +0100

Changed in whoopsie-daisy (Ubuntu Precise):
status: Confirmed → 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.