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

Questions about Symbol Resolution #1361

Open
Dhrumil-Sentry opened this issue Feb 6, 2024 · 1 comment
Open

Questions about Symbol Resolution #1361

Dhrumil-Sentry opened this issue Feb 6, 2024 · 1 comment

Comments

@Dhrumil-Sentry
Copy link

I got the following question from a partner:

Hello.

We've started sending envelopes to projects within an organization.
At this time, there are several issues with symbol resolution, so let me check.

We are trying to use a directory layout of the "ELF" and the "Platform-Specific" found in the Sentry documentation "Symbol Servers".
https://docs.sentry.io/platforms/native/data-management/debug-files/symbol-servers/

Our path rule is BuildID.
The reason we chose this is because symbol files we are using are ELF files that contain ID in the GNU BuildID format.

My understanding is that the resolution of symbol files by the directory layout is resolved by specifying elf in the Payload's Debug Meta type.
https://develop.sentry.dev/sdk/event-payloads/debugmeta/

When I created an envelope with such a payload and tried to send it, the following error occurred.

/work # sentry-cli --version
sentry-cli 2.27.0
/work # sentry-cli send-envelope 6ef9b5d41dbc4262a9fd8eece598ccf6.envelope
ERROR: invalid item payload
  suggested by: unknown variant `elf`, expected one of `apple`, `symbolic`, `proguard`, `wasm` at line 1 column 76243

Add --log-level= [info|debug] or export SENTRY_LOG_LEVEL= [info|debug] to see more output.
Please attach the full debug log to all bug reports.

I use sentry-cli of the latest version of getsentry/sentry-cli.
The content of debug_meta looks like this:

{
  "debug_meta": {
    "dk_info": {
      "dk_name": "nintendosdk",
      "version_major": 0,
      "version_minor": 0,
      "version_patchlevel": 0
    },
    "images": [
      {
        "type": "elf",
        "code_id": "B0A94A27A8EA158CF81FC9B83E9366E600000000",
        "image_addr": "0xe76e04000",
        "image_size": 37740544,
        "debug_id": "274aa9b0-eaa8-8c15-f81f-c9b83e9366e6",
        "debug_file": "D:\\ home\\ Project\\ App.nss",
        "arch": "arm64"
      },
      {
        "type": "elf",
        "code_id": "7040311F0662E3519CF01FDACA3641128CE4F305",
        "image_addr": "0xe79202000",
        "image_size": 7393280,
        "debug_id": "1f314070-6206-51e3-9cf0-1fdaca364112",
        "debug_file": "multimedia",
        "arch": "arm64"
      },
      {
        "type": "elf",
        "code_id": "230994ACC1EB0F13878D155361BEFF36EDD1B43",
        "image_addr": "0xe7990f000",
        "image_size": 19488768,
        "debug_id": "ac940923-ebc1-130f-878d-d155361beff3",
        "debug_file": "nnSDK",
        "arch": "arm64"
      },
      {
        "type": "elf",
        "code_id": "31A2773EA6928FFE3D32B17B3AD08F54826DA39F",
        "image_addr": "0xe76e00000",
        "image_size": 16384,
        "debug_id": "3e77a231-92a6-fe8f-3d32-b17b3ad08f54",
        "debug_file": "nnrtld",
        "arch": "arm64"
      }
    ]
  }
}

I changed this to symbolic and adjust a few items, I succeeded to send it.
However, it seems that symbol paths are resolved by LLDB rules for Mach-O directory layout.

What I want to check is the following.

  • Is debug_meta.type: elf discontinued?
  • The type called symbolic is not described in the documentation, but which rule is applied in the case of Platform-Specific?
  • My understand is there is basically no problem with the LLDB directory layout, but I'd like to know the specification about symbolic.
  • I also feel like it would be nice to set it to Unified Layout, but what do you think about this. (edited)
@Swatinem
Copy link
Member

Swatinem commented Feb 7, 2024

The debug_meta.type: elf is alive and well. The reason sentry-cli complains about it is that the parser definition that is used to validate these payloads is hopelessly outdated. You can use sentry-cli send-event --raw to avoid this parsing/validation step.

I would ignore the debug_meta.type: symbolic notation for now. Its possible that is does have some consequence on symbol lookup, but switching over to the proper type: elf should resolve that confusion as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants