Closed Bug 1330013 Opened 7 years ago Closed 7 years ago

Fix incorrect symbol file paths in Firefox Linux builds

Categories

(Toolkit :: Telemetry, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: gfritzsche, Assigned: yarik.sheptykin, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [measurement:client])

Attachments

(1 file)

Bug 1299773 ran into the issue that the symbol path from ... is "/home/<user>/firefox/libxul.so", but the symbol server expects it to be just "libxul.so".

This apparently happens with both the Ubuntu package and the official Mozilla Linux build.

The module information comes from MozStackWalk() here:
https://dxr.mozilla.org/mozilla-central/rev/7011ed1427de2b6f075c46cc6f4618d3e9fcd2a4/toolkit/components/telemetry/Telemetry.cpp#525

Then later we get the module paths here:
https://dxr.mozilla.org/mozilla-central/rev/7011ed1427de2b6f075c46cc6f4618d3e9fcd2a4/toolkit/components/telemetry/Telemetry.cpp#2928

So it seems we should either fix the profiler addon or do the path fixup on all platforms.
(In reply to Georg Fritzsche [:gfritzsche] from comment #0)
> So it seems we should either fix the profiler addon or do the path fixup on
> all platforms.

Gabriele, do you know about this and could advise? Or do you know who can?
Flags: needinfo?(gsvelto)
I'm not super-familiar with the profiler but for regular crashes symbols never use the absolute path for libxul.so (i.e., it's just libxul.so) so my gut feeling is that we should fix the profiler add-on. That being said Ted might know more so I'm needinfo'ing him too.
Flags: needinfo?(gsvelto) → needinfo?(ted)
I'm not totally sure about the profiler bits. I think for local builds it can pull symbols from the files on disk, so having the full path there makes sense. If it's sending requests to the snappy server then it definitely wants just the filename at that point.
Flags: needinfo?(ted)
Talking to mstange on IRC, the profiler is collecting stacks in "tools/profiler/core/GeckoSampler.cpp".
This uses `SharedLibraryInfo` and needs the full path for local developer builds.
So, we should leave `SharedLibraryInfo` alone.

We can however fixup the path in Telemetry.cpp for all platforms as the profiler is not affected by that.
Assignee: nobody → yarik.sheptykin
Mentor: gfritzsche
Comment on attachment 8825933 [details]
Bug 1330013: Correcting module names for captured stacks.

https://reviewboard.mozilla.org/r/103990/#review104858

::: toolkit/components/telemetry/Telemetry.cpp:2932
(Diff revision 1)
>  #ifdef MOZ_ENABLE_PROFILER_SPS
>    for (unsigned i = 0, n = rawModules.GetSize(); i != n; ++i) {
>      const SharedLibrary &info = rawModules.GetEntry(i);
>      const std::string &name = info.GetName();
>      std::string basename = name;
> -#ifdef XP_MACOSX
> +#if defined(XP_MACOSX) || defined(XP_LINUX)

We should check if Windows builds have the same problem.
Attachment #8825933 - Flags: review?(gfritzsche)
Comment on attachment 8825933 [details]
Bug 1330013: Correcting module names for captured stacks.

https://reviewboard.mozilla.org/r/103990/#review104862

::: toolkit/components/telemetry/Telemetry.cpp:2932
(Diff revision 1)
>  #ifdef MOZ_ENABLE_PROFILER_SPS
>    for (unsigned i = 0, n = rawModules.GetSize(); i != n; ++i) {
>      const SharedLibrary &info = rawModules.GetEntry(i);
>      const std::string &name = info.GetName();
>      std::string basename = name;
> -#ifdef XP_MACOSX
> +#if defined(XP_MACOSX) || defined(XP_LINUX)

Alessio confirmed that we don't see the same issue on Windows.
Attachment #8825933 - Flags: review+
Pushed by georg.fritzsche@googlemail.com:
https://hg.mozilla.org/integration/autoland/rev/7dd21e62c1f8
Correcting module names for captured stacks. r=gfritzsche
https://hg.mozilla.org/mozilla-central/rev/7dd21e62c1f8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: