witty-family-13337
04/22/2022, 7:57 AM@rule
?
I’m giving it a go to https://github.com/pantsbuild/pants/issues/13067 which requires the addition of two new options to manage the total memory for child processes and default memory assigned each child process. These two options are bound together and therefore I would like to validate that total process mem > single process mem
and error out to the end user when the given values do not meet that criteria.happy-kitchen-89482
04/22/2022, 10:02 AMwitty-family-13337
04/22/2022, 10:44 AMwitty-family-13337
04/22/2022, 10:46 AMResult<…>
type used in the Rust code, the error will get back to the client…?witty-family-13337
04/22/2022, 11:53 AMErr(…)
, it seems that pantsd
panics with error message I put inside the Err
but leaves the client side of pants in a loop printing waiting for pantsd to start…
🤨witty-family-13337
04/22/2022, 11:54 AMbitter-ability-32190
04/22/2022, 1:11 PMhappy-kitchen-89482
04/22/2022, 1:32 PMwitty-family-13337
04/22/2022, 2:09 PMwitty-family-13337
04/22/2022, 2:11 PMbitter-ability-32190
04/22/2022, 2:16 PMwitty-family-13337
04/22/2022, 3:02 PMpantsd
and validated is the following one: https://github.com/pantsbuild/pants/blob/8cbcac89f5ea8f92cbfff41e7145e65e02c531cc/src/rust/engine/src/externs/interface.rs#L331witty-family-13337
04/22/2022, 3:03 PMpants.toml
I get a similar behaviour: pantsd
panics (or basically exits) and the client goes in a loop waiting for it to start.witty-family-13337
04/22/2022, 3:04 PMTraceback (most recent call last):
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/bin/pants_loader.py", line 119, in <module>
main()
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/bin/pants_loader.py", line 115, in main
PantsLoader.main()
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/bin/pants_loader.py", line 109, in main
cls.run_alternate_entrypoint(entrypoint)
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/bin/pants_loader.py", line 85, in run_alternate_entrypoint
entrypoint_fn()
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/pantsd/pants_daemon.py", line 211, in launch_new_pantsd_instance
daemon = PantsDaemon.create(options_bootstrapper)
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/pantsd/pants_daemon.py", line 57, in create
core = PantsDaemonCore(options_bootstrapper, executor, cls._setup_services)
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/pantsd/pants_daemon_core.py", line 51, in __init__
self._options_initializer = OptionsInitializer(options_bootstrapper, executor)
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/init/options_initializer.py", line 101, in __init__
self._bootstrap_scheduler = create_bootstrap_scheduler(options_bootstrapper, executor)
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/init/options_initializer.py", line 74, in create_bootstrap_scheduler
EngineInitializer.setup_graph(
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/init/engine_initializer.py", line 186, in setup_graph
return EngineInitializer.setup_graph_extended(
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/init/engine_initializer.py", line 308, in setup_graph_extended
scheduler = Scheduler(
File "/Users/antonioalonsodominguez/Workspace/Personal/pants/src/python/pants/engine/internals/scheduler.py", line 202, in __init__
exec_stategy_opts = PyExecutionStrategyOptions(
ValueError: Nailgun pool can not be initialised as the total amount of memory allowed is smaller than the memory allocation for a single child process.
- total child process memory allowed (bytes): 268435456
- default child process memory (bytes): 536870912
16:59:26.41 [INFO] waiting for pantsd to start...
16:59:31.43 [INFO] waiting for pantsd to start...
^CInterrupted by user:
witty-family-13337
04/22/2022, 3:06 PM___init___
method such that the error is shown to the user in a more graceful manner…?witty-family-13337
04/22/2022, 3:07 PMpants_loader.py