Skip to content

Commit

Permalink
Merge branch 'master' into ref/moka-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem authored Jan 30, 2023
2 parents 31187dc + 5763972 commit a60fc8d
Show file tree
Hide file tree
Showing 15 changed files with 135 additions and 28 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Added a field `adjust_instruction_addr: Option<bool>` to `RawFrame` to signal whether the
frame's instruction address needs to be adjusted for symbolication. ([#948](https://github.com/getsentry/symbolicator/pull/948))
- Added offline mode and caching to `symbolicli`. ([#967](https://github.com/getsentry/symbolicator/pull/967),[#968](https://github.com/getsentry/symbolicator/pull/968))
- Support PortablePDB embedded sources. ([#996](https://github.com/getsentry/symbolicator/pull/996))
- Use `moka` as an in-memory `Cacher` implementation. ([#979](https://github.com/getsentry/symbolicator/pull/979))

### Internal
Expand All @@ -19,9 +20,9 @@

### Dependencies

- Bump Native SDK from v0.5.0 to v0.5.3 ([#940](https://github.com/getsentry/symbolicator/pull/940))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#053)
- [diff](https://github.com/getsentry/sentry-native/compare/0.5.0...0.5.3)
- Bump Native SDK from v0.5.0 to v0.5.4 ([#940](https://github.com/getsentry/symbolicator/pull/940), [#997](https://github.com/getsentry/symbolicator/pull/997))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#054)
- [diff](https://github.com/getsentry/sentry-native/compare/0.5.0...0.5.4)

## 0.6.0

Expand Down
33 changes: 17 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/process-event/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ reqwest = { version = "0.11.0", features = ["blocking", "json", "multipart", "tr
serde = { version = "1.0.137", features = ["derive"] }
serde_json = "1.0.81"
structopt = "0.3.21"
symbolic-common = "10.0.0"
symbolic-common = "11.0.0"
2 changes: 1 addition & 1 deletion crates/symbolicator-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sentry = { version = "0.29.1", features = ["tracing"] }
serde = { version = "1.0.137", features = ["derive", "rc"] }
serde_json = "1.0.81"
serde_yaml = "0.9.14"
symbolic = { version = "10.2.1", features = ["cfi", "common-serde", "debuginfo", "demangle", "symcache", "il2cpp", "ppdb"] }
symbolic = { version = "11.0.0", features = ["cfi", "common-serde", "debuginfo", "demangle", "symcache", "il2cpp", "ppdb"] }
symbolicator-sources = { path = "../symbolicator-sources" }
tempfile = "3.2.0"
thiserror = "1.0.31"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
source: crates/symbolicator-service/tests/integration/symbolication.rs
assertion_line: 296
expression: response.unwrap()
---
stacktraces:
- frames:
- status: symbolicated
original_index: 0
addr_mode: "rel:0"
instruction_addr: "0x2f"
function_id: "0x5"
lang: csharp
filename: Program.cs
abs_path: "C:\\dev\\sentry-dotnet\\samples\\Sentry.Samples.Console.Basic\\Program.cs"
lineno: 13
pre_context:
- " o.Debug = true;"
- "});"
- ""
- // The following unhandled exception will be captured and sent to Sentry.
context_line: "throw new Exception(\"test\");"
modules:
- debug_status: found
features:
has_debug_info: true
has_unwind_info: false
has_symbols: false
has_sources: true
arch: unknown
type: pe_dotnet
debug_id: b6919861-510c-4887-9994-943f64f70c37-870b9ef9
debug_file: portable-embedded.pdb
image_addr: "0x0"
candidates:
- source: local
location: "http://localhost:<port>/symbols/portable-embedded.pdb/B6919861510C48879994943F64F70C37870b9ef9/portable-embedded.src.zip"
download:
status: notfound
- source: local
location: "http://localhost:<port>/symbols/portable-embedded.pdb/B6919861510C48879994943F64F70C37ffffffff/portable-embedded.pdb"
download:
status: ok
features:
has_debug_info: true
has_unwind_info: false
has_symbols: false
has_sources: true
debug:
status: ok
- source: local
location: "http://localhost:<port>/symbols/portable-embedded.pdb/B6919861510C48879994943F64F70C37ffffffff/portable-embedded.src.zip"
download:
status: notfound

Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,8 @@ modules:
location: "http://localhost:<port>/symbols/bd/a18fd85d4a4eb893022d6bfad846b1.src.zip"
download:
status: notfound
- source: local
location: "http://localhost:<port>/symbols/demo.wasm/BDA18FD85D4A4EB893022D6BFAD846B10/demo.wasm"
download:
status: notfound

39 changes: 39 additions & 0 deletions crates/symbolicator-service/tests/integration/symbolication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,42 @@ async fn test_dotnet_integration() {

assert_snapshot!(response.unwrap());
}

#[tokio::test]
async fn test_dotnet_embedded_sources() {
let (symbolication, _cache_dir) = setup_service(|_| ());
let (_srv, source) = test::symbol_server();

let modules: Vec<RawObjectInfo> = serde_json::from_str(
r#"[{
"type":"pe_dotnet",
"debug_file":"portable-embedded.pdb",
"debug_id":"b6919861-510c-4887-9994-943f64f70c37-870b9ef9"
}]"#,
)
.unwrap();

let stacktraces = serde_json::from_str(
r#"[{
"frames":[{
"instruction_addr": 47,
"function_id": 5,
"addr_mode":"rel:0"
}]
}]"#,
)
.unwrap();

let request = SymbolicateStacktraces {
modules: modules.into_iter().map(From::from).collect(),
stacktraces,
signal: None,
origin: StacktraceOrigin::Symbolicate,
sources: Arc::new([source]),
scope: Default::default(),
};

let response = symbolication.symbolicate(request).await;

assert_snapshot!(response.unwrap());
}
2 changes: 1 addition & 1 deletion crates/symbolicator-sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ aws-types = { version = "0.52.0", features = ["hardcoded-credentials"] }
glob = "0.3.0"
lazy_static = "1.4.0"
serde = { version = "1.0.137", features = ["derive", "rc"] }
symbolic = "10.0.0"
symbolic = "11.0.0"
url = { version = "2.2.0", features = ["serde"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/symbolicator-sources/src/filetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl FileType {
/// Source providing file types.
#[inline]
pub fn sources() -> &'static [Self] {
&[FileType::SourceBundle]
&[FileType::SourceBundle, FileType::PortablePdb]
}

/// Given an object type, returns filetypes in the order they should be tried.
Expand Down
2 changes: 1 addition & 1 deletion crates/symbolicator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sentry = { version = "0.29.1", features = ["anyhow", "debug-images", "tracing",
serde = { version = "1.0.137", features = ["derive", "rc"] }
serde_json = "1.0.81"
structopt = "0.3.21"
symbolic = "10.0.0"
symbolic = "11.0.0"
symbolicator-crash = { path = "../symbolicator-crash", optional = true }
symbolicator-service = { path = "../symbolicator-service" }
symbolicator-sources = { path = "../symbolicator-sources" }
Expand Down
2 changes: 1 addition & 1 deletion crates/symbolicli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ reqwest = { version = "0.11.12", features = ["json"] }
serde = { version = "1.0.137", features = ["derive", "rc"] }
serde_json = "1.0.81"
serde_yaml = "0.9.14"
symbolic = "10.1.2"
symbolic = "11.0.0"
symbolicator-service = { version = "0.6.0", path = "../symbolicator-service" }
symbolicator-sources = { version = "0.6.0", path = "../symbolicator-sources" }
tempfile = "3.3.0"
Expand Down
9 changes: 8 additions & 1 deletion crates/symbolicli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ The available options are:
* `project`: The default project for which to process events. This can be overridden with the `--project`
command line option.
* `sources`: A list of debug file sources that will be queried in addition to the project's uploaded
files.
files.

# Logging
You can enable logging by setting the `RUST_LOG` environment variable to the desired log level. Available levels
are `error`, `warn`, `info`, `debug`, `trace`.
```
RUST_LOG=debug symbolicli […]
```
2 changes: 1 addition & 1 deletion crates/symsorter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ regex = "1.5.5"
serde = { version = "1.0.137", features = ["derive"] }
serde_json = "1.0.81"
structopt = "0.3.21"
symbolic = { version = "10.0.0", features = ["debuginfo-serde"] }
symbolic = { version = "11.0.0", features = ["debuginfo-serde"] }
walkdir = "2.3.1"
# NOTE: zip:0.6 by default depends on a version of zstd which conflicts with our other dependencies
zip = { version = "0.6.2", default-features = false, features = ["deflate", "bzip2"] }
Expand Down
Binary file not shown.

0 comments on commit a60fc8d

Please sign in to comment.