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.
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.
Symbolapi configuration is read from ./config/symbolapi.toml
, and logging can be configured in ./config/log.toml
.
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]}
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
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