Closed Bug 1642044 Opened 4 years ago Closed 4 years ago

fix-stacks invocation while running ./mach reftest breaks with python3

Categories

(Testing :: Reftest, defect)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: kats, Assigned: bc)

References

(Regression)

Details

Attachments

(2 files)

I was running a reftest via ./mach reftest which hit a MOZ_CRASH() I added in the code. It barfed with this:

Hit MOZ_CRASH() at /home/kats/zspace/gecko-tests/xpcom/base/nsTraceRefcnt.cpp:571
Initializing stack-fixing for the first stack frame, this may take a while...
Exception in thread ProcessReader:
Traceback (most recent call last):
  File "/home/kats/zspace/gecko-tests/layout/tools/reftest/output.py", line 144, in __call__
    data = json.loads(line)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kats/zspace/gecko-tests/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 1116, in _read
    callback(line.rstrip())
  File "/home/kats/zspace/gecko-tests/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 1026, in __call__
    e(*args, **kwargs)
  File "/home/kats/zspace/gecko-tests/layout/tools/reftest/output.py", line 146, in __call__
    self.verbatim(line)
  File "/home/kats/zspace/gecko-tests/layout/tools/reftest/output.py", line 162, in verbatim
    line = self.stack_fixer_function(line)
  File "/home/kats/zspace/gecko-tests/testing/mozbase/mozrunner/mozrunner/utils.py", line 265, in stack_fixer_function
    return stack_fixer_module.fixSymbols(line, slowWarning=True, hide_errors=hideErrors)
  File "/home/kats/zspace/gecko-tests/obj-host-debugopt/dist/bin/fix_stacks.py", line 86, in fixSymbols
    fix_stacks.stdin.write(line)
TypeError: a bytes-like object is required, not 'str'

^Cmach interrupted by signal or user action. Stopping.

If I revert bug 1638981 to run ./mach reftest with py2 it works as intended.

mach has been reverted to mark reftest as python2 only until bug 1638981 is resolved again. You should not have any problems with mach reftest with android.

Thanks. Note that this was on Linux, for a Linux target build.

Depends on D77660

Assignee: nobody → bob
Status: NEW → ASSIGNED
Pushed by bclary@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2da7ae90fbf0
Python 3 tools/rb/find_leakers.py r=gbrown
https://hg.mozilla.org/integration/autoland/rev/f965f78cedf7
Python 3 tools/rb/fix_stacks.py r=gbrown
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
See Also: → 1647362
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: