Closed Bug 1673394 Opened 4 years ago Closed 4 years ago

moz-phab in subdirectory of source tree crashes

Categories

(Conduit :: moz-phab, defect)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lth, Assigned: glob)

References

Details

Attachments

(1 file)

Trying to upload new patch:

[lhansen@yojimbo build-debug]$ moz-phab submit tip tip
Submitting 1 commit for review:
(New) 620065:ff7d17e07712 Bug 1673391 - Constant fold binary SIMD operations (WIP)
!! Missing reviewers
ff7d17e07712 is based off non-public commit 69daab36d994
Warning: found 5 untracked files (will not be submitted):
  ...
Automatically submitting (as per submit.auto_submit in ~/.moz-phab-config)

Creating new revision:
620065:ff7d17e07712 Bug 1673391 - Constant fold binary SIMD operations (WIP)
CommandError: command 'b'files'' failed to complete successfully
Run moz-phab again with '--trace' to show debugging output

./mach bootstrap did not fix this. Running from the root dir works. Subsequent submit of same patch from subdir does not error out.

Here's the trace from another run that failed in the same way:

[lhansen@yojimbo build-debug]$ moz-phab --trace submit 620318 620318
usage: moz-phab [-h] COMMAND ...
moz-phab: error: unrecognized arguments: 620318
[lhansen@yojimbo build-debug]$ moz-phab submit --trace 620318 620318
DEBUG    2020-10-27 14:38:03,831 MozPhab (0.1.91)
DEBUG    2020-10-27 14:38:03,831 found hg repo in /home/lhansen/m-u
DEBUG    2020-10-27 14:38:03,953 $ config
DEBUG    2020-10-27 14:38:03,960 hg extensions: absorb, blackbox, clang-format, firefoxtree, fsmonitor, histedit, purge, push-to-try, rebase, shelve, strip
DEBUG    2020-10-27 14:38:03,960 $ log -T '{node}
' -r 620318
DEBUG    2020-10-27 14:38:04,098 ['83676aadae921d572259021baabbd7ca4dc1ad8d']
DEBUG    2020-10-27 14:38:04,099 $ log -T '{node}
' -r 620318
DEBUG    2020-10-27 14:38:04,103 ['83676aadae921d572259021baabbd7ca4dc1ad8d']
DEBUG    2020-10-27 14:38:04,111 $ bookmark -T '{active} {bookmark}
'
DEBUG    2020-10-27 14:38:04,115 $ id -q
DEBUG    2020-10-27 14:38:04,847 83676aadae92
DEBUG    2020-10-27 14:38:04,848 $ bookmark moz-phab_83676aadae92
DEBUG    2020-10-27 14:38:04,934 $ log -T '{rev}
{node}
{date|hgdate}
{author|person}
{author|email}
{desc}--95fb3822611a4b4da6eca582e023a93c--
' -r 83676aadae92::83676aadae92
DEBUG    2020-10-27 14:38:04,991 620318
83676aadae921d572259021baabbd7ca4dc1ad8d
1603724764 -3600
Lars T Hansen
lhansen@mozilla.com
Bug 1673391 - Translate swizzle-with-constant into shuffle. r?jseward

There's discussion on the SIMD tracker to the effect that producers
prefer to emit a swizzle operation with a v128.const mask to express a
permutation instead of a two-argument shuffle (both arguments being
the same input) with an immediate mask.  The stack nature of wasm and
the lack of a DUP instruction reinforces this choice.  Thus we should
recognize a swizzle-with-const as an expression of shuffle-with-zero,
with subsequent optimizations applied to the shuffle.

Differential Revision: https://phabricator.services.mozilla.com/D94742--95fb3822611a4b4da6eca582e023a93c--

