Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No idle slots in nailgun pool when using JVM memory controls #15808

Closed
alonsodomin opened this issue Jun 13, 2022 · 1 comment · Fixed by #15903
Closed

No idle slots in nailgun pool when using JVM memory controls #15808

alonsodomin opened this issue Jun 13, 2022 · 1 comment · Fixed by #15903
Assignees
Labels
Milestone

Comments

@alonsodomin
Copy link
Contributor

alonsodomin commented Jun 13, 2022

Describe the bug
when trying to use the JVM memory controls in 2.12rc2 with following settings in pants.toml:

[GLOBAL]
process_total_child_memory_usage = "6GiB"
process_per_child_memory_usage = "1GiB"

And the running any Pants goal on JVM targets, it can be seen how Pants launches some nailgun servers to do some work but to end up exiting with following error:

Exception: Failed to connect to nailgun! No idle slots in nailgun pool.

Pants version
2.12rc2

OS
MacOS

Additional info

@stuhood stuhood self-assigned this Jun 13, 2022
@stuhood
Copy link
Member

stuhood commented Jun 13, 2022

Mm, shoot. Sorry for the trouble here.

This is because the nailgun pool assumes that it is being run under a concurrency limit that would mean that the pool is always larger than the number of concurrent requests.

As a workaround, you can lower https://www.pantsbuild.org/docs/reference-global#section-process-execution-local-parallelism to less than the number of slots in the pool. But we should remove that assumption (either by adding a semaphore around the pool... easier, or by implementing waiting inside of the pool... harder) in order to fix this.

@stuhood stuhood added this to the 2.12.x milestone Jun 13, 2022
stuhood added a commit that referenced this issue Jun 23, 2022
… the process parallelism (#15903)

As described in #15808, the assumption that the nailgun pool runs under an appropriately sized semaphore has not been true since #15224, and results in an error when memory controls cause the pool size to be smaller than the process parallelism.

To resolve that, we add an additional semaphore (and blocked workunit) to pool acquisition.

Fixes #15808.

[ci skip-build-wheels]
stuhood added a commit to stuhood/pants that referenced this issue Jun 23, 2022
… the process parallelism (pantsbuild#15903)

As described in pantsbuild#15808, the assumption that the nailgun pool runs under an appropriately sized semaphore has not been true since pantsbuild#15224, and results in an error when memory controls cause the pool size to be smaller than the process parallelism.

To resolve that, we add an additional semaphore (and blocked workunit) to pool acquisition.

Fixes pantsbuild#15808.

[ci skip-build-wheels]
stuhood added a commit that referenced this issue Jun 23, 2022
… the process parallelism (Cherry-pick of #15903) (#15905)

As described in #15808, the assumption that the nailgun pool runs under an appropriately sized semaphore has not been true since #15224, and results in an error when memory controls cause the pool size to be smaller than the process parallelism.

To resolve that, we add an additional semaphore (and blocked workunit) to pool acquisition.

Fixes #15808.

[ci skip-build-wheels]
stuhood added a commit to stuhood/pants that referenced this issue Jun 24, 2022
… the process parallelism (pantsbuild#15903)

As described in pantsbuild#15808, the assumption that the nailgun pool runs under an appropriately sized semaphore has not been true since pantsbuild#15224, and results in an error when memory controls cause the pool size to be smaller than the process parallelism.

To resolve that, we add an additional semaphore (and blocked workunit) to pool acquisition.

Fixes pantsbuild#15808.

[ci skip-build-wheels]
stuhood added a commit that referenced this issue Jun 24, 2022
… the process parallelism (Cherry-pick of #15903) (#15917)

As described in #15808, the assumption that the nailgun pool runs under an appropriately sized semaphore has not been true since #15224, and results in an error when memory controls cause the pool size to be smaller than the process parallelism.

To resolve that, we add an additional semaphore (and blocked workunit) to pool acquisition.

Fixes #15808.

[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants