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

Opening a shell prompt in a python session hangs #357

Open
olevski opened this issue Jun 14, 2023 · 3 comments
Open

Opening a shell prompt in a python session hangs #357

olevski opened this issue Jun 14, 2023 · 3 comments
Labels
kind/bug Something isn't working status/triage Issue needs to be triaged

Comments

@olevski
Copy link
Member

olevski commented Jun 14, 2023

Details:

  • image: renku/renkulab-py:3.9-0.17.0
  • deployment: limited

Opening a terminal does not give a prompt immediately. It just hangs for a long time. Pressing ctrl-c during this time gives this error:

File "/opt/conda/bin/powerline-shell", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.9/site-packages/powerline_shell/__init__.py", line 240, in main
    segment.add_to_powerline()
  File "/opt/conda/lib/python3.9/site-packages/powerline_shell/segments/git.py", line 71, in add_to_powerline
    self.join()
  File "/opt/conda/lib/python3.9/threading.py", line 1060, in join
    self._wait_for_tstate_lock()
  File "/opt/conda/lib/python3.9/threading.py", line 1080, in _wait_for_tstate_lock
    if lock.acquire(block, timeout):

Therefore it is most likely powerline-shell causing this.

The powerline-shell version in this session was 0.7.0.

@olevski olevski added kind/bug Something isn't working status/triage Issue needs to be triaged labels Jun 14, 2023
@github-project-automation github-project-automation bot moved this to Backlog in renku-python Jun 14, 2023
@olevski
Copy link
Member Author

olevski commented Jun 14, 2023

Also considering that the latest version of this is from a while ago:
image

We should simply consider switching to something else. Ideally something that is compiled and/or much more simple to install and not a python package.

@olevski
Copy link
Member Author

olevski commented Jun 15, 2023

From Rok:

For me, starting a local session hangs the terminal with this project: https://renkulab.io/projects/rok.roskar/adore

I do renku session start, then first I got a message about "dubious repository ownership" and after fixing that I do docker exec -ti bash and the shell hangs. Going into the container with sh I can run top and see

891 jovyan 20 0 721448 13516 7340 S 5.3 0.1 1:20.70 git-lfs
1057 jovyan 20 0 721704 13924 7596 S 5.3 0.1 1:10.31 git-lfs
1134 jovyan 20 0 721448 14928 8440 S 5.0 0.1 1:08.39 git-lfs
889 jovyan 20 0 7660 4148 3760 S 0.7 0.0 0:10.88 git
1055 jovyan 20 0 7660 4148 3760 S 0.7 0.0 0:10.11 git
(edit: I tried it with the new image from this PR)

@olevski
Copy link
Member Author

olevski commented Dec 8, 2023

We did switch to powerline-go. But it seems that the opening of the shell still hangs.

I just wanted to post a few issues here from the powerline-go repo for reference:

The most promising suggestion is to set a limit on the maximum size of the git index. If it is larger than some value it is not checked by powerline shell. This index will grow if you have a lot of large uncommitted files.

Another option that may be worth checking is setting git config --global core.preloadIndex false someone reports in the older issue (no 61) that their startup time improved significantly with this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage Issue needs to be triaged
Projects
Status: Backlog
Development

No branches or pull requests

1 participant