ubuntu-bug's quoting prevents .crash files from being reported

Bug #401973 reported by Steve Beattie
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
In Progress

Bug Description

Binary package hint: apport

When attempting to file a bug report for an existing crash file in /var/crash, the quoting that's done by the /usr/bin/ubuntu-bug shell script is invoking apport-cli with single quotes around the pathname, such that apport-* attempts to open "'/path/name.crash'" rather than "/path/name.crash" which of course fails; e.g. with apport-cli:

  $ ls -l /var/crash/update-motd.0.crash
  -rw------- 1 root root 100817 2009-07-17 08:36 /var/crash/update-motd.0.crash
  $ sudo ubuntu-bug /var/crash/update-motd.0.crash

  *** Error: Invalid problem report

  No such file or directory

  Press any key to continue...

You can see what's happening by stracing it a la 'sudo strace -f -eopen,execve ubuntu-bug /var/crash/update-motd.0.crash' which contains the following:

  2694 execve("/usr/bin/ubuntu-bug", ["/usr/bin/ubuntu-bug", "/var/crash/update-motd.0.crash"], [/* 14 vars */]) = 0
  2695 execve("/usr/bin/apport-cli", ["/usr/bin/apport-cli", "-c", "'/var/crash/update-motd.0.crash'"], [/* 15 vars */]) = 0
  2695 open("'/var/crash/update-motd.0.crash'", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

ProblemType: Bug
Architecture: i386
CrashReports: 600:0:0:296329:2009-07-17 09:59:23.295992000 -0700:2009-07-20 14:31:00.646340511 -0700:/var/crash/update-motd.0.crash
Date: Mon Jul 20 16:01:49 2009
DistroRelease: Ubuntu 9.10
LiveMediaBuild: Ubuntu 9.10 "Karmic Koala" - Alpha i386 (20090716)
Package: apport 1.6-0ubuntu1
PackageArchitecture: all
 PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.31-3.19-generic
SourcePackage: apport
Uname: Linux 2.6.31-3-generic i686

Revision history for this message
Steve Beattie (sbeattie) wrote :
Revision history for this message
Paul Larson (pwlars) wrote :

I can confirm this as well. It seems the workaround for the time being is to use apport-cli -c instead

Changed in apport (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Steve Beattie (sbeattie) wrote :

Attached is a patch to fix this, but still make it possible to file crash reports that happen to contain spaces in their names.

Changed in apport (Ubuntu):
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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