DEBUG    2020-10-27 14:38:04,992 $ log -T '{node}
' -r 'children(83676aadae921d572259021baabbd7ca4dc1ad8d)'
DEBUG    2020-10-27 14:38:05,029 ['b1bbfb23ab43a0a454a4dba7a0a1369b0c70b739']
WARNING  2020-10-27 14:38:05,029 Submitting 1 commit for review:
DEBUG    2020-10-27 14:38:05,031 https://phabricator.services.mozilla.com/api/differential.revision.search {'constraints': {'ids': [94742]}, 'attachments': {'reviewers': True}}
DEBUG    2020-10-27 14:38:05,881 https://phabricator.services.mozilla.com/api/differential.diff.search {'constraints': {'phids': ['PHID-DIFF-7ekx2kee6zz3s2i7fz3h']}, 'attachments': {'commits': True}}
DEBUG    2020-10-27 14:38:06,720 https://phabricator.services.mozilla.com/api/user.whoami {}
INFO     2020-10-27 14:38:07,513 (D94742) 620318:83676aadae92 Bug 1673391 - Translate swizzle-with-constant into shuffle. r?jseward
DEBUG    2020-10-27 14:38:07,514 $ log -T '{node}
' -r 'ancestor(83676aadae92::83676aadae92)'
DEBUG    2020-10-27 14:38:07,546 83676aadae921d572259021baabbd7ca4dc1ad8d
DEBUG    2020-10-27 14:38:07,546 $ log -T '{phase} {node}
' -r 'parents(83676aadae921d572259021baabbd7ca4dc1ad8d)'
DEBUG    2020-10-27 14:38:07,573 ['draft b7536d737e2e3509fd36160aebc48714e8a40dfb']
WARNING  2020-10-27 14:38:07,573 83676aadae92 is based off non-public commit b7536d737e2e
DEBUG    2020-10-27 14:38:07,573 $ log -T '{node}
' -r '83676aadae92::83676aadae92 and merge()'
DEBUG    2020-10-27 14:38:07,603 $ status --added --deleted --modified --unknown
DEBUG    2020-10-27 14:38:07,611 ['? js/moz.configure.orig', '? js/src/jit-test/tests/wasm/simd/ion-analysis.js.orig', '? js/src/jit/MIR.cpp.orig', '? js/src/jit/MIR.cpp.rej', '? js/src/jit/MIR.h.orig', '? js/src/jit/MIR.h.rej', '? js/src/jit/x86-shared/MacroAssembler-x86-shared-SIMD.cpp.orig', '? js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h.orig', '? js/src/wasm/WasmBaselineCompile.cpp.orig', '? js/src/wasm/WasmConstants.h.orig']
DEBUG    2020-10-27 14:38:07,612 https://phabricator.services.mozilla.com/api/user.query {'usernames': ['jseward']}
WARNING  2020-10-27 14:38:08,422 Warning: found 10 untracked files (will not be submitted):
INFO     2020-10-27 14:38:08,422 Automatically submitting (as per submit.auto_submit in ~/.moz-phab-config)
INFO     2020-10-27 14:38:08,423 
Updating revision D94742:
INFO     2020-10-27 14:38:08,423 620318:83676aadae92 Bug 1673391 - Translate swizzle-with-constant into shuffle. r?jseward
DEBUG    2020-10-27 14:38:08,423 $ update --quiet 83676aadae921d572259021baabbd7ca4dc1ad8d
DEBUG    2020-10-27 14:38:08,433 --- arc message
Bug 1673391 - Translate swizzle-with-constant into shuffle. r?jseward

Summary:

There's discussion on the SIMD tracker to the effect that producers
prefer to emit a swizzle operation with a v128.const mask to express a
permutation instead of a two-argument shuffle (both arguments being
the same input) with an immediate mask.  The stack nature of wasm and
the lack of a DUP instruction reinforces this choice.  Thus we should
recognize a swizzle-with-const as an expression of shuffle-with-zero,
with subsequent optimizations applied to the shuffle.

Differential Revision: https://phabricator.services.mozilla.com/D94742



Test Plan:

Reviewers: jseward

Subscribers:

Bug #: 1673391
---
DEBUG    2020-10-27 14:38:08,433 $ log -T '{node}' -r 'parents(83676aadae921d572259021baabbd7ca4dc1ad8d)'
DEBUG    2020-10-27 14:38:08,463 b7536d737e2e3509fd36160aebc48714e8a40dfb
DEBUG    2020-10-27 14:38:08,463 $ status --change 83676aadae921d572259021baabbd7ca4dc1ad8d --copies
DEBUG    2020-10-27 14:38:08,866 ['M js/src/jit-test/tests/wasm/simd/ad-hack.js', 'M js/src/jit-test/tests/wasm/simd/ion-analysis.js', 'M js/src/jit/MIR.cpp', 'M js/src/jit/MIR.h']
DEBUG    2020-10-27 14:38:08,866 $ files --rev b7536d737e2e3509fd36160aebc48714e8a40dfb -T '{flags}:{path}
' -Ijs/src/jit-test/tests/wasm/simd/ad-hack.js -Ijs/src/jit-test/tests/wasm/simd/ion-analysis.js -Ijs/src/jit/MIR.cpp -Ijs/src/jit/MIR.h -I.arcconfig
DEBUG    2020-10-27 14:38:09,068 $ files --rev 83676aadae921d572259021baabbd7ca4dc1ad8d -T '{flags}:{path}
' -Ijs/src/jit-test/tests/wasm/simd/ad-hack.js -Ijs/src/jit-test/tests/wasm/simd/ion-analysis.js -Ijs/src/jit/MIR.cpp -Ijs/src/jit/MIR.h -I.arcconfig
DEBUG    2020-10-27 14:38:09,264 $ bookmark -T '{bookmark}
'
DEBUG    2020-10-27 14:38:09,269 ['moz-phab_83676aadae92']
DEBUG    2020-10-27 14:38:09,269 $ bookmark --delete moz-phab_83676aadae92
ERROR    2020-10-27 14:38:09,279 Traceback (most recent call last):
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/mozphab.py", line 83, in main
    args.func(repo, args)
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/commands/submit.py", line 565, in submit
    diff = repo.get_diff(commit)
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 784, in get_diff
    file_modes = self._get_file_modes(commit)
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 760, in _get_file_modes
    self.hg_out(
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 177, in hg_out
    out = self.repository.rawcommand(command, eh=error_handler)
  File "/home/lhansen/.local/lib/python3.8/site-packages/hglib/client.py", line 265, in rawcommand
    return eh(ret, out, err)
  File "/home/lhansen/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 169, in error_handler
    raise CommandError(
mozphab.exceptions.CommandError: command 'b'files'' failed to complete successfully

Thanks for the debug output, that helps a ton!

Assignee: nobody → glob
  • add a chdir so hg files doesn't break
  • tidy up debug logging of the executed command
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Has this been deployed? I encounter the same error still, after upgrading everything, running bootstrap, and running moz-phab self-update.

Flags: needinfo?(glob)

Not yet; this will be in 0.1.93 when its released.

Flags: needinfo?(glob)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: