Ejemplo n.º 1
0
def breakpad_decode(crash, app_db, version):
    trace_dir = paths.trace_dir_path(app_db)
    outfilepath = paths.trace_out_path(app_db, crash)
    errfilepath = paths.trace_err_path(app_db, crash)

    # make sure trace_dir exists
    makedirs(s3.localpath(trace_dir), exist_ok=True)

    minidump_path = paths.minidump_path(app_db, crash)
    lib_path = paths.lib_extract_dir_path(app_db, version)
    symbols_path = os.path.join(lib_path, 'symbols')
    lib_tar_path = paths.lib_tar_path(app_db, version)

    s3.get(minidump_path)
    if not os.path.exists(s3.localpath(symbols_path)):
        # pull from s3 and untar
        s3.get(lib_tar_path)
        breakpad_extract_syms(s3.localpath(lib_tar_path),
                              s3.localpath(lib_path))

    p = 1
    with open(s3.localpath(outfilepath), 'wb') as outfile:
        with open(s3.localpath(errfilepath), 'wb') as errfile:
            p = subprocess.call([
                    MINIDUMP_STACKWALK_EXEC,
                    s3.localpath(minidump_path),
                    s3.localpath(symbols_path),
                    ], stdout=outfile, stderr=errfile)

    s3.put_file(outfilepath)
    return p or parse_trace(s3.localpath(outfilepath), crash, app_db)
Ejemplo n.º 2
0
def breakpad_decode(crash, app_db, version):
    trace_dir = paths.trace_dir_path(app_db)
    outfilepath = paths.trace_out_path(app_db, crash)
    errfilepath = paths.trace_err_path(app_db, crash)

    # make sure trace_dir exists
    makedirs(s3.localpath(trace_dir), exist_ok=True)

    minidump_path = paths.minidump_path(app_db, crash)
    lib_path = paths.lib_extract_dir_path(app_db, version)
    symbols_path = os.path.join(lib_path, 'symbols')
    lib_tar_path = paths.lib_tar_path(app_db, version)

    s3.get(minidump_path)
    if not os.path.exists(s3.localpath(symbols_path)):
        # pull from s3 and untar
        s3.get(lib_tar_path)
        breakpad_extract_syms(s3.localpath(lib_tar_path),
                              s3.localpath(lib_path))

    p = 1
    with open(s3.localpath(outfilepath), 'wb') as outfile:
        with open(s3.localpath(errfilepath), 'wb') as errfile:
            p = subprocess.call([
                MINIDUMP_STACKWALK_EXEC,
                s3.localpath(minidump_path),
                s3.localpath(symbols_path),
            ],
                                stdout=outfile,
                                stderr=errfile)

    s3.put_file(outfilepath)
    return p or parse_trace(s3.localpath(outfilepath), crash, app_db)
Ejemplo n.º 3
0
def save_minidump(app_db, crash, content):
    s3.put(paths.minidump_path(app_db, crash), content)
Ejemplo n.º 4
0
def save_minidump(app_db, crash, content):
    s3.put(paths.minidump_path(app_db, crash), content)