Skip to content
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

runtime: android backtraces do not include go backtrace #25035

Open
zx2c4 opened this issue Apr 24, 2018 · 10 comments
Open

runtime: android backtraces do not include go backtrace #25035

zx2c4 opened this issue Apr 24, 2018 · 10 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Android
Milestone

Comments

@zx2c4
Copy link
Contributor

zx2c4 commented Apr 24, 2018

The android native backtrace always goes back to the abort() call, and does not include the more useful go backtrace. Therefore, in the Google Play Console, we're left with very unhelpful backtraces like:

image

It would be useful to have the backtrace here include information from Go's backtrace.

@ALTree
Copy link
Member

ALTree commented Apr 24, 2018

Possibly a dup of #22716?

@gwik
Copy link
Contributor

gwik commented Apr 24, 2018

@zx2c4 I added a comment to #22716 that relates to your problem.

@zx2c4
Copy link
Contributor Author

zx2c4 commented Apr 24, 2018

Not quite the same thing here.

@FiloSottile FiloSottile added OS-Android NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 24, 2018
@FiloSottile FiloSottile added this to the Unplanned milestone Apr 24, 2018
@FiloSottile
Copy link
Contributor

/cc @eliasnaur

@cmcewen
Copy link

cmcewen commented Feb 25, 2019

We are also having this issue. Any ideas on where to look to try and get more information?

screen shot 2019-02-25 at 10 53 54 am

@eliasnaur
Copy link
Contributor

Related: #28997

@ashishb
Copy link

ashishb commented Mar 5, 2019

@zx2c4 On Android, I was able to collect the stack traces as well as logcat logs immediately after the golang crash using https://github.com/ivanarh/jndcrash

This hopefully should be sufficient for you as well.

@alalamav
Copy link

I am also seeing this issue with a library built with gomobile. I was able to get a fully symbolicated stack trace in logcat by forcing a panic in the library. The stack trace is shown regardless of the linker flags used to build the binary (i.e. -ldflags '-s -w').

Is this an issue affecting all libraries built with NDK, or is it specific to gomobile? In other words, is it necessary to integrate a solution like the one described by @ashishb for the stack traces of (non-go) NDK libraries to show up in Google Play Console?

@ashishb
Copy link

ashishb commented May 22, 2019

@alalamav, IMHO, this is specific to gomobile.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
@zx2c4
Copy link
Contributor Author

zx2c4 commented Apr 15, 2023

I wonder if it'd be possible for the Go crash handler to synthesize a fake call stack using the native ABI before aborting so that the default Play Store reporter gets useful information. (I'm not super keen on adding additional telemetry to my app to phone that home elsewhere.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Android
Projects
None yet
Development

No branches or pull requests

9 participants