ubuntu-bug argument issue with complete path to .crash file

Bug #422881 reported by Marco Rodrigues
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Undecided
Unassigned
apport (Ubuntu)
Fix Released
Medium
Martin Pitt
Jaunty
Fix Released
Medium
Martin Pitt

Bug Description

This command shows an error, it can't handle the file with full path correctly. I'll attach a fix for this.

$ ubuntu-bug /var/crash/_usr_bin_totem.1000.crash

$ sudo strace ubuntu-bug /var/crash/_usr_bin_totem.1000.crash
execve("/usr/bin/ubuntu-bug", ["ubuntu-bug", "/var/crash/_usr_bin_totem.1000.c"...], [/* 16 vars */]) = 0
brk(0) = 0x8d3b000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb801e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=74485, ...}) = 0
mmap2(NULL, 74485, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb800b000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260l\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1397188, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb800a000
mmap2(NULL, 1407336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xcff000
mprotect(0xe50000, 4096, PROT_NONE) = 0
mmap2(0xe51000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x151) = 0xe51000
mmap2(0xe54000, 10600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xe54000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8009000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb80096c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xe51000, 8192, PROT_READ) = 0
mprotect(0x805e000, 4096, PROT_READ) = 0
mprotect(0x8f1000, 4096, PROT_READ) = 0
munmap(0xb800b000, 74485) = 0
getpid() = 18934
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
geteuid32() = 0
brk(0) = 0x8d3b000
brk(0x8d5c000) = 0x8d5c000
getppid() = 18933
getcwd("/home/kmos", 4096) = 11
open("/usr/bin/ubuntu-bug", O_RDONLY) = 3
fcntl64(3, F_DUPFD, 10) = 10
close(3) = 0
fcntl64(10, F_SETFD, FD_CLOEXEC) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x805606b, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
read(10, "#!/bin/sh -e\n\n# filter out -p an"..., 8192) = 2020
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
fcntl64(2, F_DUPFD, 10) = 11
close(2) = 0
fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
dup2(3, 2) = 2
close(3) = 0
write(2, "test: 37: ", 10) = 10
write(2, "Illegal number: /var/crash/_usr_"..., 52) = 52
write(2, "\n", 1) = 1
dup2(11, 2) = 2
close(11) = 0
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb8009728) = 18935
--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
read(3, "0\n", 128) = 2
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 18935
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
fcntl64(1, F_DUPFD, 10) = 11
close(1) = 0
fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
dup2(3, 1) = 1
close(3) = 0
stat64("/usr/local/sbin/pgrep", 0xbfe27850) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/pgrep", 0xbfe27850) = -1 ENOENT (No such file or directory)
stat64("/usr/sbin/pgrep", 0xbfe27850) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/pgrep", {st_mode=S_IFREG|0755, st_size=18012, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb8009728) = 18936
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 18936
dup2(11, 1) = 1
close(11) = 0
pipe([3, 4]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb8009728) = 18937
--- SIGCHLD (Child exited) @ 0 (0) ---
close(4) = 0
read(3, "0\n", 128) = 2
read(3, "", 128) = 0
close(3) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 18937
open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
fcntl64(1, F_DUPFD, 10) = 11
close(1) = 0
fcntl64(11, F_SETFD, FD_CLOEXEC) = 0
dup2(3, 1) = 1
close(3) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb8009728) = 18938
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 18938
dup2(11, 1) = 1
close(11) = 0
stat64("/usr/share/apport/apport-gtk", {st_mode=S_IFREG|0755, st_size=12946, ...}) = 0
geteuid32() = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb8009728) = 18939
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 18939
--- SIGCHLD (Child exited) @ 0 (0) ---
read(10, "", 8192) = 0
exit_group(0) = ?

Revision history for this message
Marco Rodrigues (gothicx) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

ubuntu-bug isn't upstream.

Changed in apport:
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.3 KiB)

This bug was fixed in the package apport - 1.8.1-0ubuntu1

---------------
apport (1.8.1-0ubuntu1) karmic; urgency=low

  * New upstream bug fix release:
    - data/general-hooks/generic.py: Check $HOME, not /home for enough space.
      (LP: #422658)
    - launchpad.py: Intercept httplib2.ServerNotFoundError as well, to avoid
      crashes when being offline. (LP: #396276)
    - apport-cli: Save reports with .apport extension instead of .txt. Thanks
      to Steve Beattie! (LP: #401983)
    - fileutils.py, likely_packaged(): Ignored crashes in /var, packages don't
      ship executables there, and it creates false positives. (LP: #414368)
    - packaging-apt-dpkg.py, get_modified_files(): Fix crash with empty lines.
      (LP: #408280)
    - packaging-apt-dpkg.py: Use installed version instead of candidate
      version where appropriate. This also fixes a crash where an obsolete
      package is not available any more. (LP: #423511)
    - hookutils.py, attach_gconf(): Fix crash with keys which do not have a
      schema default. (LP: #422277)
    - launchpad.py: Remove LP #353805 workaround, seems fixed now.
    - launchpad.py: Talk to staging if $APPORT_STAGING is set.
    - launchpad.py: Explicitly supply content_type for addAttachment, current
      wadllib requires it now.
    - apport_python_hook.py: Paper over inexplicable import error.
      (LP: #348250)
    - apport_python_hook.py: Protect against nonexisting sys.argv.
      (LP: #418051)
    - apport/ui.py, load_report(): Check that report has ProblemType field.
      (LP: #198543)
    - ui.py: Fix handling of complete vs. reduced report size. (LP: #92653).
      This also fixes a race condition crash with os.path.getsize().
      (LP: #348137)
    - fi.po: Fix mistranslation of "&Cancel". (LP: #355303)
    - apport-{gtk,kde}: Check for having $DISPLAY at startup to avoid crashes.
      (LP: #411276)
    - report.py, add_gdb_info(): Fix race condition in unlink_core, thanks to
      Tommi Komulainen! (LP: #397945)
    - ui.py, load_report(): Robustify check whether program is still
      installed. (LP: #329184)
    - packaging-apt-dpkg.py, install_retracing_packages(): Install package for
      ExecutablePath/InterpreterPath if missing; this can happen with package
      hooks which reassing package
    - launchpad.py: Add a comment when marking a bug as a duplicate.
      (LP: #418871)
  * Move gdb dependency from apport to GUI packages to avoid pulling in gdb on
    Ubuntu server. Thanks to Steve Beattie! (LP: #354172)
  * ubuntu-bug: Fix handling of .crash file arguments, thanks to Marco
    Rodrigues for pointing this out! (LP: #422881)
  * debian/local/apport-collect: Set content_type and description, wadllib
    requires them now. (LP: #423512) Also drop the ASCII reencoding
    workaround, this doesn't seem to be necessary any more.
  * apport/hookutils.py, attach_conffiles(): Fix crash with obsolete
    conffiles. (LP: #412132)
  * debian/local/apport-collect: Do not upload data if the affected package
    isn't installed and there is no source package hook available either.
    (LP: #417277)
  * debian/local/ubuntu-bug: Accept .apport extension, too; thanks to Steve
    ...

Read more...

Changed in apport (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

With the recent bug filing changes in Launchpad we need to fix this for Jaunty as well, to complete the SRU we did in bug 401983 and bug 353253. So we need to backport http://bazaar.launchpad.net/%7Eubuntu-core-dev/ubuntu/karmic/apport/ubuntu/revision/1506 to jaunty.

Changed in apport (Ubuntu Jaunty):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted apport into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in apport (Ubuntu Jaunty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Steve Beattie (sbeattie) wrote :

I have reproduced the issue with apport in jaunty-updates, 1.0-0ubuntu5.2, and can confirm that the (updated) version in jaunty-proposed, 1.0-0ubuntu5.4, successfully reads and attaches existing report files. Marking verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 1.0-0ubuntu5.4

---------------
apport (1.0-0ubuntu5.4) jaunty-proposed; urgency=low

  * ubuntu-bug: Fix handling of .crash file arguments, to make the previous
    SRU actually work in a sensible manner. Patch backported from upstream
    version 1.8.1 (trunk r1506). (LP: #422881)

apport (1.0-0ubuntu5.3) jaunty-proposed; urgency=low

  * Backporting of two patches to improve offline bug filing
    - apport-cli: Fix report saving in "bug report" mode. (LP: #353253)
    - apport-cli: Save reports with .apport extension instead of .txt. Thanks
      to Steve Beattie! (LP: #401983)

 -- Martin Pitt <email address hidden> Fri, 25 Sep 2009 09:19:38 +0200

Changed in apport (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Kamota (f-azib)
Changed in apport:
status: Invalid → Fix Released
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.