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

Integrated ZSH terminal - job table full or recursion limit exceeded #163843

Closed
kb-ig opened this issue Oct 17, 2022 · 16 comments · Fixed by #165174
Closed

Integrated ZSH terminal - job table full or recursion limit exceeded #163843

kb-ig opened this issue Oct 17, 2022 · 16 comments · Fixed by #165174
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-zsh An issue in the terminal specific to zsh verified Verification succeeded
Milestone

Comments

@kb-ig
Copy link

kb-ig commented Oct 17, 2022

Type: Bug

Since updating to 1.72.1 1.72.2, I have been constantly getting the following error in the integrated terminal:

/tmp/user-code-zsh/.zshenv:9: job table full or recursion limit exceeded

This path points to a file with the following contents

# ---------------------------------------------------------------------------------------------
#   Copyright (c) Microsoft Corporation. All rights reserved.
#   Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------------------------------------------------------
if [[ -f $USER_ZDOTDIR/.zshenv ]]; then
	VSCODE_ZDOTDIR=$ZDOTDIR
	ZDOTDIR=$USER_ZDOTDIR

	. $USER_ZDOTDIR/.zshenv

	USER_ZDOTDIR=$ZDOTDIR
	ZDOTDIR=$VSCODE_ZDOTDIR
fi

This only happens when using an integrated terminal in VSCode. My external ZSH terminal works completely fine. Worth mentioning that I'm on ZSH 5.8.

Anyone know why I'm getting this error, and more importantly, how I can go about resolving it? Thanks!

VS Code version: Code 1.72.1 (129500e, 2022-10-10T17:23:00.760Z)
OS version: Linux x64 5.15.0-50-generic
Modes:
Sandboxed: No

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 1, 1
Memory (System) 15.42GB (4.94GB free)
Process Argv --unity-launch --crash-reporter-id ad7882f2-984b-450e-ae5e-1e0bdc951aa3
Screen Reader no
VM 0%
DESKTOP_SESSION zorin
XDG_CURRENT_DESKTOP zorin:GNOME
XDG_SESSION_DESKTOP zorin
XDG_SESSION_TYPE x11
Extensions (28)
Extension Author (truncated) Version
svgo 100 2.8.1
vscode-openapi 42C 4.14.1
theme-verdandi be5 2.0.1
vscode-icontheme-nomo-dark be5 1.3.6
vscode-uplift-code Car 0.2.3
path-intellisense chr 2.8.1
dart-code Dar 3.50.0
flutter Dar 3.50.0
vscode-markdownlint Dav 0.48.1
macos-modern-theme dav 2.3.16
prettier-vscode esb 9.9.0
vscode-firefox-debug fir 2.9.8
vscode-jest-runner fir 0.4.59
remotehub Git 0.44.0
todo-tree Gru 0.0.219
xd-theme jef 0.2.15
vscode-codemetrics kis 1.24.0
i18n-ally lok 2.8.1
gitless maa 11.7.2
csharp ms- 1.25.0
remote-repositories ms- 0.22.0
vsliveshare ms- 1.0.5735
vscode-jest Ort 5.0.0
prisma Pri 4.4.0
vscode-yaml red 1.10.1
glassit s-n 0.2.4
svg-preview Sim 2.8.3
ayu tea 1.0.5

(18 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
2144e591:30553903
vsccc:30566497
pyindex848:30577860
nodejswelcome1:30587005
40g7c324:30573242

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.72.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@kb-ig
Copy link
Author

kb-ig commented Oct 17, 2022

Worth nothing that I've just updated to 1.72.2 following the message above, and still get the same error.

Also worth noting, this issue does not happen if I:

  • Open a new, empty VSCode window
  • Load a folder via File > Open Folder

However does happen when I:

  • Open a folder from VSCode integrated terminal, e.g. code ../my-other-folder -r (with or without the -r flag)

@meganrogge
Copy link
Contributor

Can you reproduce this in insiders? Believe this has been fixed

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Oct 18, 2022
@kb-ig
Copy link
Author

kb-ig commented Oct 18, 2022

@meganrogge Same problem in insiders. Same error pointing to the same file (albeit in the user-code-insiders-zsh directory rather than user-code-zsh ).

@meganrogge
Copy link
Contributor

This would happen if your $USER_ZDOTDIR is set to the $VSCODE_ZDOTDIR.

What is the output of env?

@kb-ig
Copy link
Author

kb-ig commented Oct 18, 2022

In my env, USER_ZDOTDIR is set to /tmp/user-code-zsh, and VSCODE_ZDOTDIR doesnt exist.

Full env

Note, this is the full env output from a VSCode integrated terminal while this issue is present:

GJS_DEBUG_TOPICS=JS ERROR;JS LOG
LANGUAGE=en_GB:en
USER=user
SSH_AGENT_PID=2167
XDG_SESSION_TYPE=x11
SHLVL=2
HOME=/home/user
DESKTOP_SESSION=zorin
QT_STYLE_OVERRIDE=adwaita
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/code.desktop
GTK_MODULES=gail:atk-bridge
GNOME_SHELL_SESSION_MODE=zorin
MANAGERPID=1967
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
LIBVIRT_DEFAULT_URI=qemu:///system
GIO_LAUNCHED_DESKTOP_FILE_PID=15539
IM_CONFIG_PHASE=1
MANDATORY_PATH=/usr/share/gconf/zorin.mandatory.path
QT_QPA_PLATFORMTHEME=gtk3
LOGNAME=user
_=/usr/bin/env
JOURNAL_STREAM=8:63823
DEFAULTS_PATH=/usr/share/gconf/zorin.default.path
XDG_SESSION_CLASS=user
USERNAME=user
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
WINDOWPATH=2
PATH=/home/user/.nvm/versions/node/v14.19.1/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
SESSION_MANAGER=local/kb-ig-zorinos:@/tmp/.ICE-unix/2204,unix/kb-ig-zorinos:/tmp/.ICE-unix/2204
INVOCATION_ID=56393fec89004ca3a70ebbe3027a0c03
XDG_RUNTIME_DIR=/run/user/1000
XDG_MENU_PREFIX=gnome-
DISPLAY=:0
LANG=en_GB.UTF-8
XDG_CURRENT_DESKTOP=zorin:GNOME
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_SESSION_DESKTOP=zorin
XMODIFIERS=@im=ibus
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SHELL=/usr/bin/zsh
QT_ACCESSIBILITY=1
GDMSESSION=zorin
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GJS_DEBUG_OUTPUT=stderr
QT_IM_MODULE=ibus
PWD=/home/user/repos/my-repo
XDG_DATA_DIRS=/usr/share/zorin:/home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_CONFIG_DIRS=/etc/xdg/xdg-zorin:/etc/xdg
CHROME_DESKTOP=code-url-handler.desktop
ORIGINAL_XDG_CURRENT_DESKTOP=zorin:GNOME
GDK_BACKEND=x11
GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh
LESS=-R
NVM_BIN=/home/user/.nvm/versions/node/v14.19.1/bin
TERM_PROGRAM_VERSION=1.72.2
ZSH=/home/user/.oh-my-zsh
LSCOLORS=Gxfxcxdxbxegedabagacad
NVM_INC=/home/user/.nvm/versions/node/v14.19.1/include/node
PAGER=less
NODE_OPTIONS=--require /home/user/.config/Code/User/workspaceStorage/6fe1921ff1ccecd157b69df24e4ff4dd/ms-vscode.js-debug/bootloader.js                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
P9K_TTY=old
COLORTERM=truecolor
NVM_DIR=/home/user/.nvm
AWS_SDK_LOAD_CONFIG=1
USER_ZDOTDIR=/tmp/user-code-zsh
TERM=xterm-256color
TERM_PROGRAM=vscode
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
AWS_PROFILE=dev
P9K_SSH=0
NVM_CD_FLAGS=-q
ZDOTDIR=/tmp/user-code-zsh
_P9K_TTY=/dev/pts/1
NO_AT_BRIDGE=1
VSCODE_INSPECTOR_OPTIONS=:::{"inspectorIpc":"/tmp/node-cdp.42730-1.sock.deferred","deferredMode":true,"waitForDebugger":"","execPath":"/home/user/.nvm/versions/node/v14.19.1/bin/node","onlyEntrypoint":false,"autoAttachMode":"smart","aaPatterns":["/home/user/repos/my-repo/**","!**/node_modules/**","**/$KNOWN_TOOLS$/**"]}
VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code
VSCODE_GIT_ASKPASS_EXTRA_ARGS=--ms-enable-electron-run-as-node
VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js
VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-7e30d38ab8.sock
VSCODE_INJECTION=1

@meganrogge
Copy link
Contributor

I see the issue - we should not be setting the zdotdir if the user_zdotdir is our temp directory

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal-shell-zsh An issue in the terminal specific to zsh labels Oct 18, 2022
@meganrogge meganrogge removed the info-needed Issue requires more information from poster label Oct 18, 2022
@lbirkert
Copy link

lbirkert commented Nov 1, 2022

Is there any quick workaround for this?

meganrogge added a commit that referenced this issue Nov 1, 2022
@meganrogge
Copy link
Contributor

@KekOnTheWorld you should be able to try the fix in insider's tomorrow

@felipecrs
Copy link
Contributor

OMG this issue is so annoying! Even disabling the shell integration does not seem to help.

@lbirkert
Copy link

lbirkert commented Nov 1, 2022

I actually found it working when i just restarted vscode using my launcher. When starting vscode from a terminal the issue still occurs

meganrogge added a commit that referenced this issue Nov 1, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 1, 2022
@connor4312 connor4312 added verified Verification succeeded and removed verified Verification succeeded labels Nov 30, 2022
@connor4312 connor4312 added the author-verification-requested Issues potentially verifiable by issue author label Nov 30, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@kb-ig, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 9908b3d of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@kb-ig
Copy link
Author

kb-ig commented Dec 1, 2022

This does not appear to have been resolved in insiders. While I no longer see the error message mentioned in the description, my integrated terminal is still broken, in that I cannot use any of the zsh functionality.

As an example, when I load the IDE via launcher and open a folder via the File > Open Folder, my integrated zsh terminal works as expected, displaying something like:

╭─   ~/repos/my-repo   fix/my-bug *1                                                 
╰─❯ 

However when opening the editor via the terminal, my integrated zsh terminal displays something like:

my-machine-name% 

And in the latter case, none of the zsh functionality works.

Version info

Version: 1.74.0-insider
Commit: c87fa19f7932cefa1abeac4dd85ade3983780e14
Date: 2022-12-01T05:21:51.018Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-56-generic
Sandboxed: Yes

After re-reading my original bug description, I realise I never mentioned that the zsh functionality wasnt working, so that's my bad. Perhaps these two issues are unrelated (recursion limit exceeded and zsh terminal becoming a "basic terminal"), but they appeared at the same time.

@meganrogge
Copy link
Contributor

@kb-ig thanks for the info - that sounds like a separate issue.

am I correct in my understanding that you see the issue when you open via the cli IE code-insiders but not otherwise?

@kb-ig
Copy link
Author

kb-ig commented Dec 1, 2022

@meganrogge Correct, but for both code-insiders and code.

So to confirm, opening VSCode (insiders and normal) via CLI causes this issue. However opening VSCode (insiders and normal) via app launcher is OK.

@meganrogge
Copy link
Contributor

While I no longer see the error message mentioned in the description,

Considering this verified as the fix was meant to prevent the recursion from happening, which worked based on the above. Will deal with the other issue separately

@meganrogge meganrogge added the verified Verification succeeded label Dec 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-zsh An issue in the terminal specific to zsh verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants