Investigate lack of line numbers on some lines on tbpl Valgrind logs

VERIFIED FIXED in Firefox 18

Status

Testing
General
VERIFIED FIXED
6 years ago
5 years ago

People

(Reporter: gkw, Assigned: gkw)

Tracking

Trunk
mozilla18
All
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox18 fixed)

Details

(Whiteboard: [valgrind])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
In https://tbpl.mozilla.org/php/getParsedLog.php?id=15457865&tree=Firefox&full=1 there is a lack of line numbers in Valgrind stacks.

e.g.

==4706== 1,176 bytes in 3 blocks are definitely lost in loss record 14,535 of 15,441
==4706==    at 0x4C28A49: malloc (vg_replace_malloc.c:270)
==4706==    by 0x73FFFA5: moz_xmalloc (in /builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libmozalloc.so)
==4706==    by 0x866CB14: xpc_CreateGlobalObject(JSContext*, JSClass*, nsIPrincipal*, nsISupports*, bool, JSObject**, JSCompartment**) (in /builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so)
==4706==    by 0x869C6A8: XPCWrappedNative::WrapNewGlobal(XPCCallContext&, xpcObjectHelper&, nsIPrincipal*, bool, XPCWrappedNative**) (in /builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so)

/snip

shows a line number for the first line but not for the lines after.

Locally built Valgrind-enabled js shells, for example, have line numbers on all lines on Valgrind stacks: https://bugzilla.mozilla.org/attachment.cgi?id=658314
(Assignee)

Updated

6 years ago
Summary: Investigate lack of line numbers on some lines in Valgrind logs → Investigate lack of line numbers on some lines on tbpl Valgrind logs
(Assignee)

Comment 1

6 years ago
Julian, any ideas for Releng to followup about the lack of line numbers? Nobody (incl. njn, khuey and I) on #developers had any clue.
(Assignee)

Comment 2

6 years ago
philor suggests moving to Testing: General
Component: Release Engineering: Automation (General) → General
Product: mozilla.org → Testing
QA Contact: catlee
Version: other → Trunk
(Assignee)

Updated

6 years ago
OS: All → Linux
<glandium>	sewardj: i think the question is essentially, on what is valgrind being run. if it's run on the final stripped binaries, then it's not surprising that line info is not there
<glandium>	sewardj: actually, i think it's being run on the normal test suites, so this means it uses the final stripped binaries, unless we force not to strip, which is probably what is missing

The 'make package' at  
 http://hg.mozilla.org/build/tools/file/default/scripts/valgrind/valgrind.sh#l68
strips the binaries in dist/firefox. Using PKG_SKIP_STRIP=1 on that call might be an option, depending on why make package is being used.
The valgrind jobs do their own builds, so we should be able to get them to not strip. The code that does the build/test is here: http://hg.mozilla.org/build/tools/file/d21da1c08036/scripts/valgrind/valgrind.sh
(Assignee)

Comment 5

6 years ago
This means that we should just append "--disable-install-strip" to MOZCONFIG env variable of this line?

MOZCONFIG=../src/browser/config/mozconfigs/linux${_arch}/valgrind make -f ../src/client.mk configure || exit 2

(it got changed here: http://hg.mozilla.org/build/tools/rev/29961f8da532 )
(In reply to Chris AtLee [:catlee] from comment #4)
http://hg.mozilla.org/build/tools/file/d21da1c08036/scripts/valgrind/valgrind.sh#l60

60: debugger_args="--error-exitcode=1 --smc-check=all --gen-suppressions=all"

Better to use --smc-check=all-non-file; it gives somewhat smaller overhead.
(In reply to Chris AtLee [:catlee] from comment #4)

IIUC, the mozconfig that gets used is the one created by
http://hg.mozilla.org/build/tools/file/default/scripts/valgrind/valgrind.sh

If that's the case, we need to add

ac_add_options --enable-debug-symbols
ac_add_options --enable-optimize="-g -O"

At least, that's what I do and it gets pretty reasonable results.
Note that valgrinding code compiled at -O0 is an huge CPU time waster,
and -O (viz, -O1) gives pretty good results much faster.
(Assignee)

Comment 10

6 years ago
Created attachment 664149 [details] [diff] [review]
patch to add --disable-install-strip
Assignee: nobody → gary
Status: NEW → ASSIGNED
Attachment #664149 - Flags: review?(ted.mielczarek)
Attachment #664149 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 11

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/584119bf249d
status-firefox18: --- → fixed
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/584119bf249d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
(Assignee)

Comment 13

5 years ago
tbpl Valgrind logs now have line numbers. -> VERIFIED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.