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

reuse_server: kill/restart it after timeout #49

Open
blueyed opened this issue Jul 29, 2017 · 5 comments
Open

reuse_server: kill/restart it after timeout #49

blueyed opened this issue Jul 29, 2017 · 5 comments

Comments

@blueyed
Copy link

blueyed commented Jul 29, 2017

After a bunch (15-20) tests the suite from https://github.com/Vimjas/vim-python-pep8-indent stalls.

Adding some puts the last --remote-expr is vim --servername VIMRUNNER0.687345666041246 --remote-expr feedkeys("iclass Foo(\<CR>")

In this case vim --servername VIMRUNNER0.687345666041246 --remote-expr 1 hangs already.

It would be nice if this could be detected and e.g. after a few seconds the server getting restarted.

A good idea might be to send a ping always --remote-expr 1 and have a short timeout for this.

It looks like a bug in Vim after all - I cannot pinpoin it to a single test, and I've not looked at strace too closely, but vim is taking ~60% CPU.

@AndrewRadev
Copy link
Owner

Yeah, I've noticed this issue in the past. For larger test suites, Vim hangs. I'm not sure if it's a bug with Vim, or some problem in the way I spawn processes, but I have no idea how to debug it, either :/.

I'll consider your ideas about auto-restarting. For the moment, a quick fix is to use gvim (or mvim on a Mac). With Vimrunner, it's Vimrunner.start_gvim. That one doesn't seem to hang. If you start xvfb-run in your build, it won't be a problem, even in travis.

@blueyed
Copy link
Author

blueyed commented Jul 29, 2017

I've tried using xvfb-run explicitly, and it did not seem to help?!
Also in Docker with ENTRYPOINT ["sh", "-c", "xvfb-run rspec spec -f doc $@", "ignore"].

@blueyed
Copy link
Author

blueyed commented Jul 29, 2017

  1. it also happens with IO.popen instead of PTY
  2. it seems to make sense to include --noplugin -i NONE as Vim options (from looking at what -V10/tmp/vim.log provides).

@AndrewRadev
Copy link
Owner

I've tried using xvfb-run explicitly, and it did not seem to help?!

But did you try it with the graphical version of Vim? What I'm saying is that, in my experience, the gui version doesn't hang.

it seems to make sense to include --noplugin -i NONE as Vim options (from looking at what -V10/tmp/vim.log provides).

That might make sense. I'll see about making that change and check if it breaks anything. In general, I'm not sure what exactly --noplugin disables, so I'll need to experiment with it a bit.

@blueyed
Copy link
Author

blueyed commented Jul 30, 2017

Ah, misunderstood it. gvim works for me, too.

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

2 participants