Re: How to get pretty stack trace on Linux?
On 10/14/2017 12:29 AM, Masayuki Nakano wrote: Ted, really sorry for the delay to say "Thank you" because of too busy of my life. I tried to do this on my environment (Ubuntu), then, I succeeded to get a pretty stack trace even from trysever build. 1. Put |#include "nsTraceRefcnt.h"| and |nsTraceRefcnt::WalkTheStack(stderr);| where I want to get stack trace. 2. Post it to tryserver. 3. Get Linux build from "B" of "target.tar.bz2" in treeherder. 4. Get build symbols from "B" of "target.crashreporter-symbols.zip" in treeherder. 5. Then, extract all of them. 6. Run the tryserver build from terminal. 7. Save stack trace to a text file. 8. Run |/tools/rb/fix_linux_stack.py < stack.txt| #8 runs in the directory which target.crashreporter-symbols.zip is unzipped. -- Masayuki NakanoSoftware Engineer, Mozilla ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: How to get pretty stack trace on Linux?
Ted, really sorry for the delay to say "Thank you" because of too busy of my life. I tried to do this on my environment (Ubuntu), then, I succeeded to get a pretty stack trace even from trysever build. 1. Put |#include "nsTraceRefcnt.h"| and |nsTraceRefcnt::WalkTheStack(stderr);| where I want to get stack trace. 2. Post it to tryserver. 3. Get Linux build from "B" of "target.tar.bz2" in treeherder. 4. Get build symbols from "B" of "target.crashreporter-symbols.zip" in treeherder. 5. Then, extract all of them. 6. Run the tryserver build from terminal. 7. Save stack trace to a text file. 8. Run |/tools/rb/fix_linux_stack.py < stack.txt| Thank you very much! On 9/22/2017 9:55 AM, Ted Mielczarek wrote: On Thu, Sep 21, 2017, at 08:51 PM, Masayuki Nakano wrote: I'd like to get pretty stack trance which shows method names rather than only address with tryserver build on Linux. However, nsTraceRefcnt::WalkTheStack() cannot get method names on Linux as you know. The reason why I need to get it is, I have a bug report which depends on the environment and I cannot reproduce it on my any environments. Therefore, I'd like the reporter to log the stack trace when it occurs with MOZ_LOG. My questions are, how to or is it possible to get pretty stack trace on Linux with MOZ_LOG? And/or do you have better idea to get similar information to check which path causes a bug. If it's impossible, I'll create a tryserver build with each ancestor caller logs the path, though. Hi Masayuki, Our test harnesses accomplish this by piping the output of Firefox through one of the stack fixing scripts in tools/rb[1]. fix_linux_stack.py uses addr2line, which should at least give you function symbols on Nightly. You could use my GDB symbol server script[2] to fetch the actual debug symbols from the symbol server if you want full source line information. Regards, -Ted 1. https://dxr.mozilla.org/mozilla-central/source/tools/rb 2. https://gist.github.com/luser/193572147c401c8a965c ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform -- Masayuki NakanoSoftware Engineer, Mozilla ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: How to get pretty stack trace on Linux?
On Thu, Sep 21, 2017, at 08:51 PM, Masayuki Nakano wrote: > I'd like to get pretty stack trance which shows method names rather than > only address with tryserver build on Linux. However, > nsTraceRefcnt::WalkTheStack() cannot get method names on Linux as you > know. > > The reason why I need to get it is, I have a bug report which depends on > the environment and I cannot reproduce it on my any environments. > Therefore, I'd like the reporter to log the stack trace when it occurs > with MOZ_LOG. > > My questions are, how to or is it possible to get pretty stack trace on > Linux with MOZ_LOG? And/or do you have better idea to get similar > information to check which path causes a bug. > > If it's impossible, I'll create a tryserver build with each ancestor > caller logs the path, though. Hi Masayuki, Our test harnesses accomplish this by piping the output of Firefox through one of the stack fixing scripts in tools/rb[1]. fix_linux_stack.py uses addr2line, which should at least give you function symbols on Nightly. You could use my GDB symbol server script[2] to fetch the actual debug symbols from the symbol server if you want full source line information. Regards, -Ted 1. https://dxr.mozilla.org/mozilla-central/source/tools/rb 2. https://gist.github.com/luser/193572147c401c8a965c ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
How to get pretty stack trace on Linux?
I'd like to get pretty stack trance which shows method names rather than only address with tryserver build on Linux. However, nsTraceRefcnt::WalkTheStack() cannot get method names on Linux as you know. The reason why I need to get it is, I have a bug report which depends on the environment and I cannot reproduce it on my any environments. Therefore, I'd like the reporter to log the stack trace when it occurs with MOZ_LOG. My questions are, how to or is it possible to get pretty stack trace on Linux with MOZ_LOG? And/or do you have better idea to get similar information to check which path causes a bug. If it's impossible, I'll create a tryserver build with each ancestor caller logs the path, though. Thanks in advance. -- Masayuki NakanoSoftware Engineer, Mozilla ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform