Skip to content

Conversation

mitsuhiko
Copy link
Contributor

This is still work in progress but the idea is to move all system symbol lookup into the database. Right now it uses the main database but i want to split this up and maybe later move it into a webservice.

  • verify database layout
  • add support for fuzzy matching on binaries when uuids are not found
  • bump symsynd requirement

Potential improvements for later are to look up multiple symbols at once but that would work best with a stored procedure.

@codecov-io
Copy link

Current coverage is 82.31%

Merging #3022 into master will decrease coverage by -0.33% as of cc45369

@@            master   #3022   diff @@
======================================
  Files          931     932     +1
  Stmts        36397   36643   +246
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit          30079   30162    +83
  Partial          0       0       
- Missed        6318    6481   +163

Review entire Coverage Diff as of cc45369

Powered by Codecov. Updated on successful CI builds.

from sentry.lang.native.dsymcache import dsymcache


def find_system_symbol(img, instruction_addr):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this O(n) for number of frames? with a RT to database? Possibly two queries per frame.

@mitsuhiko
Copy link
Contributor Author

I will try to play with splitting the sentry_dsymsymbol into two tables because lots of symbols are reused but at different addresses. That might cut down storage quite a bit.

@mitsuhiko
Copy link
Contributor Author

Splitting up the symbols into just the strings and then referencing them from elsewhere does not appear to be a great storage saver. The various indexes get huge in total. I will try a full import over night to see if with more data it improves though.

@mitsuhiko
Copy link
Contributor Author

@getsentry/api I will aim for getting this in for getsentry by EOW. So probably friday the last. If it's bad, we can easily back it out. The old code runs in addition for now. I will set up a router in a new pull request on getsentry that moves it to a separate DB if we need to.

I want to push this out asap because i need to get some other support in (tvos and code) and i don't want to have to do that with the system symbol code path.

@mitsuhiko
Copy link
Contributor Author

@getsentry/api This is ready for merge as far as I'm concerend. It does not yet remove the other branch for system symbols so we can slowly upload the preprocessed ones.

I also want to do those things after this is merged:

  • if needed route them to a different database for getsentry
  • upload the processed symbols to getsentry

sdk_name = SDK_MAPPING[info['system_name']]
system_version = tuple(int(x) for x in (
info['system_version'] + '.0' * 3).split('.')[:3])
except LookupError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL LookupError

@mitsuhiko
Copy link
Contributor Author

I'm just going to kill the preparing now since that only worked on postgres anyways and just give up with trying to optimize this. Too much of a hassle with also making it idempotent and not really worth the effort. We don't import often enough.

@getsentry/api going to merge and deploy this tomorrow.

@mitsuhiko mitsuhiko force-pushed the feature/system-symbol-db branch from 2825f6b to 0287a7a Compare April 19, 2016 14:25
@mitsuhiko
Copy link
Contributor Author

This is ready to merge from where I'm standing.

@getsentry/api does anyone want to do a second look over the migrations before I merge this?

@mitsuhiko mitsuhiko force-pushed the feature/system-symbol-db branch from 7ddcaf6 to cc45369 Compare April 19, 2016 17:17
@mitsuhiko mitsuhiko merged commit cc45369 into master Apr 19, 2016
@mattrobenolt mattrobenolt deleted the feature/system-symbol-db branch June 3, 2016 18:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants