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

Tests are hanging #6

Open
manics opened this issue Sep 6, 2021 · 2 comments
Open

Tests are hanging #6

manics opened this issue Sep 6, 2021 · 2 comments

Comments

@manics
Copy link
Owner

manics commented Sep 6, 2021

The repo2docker tests are hanging. This is reproducible locally as well as in the GitHub workflow:

git clone --depth 1 --single-branch https://github.com/jupyter/repo2docker tests-repo2docker
for d in ./tests-repo2docker/tests/*/; do
  if [ "${d##*tests/}" != "unit/" ]; then
    cp -a $d tests
  fi
done

pytest -vs tests/base
@manics
Copy link
Owner Author

manics commented Sep 6, 2021

It looks like podman logs --follow is hanging
https://github.com/manics/repo2docker-podman/blob/508df4ad6543fe7954a08f2c9c8d327c1c46e0d5/repo2podman/podman.py#L157
This is called by app.wait_for_container
https://github.com/manics/repo2docker-podman/blob/508df4ad6543fe7954a08f2c9c8d327c1c46e0d5/tests/conftest.py#L67
in R2D
https://github.com/jupyterhub/repo2docker/blob/2021.08.0/repo2docker/app.py#L634-L637

I can reproduce this locally with a container built by repo2docker podman:

podman run --publish 53461:53461 --detach 2fjupyter-2frepo2docker-2dpodman-2ftests-2fbase-2fnode1630931613 jupyter notebook --ip 0.0.0.0 --port 53461 --NotebookApp.custom_display_url=http://127.0.0.1:53461
podman stop test
podman logs --follow test
# hangs

but not with busybox:

podman run --name test --detach busybox sleep 1h
podman stop test
podman logs --follow test
# returns straight away

There are old reports of this, e.g. containers/podman#6531

manics added a commit that referenced this issue Sep 10, 2021
`podman logs --follow` doesn't always exit when the container exits, causing repo2docker to hang
#6

This is reproducible with repo2docker images but not a simple image like busybox or nginx.

This PR works around it by running `podman logs --follow` in a separate thread, and checking whether the container has exited in the main thread
manics added a commit that referenced this issue Sep 10, 2021
`podman logs --follow` doesn't always exit when the container exits, causing repo2docker to hang
#6

This is reproducible with repo2docker images but not a simple image like busybox or nginx.

This PR works around it by running `podman logs --follow` in a separate thread, and checking whether the container has exited in the main thread
@manics
Copy link
Owner Author

manics commented Sep 10, 2021

A workaround is in #7
but should figure out the underlying problem.

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

No branches or pull requests

1 participant