Skip to main content

DEPRECATED: Get crash signature from Firefox crash ping

Project description

DEPRECATED: fx-crash-sig

Project status

This project is deprecated as of October 8th, 2024.

https://github.com/mozilla-services/fx-crash-sig/issues/111

The fx-crash-sig library was initially created as part of a summer internship project to look at symbolicating and generating signatures for crash pings. It evolved past that project in a few spurts as it was getting used in different ways.

This project has become difficult to maintain. There isn't much of a test suite. The API isn't conductive to symbolicating crash pings at scale. We don't have time to improve these issues.

Given that, we're deprecating this library. We won't be maintaining it going forward.

If you use this library, we encourage you to replace fx-crash-sig code with:

  1. symbolication calls:
  2. signature generation:

Project

Symbolicates crash pings and generates signatures.

Take crash ping stack traces and:

  1. Use Mozilla Symbolication Service symbolication to symbolicate crash ping stack traces
  2. Use socorro-siggen library to generate a crash signature

Project details:

Install (from PyPI)

pip install fx-crash-sig

Usage

Example script:

import json

from fx_crash_sig.crash_processor import CrashProcessor

with open("crashping.json") as fp:
    crash_ping = json.load(fp)

crash_processor = CrashProcessor()

signature_result = crash_processor.get_signature(crash_ping)
print(signature_result.signature)

Command line (using sample.json):

cat sample.json | fx-crash-sig

Run this for more command line help:

fx-crash-sig --help

Minimal crash ping structure

The legacy crash ping (the pingsender one--not the glean one) is documented here:

https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/data/crash-ping.html

These are the parts of the legacy crash ping we use:

- normalized_os                (optional)
- payload:
  - metadata:
    - async_shutdown_timeout   (optional)
    - ipc_channel_error        (optional)
    - oom_allocation_size      (optional)
    - moz_crash_reason         (optional)
  - stack_traces:
    - crash_info:
      - crashing_thread
      - type
    - modules[]
      - debug_file
      - debug_id
      - filename
      - base_addr
    - threads[]
      - frames[]
         - ip
         - module_index
         - trust

API

fx_crash_sig.crash_processor

  • CrashProcessor: symbolicates and generates signatures for legacy crash pings
    • __init__
      • arg: max_frames: int (40)
      • arg: api_url: str (https://symbolication.services.mozilla.com/symbolicate/v5)
      • arg: verbose: bool
    • get_signature: Takes a crash ping structure, symbolicates it using Mozilla Symbolication Service, generates a signature, and returns the signature result.
      • signature
        • arg: crash_ping: dict
        • returns: siggen.generator.Result
    • symbolicate: Symbolicates the stack traces in a crash ping structure payload.
      • signature
        • arg: crash_ping: dict
        • returns: symbolicated stack traces
    • get_signature_from_symbolicated: Takes the output of symbolicate, generates a signature, and returns the signature result.
      • signature
        • arg: symbolicated: dict
        • returns: siggen.generator.Result

fx_crash_sig.symbolicate

  • Symbolicator: symbolicates stack traces
    • __init__
      • arg: max_frames: int (40)
      • arg: api_url: str (https://symbolication.services.mozilla.com/symbolicate/v5)
      • arg: verbose: bool
    • symbolicate: Symbolicates a single stack trace.
      • arg: stack_trace: dict
      • returns: symbolicated stack trace
    • symbolicate_multi: Symbolicates a list of stack traces.
      • arg: stack_traces: list of dicts
      • returns: list of symbolicated traces

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fx_crash_sig-1.0.3.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

fx_crash_sig-1.0.3-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file fx_crash_sig-1.0.3.tar.gz.

File metadata

  • Download URL: fx_crash_sig-1.0.3.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for fx_crash_sig-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ca40aae072e4c6b41909c524796fed6f0e578eff59cd7060b88dc79e43228fdd
MD5 e7140c6e39e92218263d51d9d5fd83b5
BLAKE2b-256 47ea420abbda053cacc5598a7743f7375d1f65124992ea625802754f744d0833

See more details on using hashes here.

File details

Details for the file fx_crash_sig-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: fx_crash_sig-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 36.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for fx_crash_sig-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f860bf3c6416ac944a3387beccf283624df365563e21d584f4a6c3e0cd12fdf5
MD5 6e18f58fdb44c8fb812cc636873db6b0
BLAKE2b-256 12b1d149935af7a58155d185bdc43dfa62fe922d15d2e8b03f8f3c91938bc903

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page