<#18845 Adding `--level=error` to xargs-piped pant...
# github-notifications
c
#18845 Adding `--level=error` to xargs-piped pants command causes internal exception Issue created by engnatha Describe the bug I can run the following command and the pants logs look great and everything happens fast.
Copy code
./pants dependees list --changed-since=master | xargs ./pants dependees list | xargs ./pants --filter-target-type=python_test list
If I add
--level=error
to the last command to change the log level, I get exceptions in the pants logs. Unfortunately, no amount of
RUST_BACKTRACE=1
setting in my environment was able to show the full details (maybe an issue with xargs?). Both variants of the command produce the same result, but the latter causes some performance issues since it kills something for pants (maybe the daemon?). Pants version 2.15.0 OS Ubuntu 20.04 Additional info Here are the logs when the command throws the error.
Copy code
11:19:28.90 [INFO] handling request: `--pants-bin-name=./pants --pants-version=2.15.0 dependees list --changed-since=master`
11:19:43.80 [INFO] request completed: `--pants-bin-name=./pants --pants-version=2.15.0 dependees list --changed-since=master`
11:19:44.49 [INFO] handling request: `--pants-bin-name=./pants --pants-version=2.15.0 dependees list astranis-python/astranis/ground/service/angle_collector:sources astranis-python/astranis/ground/service/angle_collector/client_server_test.py:tests astranis-python/astranis/service/handler.py astranis-python/astranis/ground/service/angle_collector:client astranis-python/astranis/ground/service/angle_collector/client.py:sources`
11:19:44.98 [INFO] request completed: `--pants-bin-name=./pants --pants-version=2.15.0 dependees list astranis-python/astranis/ground/service/angle_collector:sources astranis-python/astranis/ground/service/angle_collector/client_server_test.py:tests astranis-python/astranis/service/handler.py astranis-python/astranis/ground/service/angle_collector:client astranis-python/astranis/ground/service/angle_collector/client.py:sources`
.sleep(self.JOIN_TIMEOUT_SECONDS)
  File "/home/nathanael/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0_py39/lib/python3.9/site-packages/pants/base/exception_sink.py", line 109, in handle_sigterm
    raise self.SignalHandledNonLocalExit(signum, "SIGTERM")
  File "/home/nathanael/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0_py39/lib/python3.9/site-packages/pants/base/exception_sink.py", line 94, in __init__
    self.traceback_lines = traceback.format_stack()

11:19:45.89 [WARN] Executor was not shut down explicitly.
11:19:45.89 [ERROR] panic at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.', /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/runtime/blocking/shutdown.rs:51
11:19:45.89 [ERROR] Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
11:19:45.89 [ERROR] panic at 'A Tokio 1.x context was found, but it is being shutdown.', /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.2/src/time/driver/entry.rs:558
11:19:45.89 [ERROR] Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
11:19:45.89 [ERROR] panic at 'panic in a function that cannot unwind', library/core/src/panicking.rs:106
11:19:45.89 [ERROR] Please set RUST_BACKTRACE=1, re-run, and then file a bug at <https://github.com/pantsbuild/pants/issues>.
pantsbuild/pants