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)
Example #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)
def save_lib(app_db, content, version):
    lib_path = paths.lib_tar_path(app_db, version)
    extract_path = paths.lib_extract_dir_path(app_db, version)
    # upload to s3
    s3.put(lib_path, content)
    # extract syms
    breakpad_extract_syms.delay(s3.localpath(lib_path), s3.localpath(extract_path))
    return 0
Example #4
0
def save_lib(app_db, content, version):
    lib_path = paths.lib_tar_path(app_db, version)
    extract_path = paths.lib_extract_dir_path(app_db, version)
    # upload to s3
    s3.put(lib_path, content)
    # extract syms
    breakpad_extract_syms.delay(s3.localpath(lib_path),
                                s3.localpath(extract_path))
    return 0