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

Removing the tab binary after an upgrade breaks the running tab daemon #163

Closed
userxfce opened this issue Oct 4, 2020 · 5 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@userxfce
Copy link

userxfce commented Oct 4, 2020

under xubuntu 20.04 terminal (bash, also rxvt, gnome-terminal), "tab foo" hangs

workaround: removing ~/.tab/ and reinstalling via "tab --install all" solves it

@austinjones austinjones added the bug Something isn't working label Oct 4, 2020
@austinjones
Copy link
Owner

austinjones commented Oct 4, 2020

Hi @userxfce,
Thanks for all the bug reports! This one is really interesting - and I saw it once when I ran 'cargo uninstall' and then 'brew install'. I think what happened here is the v0.3.7 tab binary was removed. The daemon re-launches it's own executable to spawn PTY processes, and if the tab binary is removed it can't do this.

Removing the ~/.tab directory was what fixed it - because it removed the daemon pidfile. You can also use tab --shutdown after installing a new version to trigger a complete shutdown of the daemon and all PTY processes.

I think there are a few things that can be improved here:

  • Add documentation that tab --shutdown is recommended after upgrades.
  • Print a warning if the daemon binary and the command-line binary are not the same, and suggest tab --shutdown.
  • Print a stronger warning (or refuse to connect) if there are breaking API changes between the command-line and daemon binaries.

I also have an item on the backlog (#44) to shut down the daemon when the tab binary changes, but I've been holding off on implementing it because I'm worried about conflicting installations (e.g. both cargo and homebrew) causing weird behavior with daemon shutdowns.

@austinjones austinjones changed the title upgrade from 0.3.7 to 0.3.8 breaks Removing the tab binary after an upgrade breaks the running tab daemon Oct 4, 2020
@austinjones austinjones added this to the 0.4.0 milestone Oct 5, 2020
@austinjones
Copy link
Owner

The tab daemon should monitor it's own executable, as well as the tab runtime directory. If the file doesn't exist, it should trigger a global shutdown.

@austinjones
Copy link
Owner

In 0.4.0, there are incompatibility warnings for two cases (added in #180).

  • If the tab daemon was launched from a different executable file path than the tab client
  • If the tab daemon is on a different non-patch version than the tab client (e.g. 0.3.X vs 0.4.X)

Both warning messages recommend tab --shutdown.

I decided against auto-shutdown if the tab executable is removed because existing tabs still work in this case - and those tabs may have local servers, ssh sessions, etc.

@userxfce
Copy link
Author

After having run "tab --install all", and then "tab -shutdown", now running "tab" no longer hangs.
I think this should be closed.

@austinjones
Copy link
Owner

Closing, v0.4.0 is released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants