Closed Bug 1632972 Opened 4 years ago Closed 4 years ago

shared-libraries-linux.cc does not emit a SharedLibrary for the firefox binary, causing missing symbols for mozjemalloc and other functions

Categories

(Core :: Gecko Profiler, defect, P2)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

(Whiteboard: [qa-77b-p2])

Attachments

(1 file)

STR:

  • Profile something. I have a profile that shows this issue in bug 1632469 comment 8. That's from a local build but it happens on official builds too.

  • Try to look on any of the jemalloc functions, so anything that goes under replace_malloc|free|moz_arena_malloc|....

ER:

  • See the symbols for the functions.

AR:

  • Only a bunch of addresses.

This indicates that shared-libraries-linux.cc is not able to find the address range for the library that contains these functions.

(In reply to Markus Stange [:mstange] from comment #1)

This indicates that shared-libraries-linux.cc is not able to find the address range for the library that contains these functions.

I don't get it, those are in libxul aren't they?

In the profile, libxul covers the address range 0x7fb3723b3000 - 0x7fb379fa5390, but the unsymbolicated addresses such as 0x55629110f8ce are before that range. Then maybe we sample incorrect addresses?

The allocator symbols are in firefox on linux. Depending what shared-libraries-linux.cc does, it might not see them.

Thanks!

Summary: Stacks for mozjemalloc don't have symbols. → shared-libraries-linux.cc does not emit a SharedLibrary for the firefox binary
Summary: shared-libraries-linux.cc does not emit a SharedLibrary for the firefox binary → shared-libraries-linux.cc does not emit a SharedLibrary for the firefox binary, causing missing symbols for mozjemalloc and other functions

Confirming it's only on Linux, as I could see the alloc functions on Mac and Windows.

OS: Unspecified → Linux
Priority: -- → P2

I'd like to poke at this, if I don't find the culprit I'll unassign myself.

Assignee: nobody → emilio

This is how my mapfile looks like:

5587df936000-5587df96b000 r--p 00000000 fd:02 21584889 /home/emilio/src/moz/gecko/obj-debug/dist/bin/firefox
5587df96b000-5587df9ec000 r-xp 00035000 fd:02 21584889 /home/emilio/src/moz/gecko/obj-debug/dist/bin/firefox
5587df9ec000-5587df9ed000 r--p 000b6000 fd:02 21584889 /home/emilio/src/moz/gecko/obj-debug/dist/bin/firefox
5587df9ed000-5587df9ee000 rw-p 000b7000 fd:02 21584889 /home/emilio/src/moz/gecko/obj-debug/dist/bin/firefox

Note how the executable bit, which is the only one we look at, and which
is where we get exeExeAddr from (0x5587df96b000 in this case) is in the
middle of the executable, but the library will span all four ranges.

Check for whether the library contains the start address of the
executable region instead of whether it starts with it.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47afa4ab35f8
Fix logic to detect the main executable. r=mstange
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Whiteboard: [qa-77b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: