This is an annoying bug related to ZSH and python virtualenvwrapper. I couldn't find any clue on this anywhere on the web, so I am going to make a new post in SU!


  1. Use ZSH, and python virtualenvwrapper is installed (so that workon command works)
  2. Type into the shell, % workon <TAB> to trigger tab-completion of available virtual environments.
  3. Then, ZSH crashes and the current shell is closed unexpectedly.

Why does this happen? Who is the culprit, zsh or virtualenvwrapper?


AFAIK, zsh is suspicious, since we can find segmentation fault log messages.

Segfault happend at: 0x452005 <popheap+85>: mov 0x18(%r12),%rdi PC(0x00452005) ok

Sometimes (but hardly) works well, but almost always it is reproducible for several machines. I am now going to inspect on this, for various environments, for zsh versions, or for other configurations.

Environments in which I've experienced:

  • Linux Ubuntu 12.04.02 LTS (Kernel: Linux 3.2.0-54-generic x86_64)
  • ZSH: zsh 4.3.17-1ubuntu1

  • UPD1 : Reproducible also in the latest ZSH, 5.0.2 (configured and compiled from the source)




Seems like the problem is with ZSH plugin 'virtualenvwrapper' on systems with a particular virtualenvwrapper environment. For instannce; I installed manually rather than using 'pip install virtualenvwrapper.'

Removing `virtualenvwrapper' from my .zshrc seemed to work–around the issue. I would bet that reinstalling virtualenvwrapper using pip will fix the issue in many cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.