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

after restore, some panes do not have a login shell #315

Open
tessus opened this issue Nov 22, 2019 · 6 comments
Open

after restore, some panes do not have a login shell #315

tessus opened this issue Nov 22, 2019 · 6 comments

Comments

@tessus
Copy link
Contributor

tessus commented Nov 22, 2019

This is a very strange problem, because it makes no sense and happens randomly.

e.g. one tmux session, 3 windows, 2 panes in windows 1 and 2 each (5 panes total).

When I create my windows and panes, everything is fine. Saving also works, but when I restore my session, some of the panes (and this happens randomly), usually 2 or 3, but mostly different ones do not have a login session, but just bash with the default prompt and none of my settings (aliases, PATH modifications, ...). When I kill the tmux server and restore again, this could happen on other panes than it did the first time, and the panes that had that issue before are fine.
This tells me that it is not inherently the pane's fault or how bash is spawned.

Additional info: I'm using bash5 from Macports, which is added to /etc/shells and I've used chsh to switch the default shell for my user. Although I have seen this behavior with the standard shell that comes with the OS as well.

I suspect that there is a race condition when opening a bunch of shells at the same time. We either hit a lock that prevents another starting shell to read the proper profile, or another side effect creeps up somewhere.

Has anyone seen this problem as well and is there a solution?

@tessus
Copy link
Contributor Author

tessus commented Nov 22, 2019

Oh, I apparently solved the issue 3 years ago in #94 (comment) and @lwilke created a PR #281 to solve the issue once and for all.

Can you please merge this? Or ist this project dead? In that case I patch my local copy and be done with it.

@tessus
Copy link
Contributor Author

tessus commented Nov 22, 2019

The strange part however is that it only happens with a few random panes, so there's another problem that we haven't understood yet. Something is certainly off and it should be fixed. #281 is also only workaround but it's better than nothing.
And unless you find the root cause, this is the only workable solution right now.

I don't want to be bitchy but #94 has been open for almost 5 years.

@bruno-
Copy link
Member

bruno- commented Nov 27, 2019

#281 is now merged. Thank you for the patience.

@tessus
Copy link
Contributor Author

tessus commented Nov 29, 2019

Thank you for merging this. However, the root cause still hasn't be found. The fact that this only happens to random panes is rather strange, don't you think?

@ScottG489
Copy link

I'm having this issue as well. I'm on a mac if that matters and I can't confirm but I think this issue is also present on my Linux desktop.

I'm also pretty sure this doesn't happen for me on random panes, it seems very consistent.

@54keesh
Copy link

54keesh commented Jan 8, 2024

I am having the same issue on zsh upon every restore.

@ScottG489 Thats due to zsh being the default shell of mac and tmux resurrect doesnt invoke login shells for any shell other than bash.

I have resolved that and added a PR, @bruno- kindly review and merge that for zsh users.

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

4 participants