Support for gcc ICEs

Bug #125551 reported by Martin Pitt
2
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Wishlist
Martin Pitt
Nominated for Dapper by Guybrush88
Declined for Edgy by Matthias Klose
Declined for Feisty by Matthias Klose
Nominated for Gutsy by Guybrush88
gcc-4.2 (Ubuntu)
Fix Released
Wishlist
Matthias Klose
Nominated for Dapper by Guybrush88
Declined for Edgy by Matthias Klose
Declined for Feisty by Matthias Klose
Nominated for Gutsy by Guybrush88

Bug Description

Binary package hint: apport

Add a new hook for reporting gcc internal compiler exceptions. gcc

 * dumps out the gcc -E output to a temporary file

 * calls:
  /usr/share/apport/gcc_ice_hook <executable name> <gcc -E output file path>

  where <executable name> is argv[0]

 * Removes the temporary file.

Alternatively, to avoid the temporary file, gcc could write the gcc -E output to stdout and call

  /usr/share/apport/gcc_ice_hook <executable name> -

I will write the hook to support both.

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

Matthias: please review if the interface is suitable for you, and if you would like to include any additional information.

Please note that gcc must not assume that the hook actually exists; it needs to gracefully handle this case.

Changed in apport:
assignee: nobody → pitti
importance: Undecided → Wishlist
status: New → Triaged
Changed in gcc-4.2:
assignee: nobody → doko
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr head.

Changed in apport:
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :
Download full text (3.2 KiB)

apport (0.94) gutsy; urgency=low

  * doc/data-format.tex: Some updates to incorporate feedback from Gnome
    upstream:
    - Do not talk about "Distributions" any more, but "Operating systems".
      Gnome is used on non-Linux OSs, too.
    - Split "DistroRelease:" field into "OS:" and "OSRelease:".
    - Explicitly mention that CoreDump, StackTrace etc. can also contain
      minidump output.
    - Increase document version to 0.2.
  * apport/report.py, obsolete_packages(): Fix crash when apt does not know an
    available version of a package. (LP: #128176)
  * test-apport: Add check that apport aborts immediately if another apport
    instance is already running. Also test that a symlink attack on the lock
    file is not possible.
  * bin/apport: Abort running several apport instances at the same time, by
    lockf()'ing /var/crashes/.lock and aborting on failure. (LP: #119622)
  * Add bin/gcc_ice_hook: Script to create an apport report for a gcc ICE
    (internal compiler exception). Add test cases to test-hooks, and ship it
    in the 'apport' package. (LP: #125551)
  * run-tests: In 'local' mode, only explicitly run the apt/dpkg
    implementation instead of backends/*, since the RPM ones don't have tests
    yet.
  * apport/crashdb.py: Add a second optional parameter to upload() to specify
    an upload progress callback function. Adapt the declarations in the
    Launchpad and Memory implementations, too.
  * apport/crashdb_impl/launchpad.py, upload(): Pass upload progress callback
    handler to launchpadBugs.storeblob.upload(), which supports this since
    version 0.2~39. Bump dependency to it accordingly.
  * apport/ui.py, file_report(): Define an upload progress callback handler,
    pass it to the crashdb upload(), and feed ui_set_upload_progress() with
    some actual data. (LP: #91521)
  * problem_report.py: Remove support for reading bz2 compressed binary data.
    That was only relevant during edgy's development cycle.
  * apport/report.py, test_add_proc_info(): Fix determination of /bin/zgrep
    interpreter.
  * problem_report.py: Switch encoding of binary values from bare zlib to
    proper gzip format, since this is much more useful when reusing the
    compressed value. Retain support for zlib-only reports. Add test cases for
    both old and new encodings, and adapt the other test cases for the new
    format. Update doc/data-format.tex accordingly.
  * problem_report.py, write(): Add new permitted 'binary' argument value
    'compressed', which retains gzip compressed binary values instead of
    unpacking them transparently. Add test cases.
  * problem_report, write_mime(): Eliminate unnecessary usage of StringIO.
  * problem_report, write_mime(): Make function work for compressed binary
    values. Add test case.
  * apport/report.py, add_gdb_info(): Make function work if CoreDump is a
    compressed value.
  * apport/ui.py: Load crash report with keeping compressed binaries. This
    avoids loading the entire uncompressed core dump into memory, and avoids
    recompressing it all over again for generating the crash database upload
    MIME document. This greatly speeds up crash reporting, too. (LP: #98562)

 -- ...

Read more...

Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

reopening; apport get's called, but reports for example: "/usr/lib/gcc/i486-linux-gnu/4.1.3/cc1plus doesn't belong to a packaged program). apport should resolve the symlinks in the pathname and try again (with /usr/lib/gcc/i486-linux-gnu/4.1/cc1plus).

Changed in apport:
status: Fix Released → New
Changed in gcc-4.2:
status: Triaged → Fix Committed
Martin Pitt (pitti)
Changed in apport:
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr head.

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

apport (0.96) gutsy; urgency=low

  * Create man pages for apport-cli, apport-chroot, and dupdb-admin.
  * apport/fileutils.py, find_file_package(): Try to resolve symlinks in the
    directory path. (LP: #125551)
  * apport/crashdb_impl/launchpad.py, debian/local/setup-apport-retracer: Use
    packaging.get_system_architecture() (which is dpkg --print-architecture on
    Debian/Ubuntu) instead of uname, so that this does the right thing on lpia.
  * problem_report.py, write_mime(): Use base64 encoding for gzipped
    attachments, to not screw up mail servers. Thanks to Tim Yamin for this
    patch!
  * apport/crashdb.py: Drop the last argument (-1), since it is the default
    anyway and did not yet exist on Python 2.4.

 -- Martin Pitt <email address hidden> Tue, 21 Aug 2007 14:11:48 +0200

Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

implemented for gcc-4.1 and gcc-4.2

Changed in gcc-4.2:
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.