-
Notifications
You must be signed in to change notification settings - Fork 240
Description
For golang binary which contains go.buildid.
readelf -x .note.go.buildid test
Hex dump of section '.note.go.buildid':
0x004002ac 04000000 53000000 04000000 476f0000 ....S.......Go..
0x004002bc 76557772 64357948 762d6a63 467a6171 vUwrd5yHv-jcFzaq
0x004002cc 3434456e 2f46345f 4e4f6261 78366f45 44En/F4_NObax6oE
0x004002dc 5f526241 51736b58 362f3854 2d4e5657 _RbAQskX6/8T-NVW
0x004002ec 2d724b75 38324b50 69796b6d 39362f67 -rKu82KPiykm96/g
0x004002fc 346d3648 63726653 6835354d 67626332 4m6HcrfSh55Mgbc2
0x0040030c 75303600 u06.
[root@ce0220-rn5h8-master-0 patches]# file test
test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, Go BuildID=vUwrd5yHv-jcFzaq44En/F4_NObax6oE_RbAQskX6/8T-NVW-rKu82KPiykm96/g4m6HcrfSh55Mgbc2u06, BuildID[sha1]=2f51739b0756706088f19824bdb09d8e7040bacf, with debug_info, not stripped
parca-debuginfo extract the buildid from go.buildid, not gnu.build-id.
[root@ce0220-rn5h8-master-0 patches]# ../../parca-debuginfo buildid test
7655777264357948762d6a63467a61713434456e2f46345f4e4f626178366f455f52624151736b58362f38542d4e56572d724b7538324b5069796b6d39362f67346d3648637266536835354d67626332753036
After uploading the symbols, the buildid is still go.buildid.
~ $ cat /var/lib/parca/debuginfo/7655777264357948762d6a63467a61713434456e2f46345f4e4f626178366f455f52624151736b58362f38542d4e56572d724b7538324b5069796b6d39362f67346d3
648637266536835354d67626332753036/metadata
{
"buildId": "7655777264357948762d6a63467a61713434456e2f46345f4e4f626178366f455f52624151736b58362f38542d4e56572d724b7538324b5069796b6d39362f67346d3648637266536835354d67626332753036",
"source": "SOURCE_UPLOAD",
"upload": {
"id": "fc3447e3-013a-4f1a-b73f-0a79764c3b18",
"hash": "dfb3ed64f5b44d9a",
"state": "STATE_UPLOADED",
"startedAt": "2025-01-13T06:54:44.811502385Z",
"finishedAt": "2025-01-13T06:54:45.005855855Z"
}
}
From debug logs, we can see symbolizer is using gnu buildid to fetch metadata.
level=debug name=parca ts=2025-01-14T05:23:51.059386412Z caller=symbolizer.go:139 component=symbolizer msg=symbolizing build_id=2f51739b0756706088f19824bdb09d8e7040bacf
level=debug name=parca ts=2025-01-14T05:23:51.059408045Z caller=symbolizer.go:129 component=symbolizer msg="failed to symbolize" err="get debuginfo: fetching metadata: debuginfo metadata not found"