-
-
Notifications
You must be signed in to change notification settings - Fork 163
Not sending the application binary debug meta image info #767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting this, we'll take a look soon. |
@lfdominguez It would be helpful if you could provide more information on your platform (OS, kernel version, architecture) to understand when this happens. |
Thanks for response, I will check the OS:
Arch: amd64 |
Hi, tested the Cargo.tom: [package]
name = "test-shlib"
version = "0.1.0"
edition = "2021"
[dependencies]
findshlibs = "0.10.2" main.rs use findshlibs::{Segment, SharedLibrary, TargetSharedLibrary};
fn main() {
TargetSharedLibrary::each(|shlib| {
println!("{}", shlib.name().to_string_lossy());
for seg in shlib.segments() {
println!(" {}: segment {}",
seg.actual_virtual_memory_address(shlib),
seg.name().to_string());
}
});
} Result: |
Now i will try using the same code found here on https://github.com/getsentry/sentry-rust/blob/6401cfc9dc2917bc61882c571ee8970c07939b9b/sentry-debug-images/src/images.rs |
Thanks @lfdominguez for all the context. |
From the last screenshot you sent it looks like the If that function works, then the images are also going to be sent to Sentry, as the SDK just uses that function and sends whatever is returned along. before_send: Some(Arc::new(|event| {
dbg!(&event); // or println
Some(event)
})), And inspecting the payload. |
I will try this, to check that is sending the right event, thanks |
Humm this is really strange, now it's working, sending the right image of my app. Let me check deployed on production server to see if environment change and get the wrong event. |
I need to check later if the problem is Nix itself, because when you compile something with nix, it's use patchelf to link directly the dependencies, maybe there is the problem |
It could be, the first thing I would check is just |
@lcian found finally a reproducible case, I created the production docker image of my app, printing the But activated the sentry events and on logs, sentry is not sending my app binary: At the same execution |
Thanks for the thorough testing 🙏 |
We're not excluding any of the images found by static DEBUG_META: Lazy<DebugMeta> = Lazy::new(|| DebugMeta {
images: crate::debug_images(),
..Default::default()
}); The only possibility is that when this I'm assuming you're currently checking with a panic, right? |
Hi, nop i was testing in this case with a |
Results: fn main() -> anyhow::Result<()> {
let orig_hook = panic::take_hook();
panic::set_hook(Box::new(move |panic_info| {
// invoke the default handler and exit the process
orig_hook(panic_info);
process::exit(1);
}));
let sentry_dsn = Dsn::from_str(&globals::APP.config.sentry.sentry_dsn.clone());
if sentry_dsn.is_err() {
tracing::error!("Malformed Sentry DSN URI");
}
let sentry = sentry::init(sentry::ClientOptions {
release: sentry::release_name!(),
auto_session_tracking: true,
traces_sample_rate: 0.1,
attach_stacktrace: true,
session_mode: sentry::SessionMode::Request,
debug: false,
// For debug event sent to sentry
before_send: Some(Arc::new(|event| {
dbg!(&event); // or println
Some(event)
})),
dsn: sentry_dsn.ok(),
..Default::default()
});
TargetSharedLibrary::each(|shlib| {
println!("{}", shlib.name().to_string_lossy());
for seg in shlib.segments() {
println!(" {}: segment {}",
seg.actual_virtual_memory_address(shlib),
seg.name().to_string());
}
});
sentry::capture_message("Testing libs", Level::Error);
return Ok(());
} And same behavior, But the event missing that one: |
I'm not entirely sure what's happening but I think this might fix it #773. |
Testing |
Bad news, not working, using this:
I will do something, I will put a debug build inside the docker image and add a gdb, then I will run the gdb in remote mode and control from my IDE to debug directly to check where is losing this entry. |
@lcian I will close this issue (thanks for all the investigation and support from your side) because at the end is not a
[build]
rustflags = [ "-Clink-args=-Wl,--build-id" ] |
Hey @lfdominguez, thank you so much for all the help and cooperation from your side. |
Environment
Version: 0.36
Features: anyhow debug-images
Steps to Reproduce
upload-dif
) the application debug info to sentryExpected Result
On the Stack Trace of the Issue show the debug information, like line code, etc.
Actual Result
Already opened an issue on getsentry/sentry#88294 referring to this problem, but there detected that sentry-rust is not sending all the required debug meta images:
It's only sending the native library info, but is missing the binary of the program itself, so without that info sentry can't relate the debug info with each frame.
The text was updated successfully, but these errors were encountered: