Open Bug 2017855 Opened 1 month ago

`./mach test` never finishes for an incomplete build

Categories

(Testing :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: mossop, Unassigned)

References

(Blocks 1 open bug)

Details

I hadn't done a build after switching to a different change and so the test file symlinks were not present. Attempting to run a test gave this:

$ mach test toolkit/components/places/tests/browser/browser_visituri_restriction.js
Error running mach:

    mach test toolkit/components/places/tests/browser/browser_visituri_restriction.js

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 test`` 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:

Traceback (most recent call last):
  File "/Users/dave/mozilla/source/trunk/python/mach/mach/main.py", line 390, in _run
    return Registrar._run_command_handler(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/python/mach/mach/registrar.py", line 124, in _run_command_handler
    result = fn(instance, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/testing/mach_commands.py", line 536, in test
    res = command_context._mach_context.commands.dispatch(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/python/mach/mach/registrar.py", line 206, in dispatch
    return self._run_command_handler(handler, context, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/python/mach/mach/registrar.py", line 124, in _run_command_handler
    result = fn(instance, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/testing/mochitest/mach_commands.py", line 375, in run_mochitest_general
    driver.install_tests()
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozbuild/controller/building.py", line 1896, in install_tests
    install_test_files(mozpath.normpath(self.topsrcdir), self.topobjdir, "_tests")
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozbuild/testing.py", line 207, in install_test_files
    copier.copy(mozpath.join(topobjdir, tests_root), remove_unaccounted=False)
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozpack/copier.py", line 422, in copy
    copy_results.append((destfile, f.copy(destfile, skip_if_older)))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozpack/files.py", line 357, in copy
    errors.fatal("Symlink target path does not exist: %s" % self.path)
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozpack/errors.py", line 115, in fatal
    self._handle(self.FATAL, msg)
  File "/Users/dave/mozilla/source/trunk/python/mozbuild/mozpack/errors.py", line 110, in _handle
    raise ErrorMessage(msg)
mozpack.errors.ErrorMessage: error: Symlink target path does not exist: /Users/dave/mozilla/source/trunk/browser/components/enterprisepolicies/tests/browser/browser_policy_sitepolicies.js

Sentry event ID: 8d4d8b3fef6a414eaa6987de41c9a6a7

Which is a fine error however the process never exited and I had to ctrl-c out of it. This was most annoying because I was using Claude to run tests and so it was just never completing and it wasn't clear why.

Pressing ctrl-c a few times logged the following:

Exception ignored in atexit callback: <function _exit_function at 0x11853cf40>
Traceback (most recent call last):
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/util.py", line 360, in _exit_function
    p.join()
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/process.py", line 149, in join
    res = self._popen.wait(timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/popen_fork.py", line 43, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/popen_fork.py", line 27, in poll
    pid, sts = os.waitpid(self.pid, flag)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt: 
Sentry is attempting to send 1 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
Process Process-1:
Traceback (most recent call last):
  File "/Users/dave/mozilla/source/trunk/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py", line 195, in _collect
    while not _poll(pipe, poll_interval=sleep_interval):
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/mozilla/source/trunk/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py", line 123, in _poll
    return pipe.poll(poll_interval)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 257, in poll
    return self._poll(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 440, in _poll
    r = wait([self], timeout)
        ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 948, in wait
    ready = selector.select(timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/selectors.py", line 415, in select
    fd_event_list = self._selector.poll(timeout)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/dave/mozilla/source/trunk/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py", line 251, in _collect
    pipe.send(entry)
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 206, in send
    self._send_bytes(_ForkingPickler.dumps(obj))
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 427, in _send_bytes
    self._send(header + buf)
  File "/Users/dave/.local/share/mise/installs/python/3.11.14/lib/python3.11/multiprocessing/connection.py", line 384, in _send
    n = write(self._handle, buf)
        ^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [Errno 32] Broken pipe
You need to log in before you can comment on or make changes to this bug.