Closed Bug 1505719 Opened 11 months ago Closed 11 months ago

Cannot resolve symbol table on Android since breakpad id is mismatched

Categories

(Core :: Gecko Profiler, defect)

ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: m_kato, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

After landing bug 1457481, profiler can read symbol table and returns it to perf-html.io.  But as long as I test this, my devices (xperia Z3 compact and pixel 2) cannot resolve local libraries such as libc.so.

When debugging this, get_compact_symbol_table in rust-helper/src/elf.rs always returns None since breakpad id is invalid.  Because Uuid::from_bytes doesn't consider endian.  So use Uuid::from_fields or consider endian to calculate buildpad id of local symbol.
or fix ElfFile.build_id.  But I don't know whether it is better yet.
I'm going to reinstate the previous code (maybe in a slightly simplified form) from https://d3kxowhw4s8amj.cloudfront.net/file/data/ajkadqiw5fidwcmfaxzy/PHID-FILE-bhbbx4sspaittejrx55v/D7021.id19147.diff

With libxul.so, I'm running into the endianness problem you mentioned.

With libESXGLESv2_adreno.so, I'm running into the problem that this binary does not even have a PT_NOTE for a NT_GNU_BUILD_ID; ElfFile::build_id() returns None. This only started happening after an OS update; with the previous OS version, libESXGLESv2_adreno.so *did have* a NT_GNU_BUILD_ID.
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Blocks: 1457481
Ted, I haven't forgotten your comment about using scroll for the endianness-swapping (you mentioned it at https://phabricator.services.mozilla.com/D7021?id=19147#inline-27653 ), but I looked at your code and didn't find it all that much clearer, so I stuck with the manual calls to reverse().
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/1f38344436a9
Try harder when computing breakpad IDs for Android system libraries. r=ted
https://hg.mozilla.org/mozilla-central/rev/1f38344436a9
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.