Hello all! I have the below issue any time I try t...
# general
g
Hello all! I have the below issue any time I try to run pants. Anyone knows about this issue?
Copy code
11:56:16.42 [INFO] Initializing scheduler...
11:56:16.90 [INFO] Scheduler initialized.
11:56:22.09 [INFO] Canceled: Building build_backend.pex from setuptools_default.lock
⠄ 3.57s Resolve transitive targets
⠄ 0.02s Scheduling: Building build_backend.pex from setuptools_default.lock
⠄ 0.71s Building dockerfile_parser.pex from dockerfile-parser_default.lock
⠄ 0.12s Scheduling: Determine Python dependencies for src/python/aos/drivers/__init__.py
⠄ 3.57s Resolve transitive targets
⠄ 3.57s Resolve transitive targets
⠄ 
⠄                                                                                                                                                                                                Traceback (most recent call last):
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/bin/pants", line 8, in <module>
    sys.exit(main())
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/pants_loader.py", line 112, in main
    PantsLoader.main()
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/pants_loader.py", line 108, in main
    cls.run_default_entrypoint()
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/pants_loader.py", line 90, in run_default_entrypoint
    exit_code = runner.run(start_time)
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/pants_runner.py", line 89, in run
    return remote_runner.run(start_time)
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/remote_pants_runner.py", line 117, in run
    return self._connect_and_execute(pantsd_handle, start_time)
  File "/home/nicolas/.cache/pants/setup/bootstrap-Linux-x86_64/2.14.0_py38/lib/python3.8/site-packages/pants/bin/remote_pants_runner.py", line 151, in _connect_and_execute
    return PyNailgunClient(port, executor).execute(command, args, modified_env)
native_engine.PantsdClientException: The pantsd process was killed during the run.

If this was not intentionally done by you, Pants may have been killed by the operating system due to memory overconsumption (i.e. OOM-killed). You can set the global option `--pantsd-max-memory-usage` to reduce Pantsd's memory consumption by retaining less in its in-memory cache (run `./pants help-advanced global`). You can also disable pantsd with the global option `--no-pantsd` to avoid persisting memory across Pants runs, although you will miss out on additional caching.

If neither of those help, please consider filing a GitHub issue or reaching out on Slack so that we can investigate the possible memory overconsumption (<https://www.pantsbuild.org/docs/getting-help>).
n
Sounds like pants and/or pantsd needs more memory than is available on the system. I've seen this a lot with the Go backend. Had to bump the memory on our CI instances due to it.
h
@great-student-39095 The error message is telling you what the issue is and how to diagnose and possibly fix it...
g
I tried to do what it suggested but it did not work. Eventually, I fixed it by deleting the folder
~/.cache/pants/lmdb_store
. I found from an old thread I read that the lmdb store on my machine may have been corrupted
For reference, here is the thread: https://github.com/pantsbuild/pants/issues/18726