waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

rcfile too large, exceeds read buffer size

Open danny-su opened this issue 2 years ago • 7 comments

93736

danny-su avatar Dec 02 '23 09:12 danny-su

thanks for submitting. usually this happens when you are defining a lot of functions in your bashrc/bash_profile. do you mind sharing your bash startup files (feel free to redact anything sensitive)?

i can make the buffer larger, but i'm curious what frameworks (like nvm or asdf etc) are causing the size bloat.

sawka avatar Dec 04 '23 00:12 sawka

@sawka

export MONO_GAC_PREFIX="/usr/local" export GOROOT="/opt/homebrew/opt/go/libexec" export GOPATH="$HOME/go" export ANDROID_HOME="$HOME/Library/Android/sdk" export JAVA_HOME="$(/usr/libexec/java_home)" export CLASSPATH=".:/opt/homebrew/opt/aspectj/libexec/aspectj/lib/aspectjrt.jar" export GROOVY_HOME="/opt/homebrew/opt/groovy/libexec" export GRAALVM_HOME="/Library/Java/JavaVirtualMachines/graalvm-17.jdk/Contents/Home" export GRAILS_HOME="/opt/homebrew/opt/grails/libexec" export MVND_HOME="/opt/homebrew/opt/mvnd/libexec" export HOMEBREW_GITHUB_API_TOKEN="" export HOMEBREW_FORCE_BREWED_CURL=1 export RUST_SRC_PATH="$HOME/.multirust/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src" export MODULAR_HOME="$HOME/.modular" export SWIFTENV_ROOT="/opt/homebrew/var/swiftenv"

export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH" export PATH="$HOME/.codon/bin:$HOME/.modular/pkg/packages.modular.com_mojo/bin:$HOME/.cargo/bin:$PATH" export PATH="$(go env GOPATH)/bin:$HOME/.vimpkg/bin:$(brew --prefix llvm)/bin:$PATH" export PATH="/opt/homebrew/opt/texinfo/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/curl/bin:$PATH" export PATH="$HOME/Library/Android/sdk/platform-tools:$HOME/.pub-cache/bin:$HOME/.fastlane/bin:$PATH" export PATH="/opt/homebrew/opt/ruby/bin:/opt/homebrew/opt/libpcap/bin:/opt/homebrew/opt/qt/bin:$PATH" export PATH="/opt/homebrew/opt/openssl@3/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/opt/sphinx-doc/bin:$PATH" export PATH="$HOME/.dotnet/tools:$HOME/.deno/bin:$HOME/.dapr/bin:$HOME/.nimble/bin:$PATH" export PATH="$HOME/.local/share/containers/podman-desktop/extensions-storage/podman-desktop.compose/bin:$PATH"

export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)"

export PATH="$HOME/.tiup/bin:$PATH"

if which swiftenv > /dev/null; then eval "$(swiftenv init -)"; fi

source "$HOME/.cargo/env" export PATH="$PATH:/Applications/010 Editor.app/Contents/CmdLine"

export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH" export PATH="$HOME/.meteor:$PATH"

export PATH="$HOME/.jenv/bin:$PATH" eval "$(jenv init -)"

export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/opt/llvm/lib -L/opt/homebrew/opt/qt/lib -L/opt/homebrew/opt/libpcap/lib -L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/openblas/lib -L/opt/homebrew/opt/ruby/lib" export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/opt/llvm/include -I/opt/homebrew/opt/qt/include -I/opt/homebrew/opt/libpcap/include -I/opt/homebrew/opt/zlib/include -I/opt/homebrew/opt/openblas/include -I/opt/homebrew/opt/ruby/include" export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig:/opt/homebrew/opt/openssl@3/lib/pkgconfig:/opt/homebrew/opt/qt/lib/pkgconfig:$PKG_CONFIG_PATH"

[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion

alias cl='colorls' alias cll='colorls -lA --sd'

danny-su avatar Dec 04 '23 06:12 danny-su

great, thanks for this! this should be enough to go on. it is usually the things like "jenv init", "pyenv init", etc. that cause a lot of bash functions to be created (usually to support command completion).

sawka avatar Dec 07 '23 22:12 sawka

[error] error running command: rcfile too large, exceeds read buffer size size:1205288

Same issue on macOS. I believe the abundance of functions is due to bash-completion, which Homebrew automatically manages when new command-line tools are installed.

$ env | wc
      37      38    1817

$ set | wc
   40576   71863 1204799

$ complete -p | wc
     191     895    6304

cheyilin avatar Dec 18 '23 17:12 cheyilin

got the same problem with a relatively compact bashrc

Arthur2500 avatar Jul 08 '24 13:07 Arthur2500

The zsh is well, but bash is the same error.

snowyu avatar Sep 13 '24 06:09 snowyu