Closed Bug 907890 Opened 11 years ago Closed 9 years ago

B2G shouldn't build Gecko with make in silent mode (-s)

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

defect
Not set
normal

Tracking

(b2g-v1.4 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.1 S1 (1aug)
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: gps, Assigned: jhford)

References

Details

Attachments

(2 files)

I'm trying to debug build failures in Gecko in https://tbpl.mozilla.org/php/getParsedLog.php?id=26795669&tree=Try&full=1. This is very difficult because MOZ_MAKE_FLAGS contains "-s" which causes large swaths of build output to be suppressed.

I'm not sure where build/gonk-misc/default-gecko-config lives, but -s should be removed from MOZ_MAKE_FLAGS. -s should also be removed from the "make -C gecko -f client.mk" invocation, if possible.

17:45:56     INFO -  make -C gecko -f client.mk -s
17:45:56     INFO -  Adding client.mk options from /builds/slave/b2g_try_unagi_dep-000000000000/build/gonk-misc/default-gecko-config:
17:45:56     INFO -      AUTOCLOBBER=1
17:45:56     INFO -      MOZ_OBJDIR=/builds/slave/b2g_try_unagi_dep-000000000000/build/objdir-gecko
17:45:56     INFO -      MOZ_MAKE_FLAGS=-s -j16
Summary: B2G shouldn't invoke client.mk with silent flag (-s) → B2G shouldn't build Gecko with make in silent mode (-s)
It lives at 
 https://github.com/mozilla-b2g/gonk-misc/blob/master/default-gecko-config
so you'd need to talk to the b2g build people.

If you end up requiring something for the builds on tbpl please file a new bug on RelEng.
Component: Release Automation → Builds
Product: Release Engineering → Boot2Gecko
QA Contact: bhearsum
what we should do is determine if ./build.sh/android's make was invoked with the showcommands fake target and only set -s if it wasn't.  This should be reasonably easy to do in gonk-misc/Android.mk
This problem has bit me recently, since I'm trying to verify what is used for tbpl for b2g emulator Debug builds
Can this be fixed already? Every time there are b2g errors on tbpl, it's a PITA.
Flags: needinfo?(mwu)
this should be a quick fix, i'll take a look at it tomorrow.
Assignee: nobody → jhford
This patch maintains existing behaviour by default, which is to suppress gecko and gonk output.  The android build system has a 'fake' target, showcommands, which it uses to enable running make without the -s flag behaviour. This patch modifies gonk-misc to make gecko honour that.

Basically, ./build.sh showcommands will show all gecko and gonk commands being run and ./build.sh will suppress gecko and gonk commands.

I have a mozharness patch upcoming which will enable this on TBPL.  I only modified existing make commands which have a -s flag.  We could modify the other make calls to add this behaviour, but I don't think that's anywhere near as important.

Proof that this works, in gonk-misc/Android.mk:

ifeq ($(strip $(SHOW_COMMANDS)),)
SHOW_COMMAND_GECKO = -s
endif

.PHONY: helpme
helpme:
	echo FLAG: $(SHOW_COMMAND_GECKO)


$ ./build.sh helpme
<snip>
echo FLAG: -s
FLAG: -s

real	0m30.539s
user	0m6.543s
sys	0m9.417s
Run |./flash.sh| to flash all partitions of your device

$ ./build.sh helpme showcommands
<snip>
echo FLAG:
FLAG:

real	0m9.473s
user	0m5.347s
sys	0m3.578s
Run |./flash.sh| to flash all partitions of your device
Attachment #8464159 - Flags: review?(fabrice)
Nick, are you the right person to review?  Feel free to redirect

This change to mozharness adds the 'showcommands' fake target to all build.sh calls.  doing this means we start to get normal Gecko buildsystem output, including the commands being run.  I added this target to all build.sh invocations, but only care about that value for builds *now*.  I think in the long run, we should enable this behaviour for all TBPL based builds.

This information is really helpful when things go wrong.
Attachment #8464166 - Flags: review?(nthomas)
Comment on attachment 8464159 [details] [diff] [review]
Show commands when we use the showcommands target

Review of attachment 8464159 [details] [diff] [review]:
-----------------------------------------------------------------

Good solution. Thanks!
Attachment #8464159 - Flags: review?(fabrice) → review+
Comment on attachment 8464159 [details] [diff] [review]
Show commands when we use the showcommands target

gonk-misc master: d61daef8fca7d6f335f659a8967bad423770e634
Comment on attachment 8464159 [details] [diff] [review]
Show commands when we use the showcommands target

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by]: not having this makes TBPL logs less useful to devs
[User impact] if declined: TBPL logs will stay of limited use on release branches
[Testing completed]: it works, https://tbpl.mozilla.org/?tree=B2g-Inbound&rev=820f4e32a25b
[Risk to taking this patch] (and alternatives if risky): i can't think of any
[String changes made]: none
Attachment #8464159 - Flags: approval-gaia-v2.0?
Attachment #8464159 - Flags: approval-gaia-v1.4?
Comment on attachment 8464166 [details] [diff] [review]
use showcommands target in Mozharness

I think we'd better off setting SHOW_COMMANDS or SHOW_GECKO_COMMANDS in the environment as part of query_build_env() in mozharness/mozilla/building/buildb2gbase.py, but that's not the supported interface.

r+ if you update scripts/spidermonkey/build.b2g too.
Attachment #8464166 - Flags: review?(nthomas) → review+
Comment on attachment 8464159 [details] [diff] [review]
Show commands when we use the showcommands target

Approving build change.
Attachment #8464159 - Flags: approval-gaia-v2.0?
Attachment #8464159 - Flags: approval-gaia-v2.0+
Attachment #8464159 - Flags: approval-gaia-v1.4?
Attachment #8464159 - Flags: approval-gaia-v1.4+
Comment on attachment 8464159 [details] [diff] [review]
Show commands when we use the showcommands target

gonk-misc v1.4: 2b14bf6e1922b159324fe3a607fab6420060c411
gonk-misc v2.0: 0b300d5686993eb4e9dfef5adf09ce15ac9eec44
Flags: needinfo?(mwu)
Target Milestone: --- → 2.1 S1 (1aug)
The verbose output leads to log truncation in buildbot and on tbpl, it's just a few KB too long:
 Output exceeded 52428800 bytes, remaining output has been truncated (output was 52492531 bytes)
The 50MB limit in buildbot is set to keep a lid on the amount of work buildbot masters have to do in handling logs streamed back from slaves.

Since the original intent of this bug was limited to Gecko, but we actually made a global change, perhaps we should reconsider ?
Depends on: 1059992
Can we resolved this fixed?  It looks like the changes are in gonk-misc/Android.mk and I just did "./build.sh gecko showcommands" on trunk and it worked.
Flags: needinfo?(jhford)
(In reply to Andrew Sutherland [:asuth] from comment #16)
> Can we resolved this fixed?

Yes.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(jhford)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: