Skip to content

rhelmer/symbolapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Symbolapi is a Web server for symbolicating Firefox stacks. It matches PC addresses to modules in memory and looks up the corresponding function names in server-side symbol files (.SYM files).

If you're interested in setting up local symbols for use with the Gecko profiler for Firefox, the following page will be useful to you: Profiling with the Built in Profiler and Local Symbols on Windows

This project is inspired by the Snappy Symbolication Server and is intended as a drop-in replacement.

Building and Running

Symbolapi is written in Rust and uses Cargo. Make sure you have the latest stable version of Rust installed from Rust's install page:

  cargo build

You can then run the symbolapi server:

  cargo run

Symbolapi listens on all interfaces and port 5000 by default. The port can be changed using the $PORT environment variable.

Configuration

Symbolapi configuration is read from ./config/symbolapi.toml, and logging can be configured in ./config/log.toml.

Testing

Test data is provided in the ./testdata directory. For instance, to post a single DLL and address you can use curl:

  curl -d @testdata/smallreal.json localhost:5000

Assuming this symbol is present on S3, it should return something like the following:

  {"symbolicatedStacks":[["__CppXcptFilter (in mozalloc.pdb)"]],"knownModules":[true]}

Deploying on Ubuntu using Nginx

Build a deployable binary:

  sudo apt-get install libssl-dev gcc git
  git clone https://github.com/rhelmer/symbolapi.git
  cd symbolapi
  cargo build --release

This produces a build in ./target/release/symbolapi that can be deployed to your server.

Copy the symbolapi binary to your server, and run it under a supervisor process (systemd, init script, etc - or tmux in a pinch).

On the server, install and configure Nginx:

  sudo apt-get install nginx

Override the default location in the default site in /etc/nginx/sites-available/default:

       location / {
                proxy_pass   http://127.0.0.1:5000;
        }

Now restart nginx:

  sudo service nginx restart

Deploying to Heroku

Create the app endpoint:

  # TODO can go back to using emk's buildpack when
  # https://github.com/emk/heroku-buildpack-rust/pull/7 lands
  heroku create symbolapi --buildpack https://github.com/rhelmer/heroku-buildpack-rust.git

Deploy:

$ git push heroku master

About

symbolapi.m.o backend for Gecko profiler, written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages