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

Warning clutters output of cjdk exec (macOS) #18

Closed
marktsuchida opened this issue Jul 5, 2022 · 0 comments · Fixed by #19
Closed

Warning clutters output of cjdk exec (macOS) #18

marktsuchida opened this issue Jul 5, 2022 · 0 comments · Fixed by #19

Comments

@marktsuchida
Copy link
Collaborator

marktsuchida commented Jul 5, 2022

The CLI exec command on macOS (arm64) often produces a warning like this:

$ cjdk -j temurin-jre:17 --index-ttl=0 exec java -version
/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode)

It is seen only if a download occurred (including of the index), and only with exec (i.e., not with java-home).

Of our immediate dependencies, only tqdm uses multiprocessing (tqdm is called even when progress bars are hidden, including for index download). Deleting all uses of tqdm does in fact get rid of the warning.

So this looks similar to conda/conda#9589 (whose resolution (or lack thereof) is not immediately clear to me). It may be python/cpython#90549, which is fixed in trunk and backported to the next Python 3.10 release. (Or maybe not; it could be more specific to the use of os.exec*.)

marktsuchida added a commit that referenced this issue Jul 9, 2022
This fixes #18 and works beautifully in interactive Jupyter, but not
with Jupyter Book (every update of the progress bars get included as a
new line).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant