StacktraceAddressSignature is missing

Bug #1084996 reported by Martin Pitt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Apport
Fix Released
High
Unassigned
apport (Ubuntu)
Fix Released
Undecided
Martin Pitt
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

Some crash reports are missing a StacktraceAddressSignature field, which prevents proper processing by whoopsie.

I seem to be able to reproduce this rather reliably with some simple X.org programs, such as

SRU TEST CASE:
$ (xeyes &); sleep 1; killall -SEGV xeyes
$ (xcalc &); sleep 1; killall -SEGV xcalc

With the current versions in precise and quantal, these reports usually do not have a StacktraceAddressSignature field in the details. With the proposed version they should.

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

This happens for stack traces whose first 15 frames consist of more than 20% unresolvable addresses, i. e. addresses which do not belong into any known range in /proc/pid/maps. For example, an xeyes stack trace without debug symbols looks like this:

#0 0x00007fa41cf4b430 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fa41da94458 in _XtWaitForSomething () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#2 0x00007fa41da95df3 in XtAppProcessEvent () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#3 0x00007fa41da8a4bd in XtAppMainLoop () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#4 0x00000000004018e7 in ?? ()
#5 0x00007fa41ce81c15 in __libc_start_main (main=0x401760, argc=1, ubp_av=0x7fff260180a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff26018098) at libc-start.c:227
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -7013435209680200018, 4200756, 140733831020704, 0, 0, 7013522814131723950, 7053617805804002990}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x403030, 0x7fff260180a8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 4206640}}}
        not_first_call = <optimized out>
#6 0x000000000040195d in ?? ()
#7 0x00007fff26018098 in ?? ()
#8 0x000000000000001c in ?? ()
#9 0x0000000000000001 in ?? ()
#10 0x00007fff26019776 in ?? ()
#11 0x0000000000000000 in ?? ()

Note the very low addresses in frames 8, 9, and 11. These are absolutely impossible as under Unix the first page (i. e. everything up to 0xFFF) is always unallocated memory. So these look like gdb artifacts. With x11-apps-dbgsym, these are gone and it looks much cleaner:

#0 0x00007fa41cf4b430 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fa41da94458 in _XtWaitForSomething () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#2 0x00007fa41da95df3 in XtAppProcessEvent () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#3 0x00007fa41da8a4bd in XtAppMainLoop () from /usr/lib/x86_64-linux-gnu/libXt.so.6
#4 0x00000000004018e7 in main (argc=1, argv=<optimized out>) at ../xeyes/xeyes.c:137
        app_context = 0xd0b0e0
        toplevel = <optimized out>
        arg = {{name = 0x604792 <XtShellStrings+18> "iconPixmap", value = 67108865}, {name = 0x6047be <XtShellStrings+62> "iconMask", value = 67108867}}
        i = 2

So as a first and very safe measure, we can ignore frames with addresses < 0x1000. Also, by now I have grown quite a lot of confidence in our StackAddressSignature approach, so I'm inclined to remove the current safety heuristics of "at most 20% frames without resolvable offsets" and just ignore frames with unresolvable offsets instead. We still keep the minimum length requirement.

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

We should soon have the ability to count how many reports we are receiving that don't have a SAS field. After discussing and thinking about it again, I'm going to go with the small and 100% safe solution first to ignore addresses < 0x1000, but keep the error counting for unresolvable "high" addresses. If we keep getting those, then something else is wrong.

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

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

---------------
apport (2.6.3-0ubuntu1) raring; urgency=low

  * New upstream release. Changes since our previous snapshot:
    - debian.py: Only reject reports with useless stack traces if the report
      actually has a stack trace at all.
    - debian.py: Fix UTF-8 string handling. Thanks Ritesh Raj Sarraf.
    - debian.py: Fix crash on broken "Package" fields, as generated by current
      Debian/Ubuntu dkms package.
    - data/apport: Call fsync when writing upstart crash reports.
    - report.py, add_gdb_info(): Handle libnih's assertion messages.
      (LP: #997359)
    - apport-gtk, apport-kde: Don't provide an option to restart a crashed
      application when the crash occurred in a thread (LP: #1033902).
    - apport-retrace: Disallow option -C without option -S. Thanks Kyle
      Nitzsche.
    - fileutils.py, mark_report_upload(): Refresh the .upload stamps if a
      previous version of the report was already uploaded, but another
      instance of the problem happened since then. Thanks Brian Murray. (LP:
      #1084296)
    - Ignore implausibly low addresses when computing
      StacktraceAddressSignature. These are usually artifacts from gdb when
      not having debug symbols, and having too many of them prevents proper
      client-side duplicate detection and proper bucketing in daisy.
      (LP: #1084996)
    - fileutils.py: Ignore .desktop files with NoDisplay=true. (LP: #1048524)
  * debian/tests/control: Run tests as root, just like before switching our
    autopkgtests to run as user "ubuntu" by default. This enables a couple of
    extra tests, and avoids some confusion because the distro and the user
    name are identical.
  * data/package-hooks/source_linux-nexus7.py: Fix PEP-8 error.
 -- Martin Pitt <email address hidden> Fri, 30 Nov 2012 18:00:01 +0100

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

I uploaded precise and quantal SRUs for this to the review queue.

Changed in apport (Ubuntu Precise):
status: New → In Progress
Changed in apport (Ubuntu Quantal):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Martin, or anyone else affected,

Accepted apport into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.6.1-0ubuntu8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apport (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Martin, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.0.1-0ubuntu16 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apport (Ubuntu Precise):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Martin, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.0.1-0ubuntu17 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Martin, or anyone else affected,

Accepted apport into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.6.1-0ubuntu9 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Brian Murray (brian-murray) wrote :

I tested this using apport version 2.6.1-0ubuntu9 from quantal proposed and was able to submit a crash regarding xeyes e.g. it had a StacktraceAddressSignature.

StacktraceAddressSignature: /usr/bin/xeyes:11:x86_64:/lib/x86_64-linux-gnu/libc-2.15.so+e82c8:/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0+2d458:/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0+2edf3:/usr/lib/x86_64-linux-gnu/libXt.so.6.0.0+234bd:/usr/bin/xeyes+18e7:/lib/x86_64-linux-gnu/libc-2.15.so+2176d:/usr/bin/xeyes+195d:[stack]+1f718:[stack]+2032e

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

This bug was fixed in the package apport - 2.6.1-0ubuntu9

---------------
apport (2.6.1-0ubuntu9) quantal-proposed; urgency=low

  * Fix OSError crash in mark_report_upload(); regression from
    2.6.1-0ubuntu8.

apport (2.6.1-0ubuntu8) quantal-proposed; urgency=low

  * Ignore implausibly low addresses when computing
    StacktraceAddressSignature. These are usually artifacts from gdb when not
    having debug symbols, and having too many of them prevents proper
    client-side duplicate detection and proper bucketing in daisy.
    Backported from trunk r2541. (LP: #1084996)
  * mark_report_upload(): Refresh the .upload stamps if a previous version of
    the report was already uploaded, but another instance of the problem
    happened since then. Thanks Brian Murray. Backported from trunk r2540.
    (LP: #1084296)

apport (2.6.1-0ubuntu7) quantal-proposed; urgency=low

  * data/general-hooks/ubuntu.py: Deal with dpkg_log file being a string
    instead of bytes (LP: #1080915)
 -- Martin Pitt <email address hidden> Wed, 05 Dec 2012 10:16:00 +0000

Changed in apport (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Since precise verification is not done yet, I am going to add the fix for bug #1045986 and upload a new version for precise (this patch will be released in -security later today).

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Uploaded 2.0.1-0ubuntu17.1 with the hardening fix. Please test it instead.

Changed in apport (Ubuntu Precise):
status: Fix Committed → In Progress
tags: removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Note that the reuploaded precise package still needs to be reviewed and approved from the queue by the SRU team.

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Martin, or anyone else affected,

Accepted apport into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apport/2.0.1-0ubuntu17.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apport (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested apport version 2.0.1-0ubuntu17.1 from precise-proposed and verified that by xeyes crash does in fact have a StacktraceAddressSignature in it. I was also able to recreate the issue, no SAS in the crash report, using the apport version 2.0.1-0ubuntu15.1.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.0.1-0ubuntu17.1

---------------
apport (2.0.1-0ubuntu17.1) precise-proposed; urgency=low

  * bin/apport-bug: Explicitly set the PATH to that of ENV_SUPATH in
    /etc/login.defs and unset ENV and CDPATH. We need do this so that confined
    applications using ubuntu-browsers.d/ubuntu-integration cannot abuse the
    environment to escape AppArmor confinement via this script (LP: #1045986).

apport (2.0.1-0ubuntu17) precise-proposed; urgency=low

  * Fix OSError crash in mark_report_upload(); regression from
    2.0.1-0ubuntu16.

apport (2.0.1-0ubuntu16) precise-proposed; urgency=low

  * Ignore implausibly low addresses when computing
    StacktraceAddressSignature. These are usually artifacts from gdb when not
    having debug symbols, and having too many of them prevents proper
    client-side duplicate detection and proper bucketing in daisy.
    Backported from trunk r2541. (LP: #1084996)
  * mark_report_upload(): Refresh the .upload stamps if a previous version of
    the report was already uploaded, but another instance of the problem
    happened since then. Thanks Brian Murray. Backported from trunk r2540.
    (LP: #1084296)
 -- Jamie Strandboge <email address hidden> Mon, 17 Dec 2012 16:20:20 -0600

Changed in apport (Ubuntu Precise):
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.