Closed Bug 793551 Opened 12 years ago Closed 12 years ago

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

Categories

(Testing :: General, defect)

All
Linux
defect
Not set
normal

Tracking

(firefox18 fixed)

VERIFIED FIXED
mozilla18
Tracking Status
firefox18 --- fixed

People

(Reporter: gkw, Assigned: gkw)

References

Details

(Whiteboard: [valgrind])

Attachments

(1 file)

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
Summary: Investigate lack of line numbers on some lines in Valgrind logs → Investigate lack of line numbers on some lines on tbpl Valgrind logs
Julian, any ideas for Releng to followup about the lack of line numbers? Nobody (incl. njn, khuey and I) on #developers had any clue.
philor suggests moving to Testing: General
Component: Release Engineering: Automation (General) → General
Product: mozilla.org → Testing
QA Contact: catlee
Version: other → Trunk
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
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: nobody → gary
Status: NEW → ASSIGNED
Attachment #664149 - Flags: review?(ted.mielczarek)
Attachment #664149 - Flags: review?(ted.mielczarek) → review+
https://hg.mozilla.org/mozilla-central/rev/584119bf249d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: