Closed Bug 1981751 Opened 5 months ago Closed 5 months ago

[Android 5.1 / API 22 with ARM v7] Crash in [@ FileID::ElfClassBuildIDNoteIdentifier]

Categories

(Core :: Gecko Profiler, defect, P3)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- unaffected
firefox141 --- unaffected
firefox142 --- unaffected
firefox143 --- fixed

People

(Reporter: aryx, Assigned: canova)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

6 crash reports for Firefox for Android 143.0a1 with ARM v6, oldest build ID is 20250725093757

The crash stacks are corrupted.

Crash report: https://crash-stats.mozilla.org/report/index/d7bb6a9b-33d6-4394-b30b-b94a30250807

Reason:

SIGSEGV / SEGV_MAPERR

Top 8 frames:

0  libmozglue.so  FileID::ElfClassBuildIDNoteIdentifier(void const*, unsigned int, std::__ndk1:...  mozglue/baseprofiler/core/shared-libraries-linux.cc:369
0  libmozglue.so  dl_iterate_callback(dl_phdr_info*, unsigned int, void*)  mozglue/baseprofiler/core/shared-libraries-linux.cc:761
1  linker  linker@0x1385
2  libsentry.so  libsentry.so@0x32
3  libmozglue.so  SharedLibraryInfo::GetInfoForSelf()  mozglue/baseprofiler/core/shared-libraries-linux.cc:866
4  libmozglue.so  <.plt ELF section in libmozglue.so>
5  libmozglue.so  <.plt ELF section in libmozglue.so>
6  eglsubAndroid.so  eglsubAndroid.so@0x800e

Timing and stack look maybe related to bug 1867280?

Flags: needinfo?(canaltinova)

I guess we are dropping support for API 22 later this year, so eventually this won't be an issue. Maybe Nazim does have some quick ideas here though

Severity: -- → S3
Priority: -- → P3

Huh, that's weird. This is definitely a regression from bug 1773313. I think it's better to move this to the gecko profiler component.

I don't really have a quick fix to the crash, it normally should happen. It seems like some parts of the note section are not mapped correctly?

OTOH, you're right about API 22. Hopefully that will not be an issue soon.

Component: General → Gecko Profiler
Flags: needinfo?(canaltinova)
Keywords: regression
Product: GeckoView → Core
Regressed by: 1773313

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.

Priority: P3 → --

Set release status flags based on info from the regressing bug 1773313

Priority: -- → P3

I think this is caused by the custom linker passing null as the base address. For example we return null from SystemElf::GetBase

Yeah, it seems like you're right, thanks. I'm still unsure when we use SystemElf::GetBase though and if we should fix it too? But at least I have enough information to fix this issue.

Oh, it looks like we have a __wrap_dl_iterate_phdr here that we only use when the Android version is below 23. Apparently we are not using the custom linker when it's version 23 and above (bug 1291377). That explains why we are seeing this in version 22.

Skip entries with null base addresses in dl_iterate_callback to prevent
segmentation faults when SystemElf::GetBase() returns nullptr. This
prevents crashes on Android API 22 ARM where the custom linker can
pass null as the base address.

Assignee: nobody → canaltinova
Status: NEW → ASSIGNED
Pushed by canaltinova@gmail.com: https://github.com/mozilla-firefox/firefox/commit/5030bcac89e3 https://hg.mozilla.org/integration/autoland/rev/94cb1c6dab4c Fix crash in dl_iterate_callback when dlpi_addr is null r=mstange,profiler-reviewers
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
Regressions: 1984640
No longer regressions: 1984640
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: