Closed Bug 1634646 Opened 4 years ago Closed 4 years ago

PGO Linux build fails

Categories

(Firefox Build System :: Mach Core, defect, P3)

77 Branch
defect

Tracking

(firefox-esr68 unaffected, firefox76 unaffected, firefox77 wontfix, firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox76 --- unaffected
firefox77 --- wontfix
firefox78 --- fixed

People

(Reporter: rickard, Assigned: rstewart)

References

(Regression)

Details

(Keywords: in-triage, regression)

Attachments

(2 files)

Attached file mozconfig

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

I tried to to a PGO build of firefox and it gave me this error which doesn't really tell me much. If any of the mozconfig options I use are incompatible maybe some checks will help to prevent this from happening.

Actual results:

nstrumented/browser/installer'
111:09.66 gmake[1]: Leaving directory '/home/user/gecko-pgo/objdir-frontend/instrumented/browser/installer'
111:09.66 gmake: Leaving directory '/home/user/gecko-pgo/objdir-frontend/instrumented'
Exception in thread ProcessReader:
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/user/gecko-pgo/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 1116, in _read
callback(line.rstrip())
File "/home/user/gecko-pgo/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 1026, in call
e(*args, **kwargs)
File "/home/user/gecko-pgo/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 1168, in call
self.stream.write(ensure(line) + ensure('\n'))
TypeError: write() argument must be str, not bytes

Firefox exited with code 1 during profile initialization
Error running mach:

['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/home/user/gecko-pgo/objdir-frontend/instrumented/_virtualenvs/init_py3/bin/python', '/home/user/gecko-pgo/build/pgo/profileserver.py']' returned non-zero exit status 1.

File "/home/user/gecko-pgo/python/mozbuild/mozbuild/build_commands.py", line 124, in build
env=ensure_subprocess_env(pgo_env))
File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)

Keywords: in-triage
Priority: -- → P3

Can you verify the attached patch resolves the issue for you?

Flags: needinfo?(rickard)

Yes, sort of, at least now it indicates that a DISPLAY variable is needed.

Error: no DISPLAY environment variable specified
Firefox exited with code 1 during profile initialization
Error running mach:

['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/home/user/gecko-pgo/objdir-frontend/instrumented/_virtualenvs/init_py3/bin/python', '/home/shelter/gecko-pgo/build/pgo/profileserver.py']' returned non-zero exit status 1.

File "/home/user/gecko-pgo/python/mozbuild/mozbuild/build_commands.py", line 123, in build
subprocess.check_call(pgo_cmd, cwd=instr.topobjdir,
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)

Perhaps it's possible to handle it more nicely tho', saying something that you need a grapical environment to be able to proceed.

After running it under X I did see it was unable to write the prof data before doing the compile process again but it went ahead anyway.

Flags: needinfo?(rickard)

Yeah, it's a browser, so you're going to want to run it in a graphical environment :)

After running it under X I did see it was unable to write the prof data before doing the compile process again but it went ahead anyway.

This is vague, but the way you described it sounds like an issue that should be investigated. Can you file a separate bug for this?

Assignee: nobody → rstewart

Yeah, it's a browser, so you're going to want to run it in a graphical environment :)
I didn't realize it was needed for PGO compiles tho', but after your fix it became more apparent.

This is vague, but the way you described it sounds like an issue that should be investigated. Can you file a separate bug for this?
I know,, I only saw it flashing by, I'll file a bug report the next time I compile. I didn't want to interrupt anything. Anyway, the build finished without issues.

Pushed by rstewart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06646ef99bce When running Firefox for pgo, use text mode for log output r=froydnj
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Comment on attachment 9146583 [details]
Bug 1634646 - When running Firefox for pgo, use text mode for log output

Beta/Release Uplift Approval Request

  • User impact if declined: Errors when trying to do PGO builds.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): 1-line change just to change encoding on a text stream, preventing error messages in Python code.
  • String changes made/needed:
Attachment #9146583 - Flags: approval-mozilla-beta?
Regressed by: 1623701
Has Regression Range: --- → yes

Comment on attachment 9146583 [details]
Bug 1634646 - When running Firefox for pgo, use text mode for log output

approved for 78.0b2

Attachment #9146583 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9146583 [details]
Bug 1634646 - When running Firefox for pgo, use text mode for log output

erm, no, this landed weeks ago, it's already in 78.

Attachment #9146583 - Flags: approval-mozilla-beta+

Ah, sorry. Hard for me to keep track of all the trains :)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: