-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Install go using aqua broke gopls LSP server #710
Comments
It's hard to reproduce the problem because the information of |
Yes, but it's also happening with So the problem is only happening when the exec is handled by |
https://aquaproj.github.io/docs/reference/lazy-install aqua-proxy internally executes the command |
Very weird, I'm looking at I just tried symlinking |
You can execute tools installed by aqua without aqua-proxy by e.g. $ aqua exec -- go version
go version go1.18.1 darwin/arm64 |
You can reproduce the problem by running |
I use this golang/go#51643 (comment) I run |
@suzuki-shunsuke what code editor are u using? Maybe I can try to reproduce this in vscode too? |
I'm using NeoVim. macOS arm64 $ nvim --version
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected] $ aqua which go
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/http/golang.org/dl/go1.18.1.darwin-arm64.tar.gz/go/bin/go
$ go version
go version go1.18.1 darwin/arm64
$ which go
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin/go $ gopls version
golang.org/x/tools/gopls v0.7.5
golang.org/x/tools/[email protected] h1:8Az52YwcFXTWPvrRomns1C0N+zlgTyyPKWvRazO9GG8= |
Try this:
Here's my recording of the crash: https://asciinema.org/a/emF4nCQnWJpLgV2qiSkdntmPq |
I tried VSCode and VSCode also crash immediately. |
I can confirm vscode also crashes. Cross linking the issue from vscode-go extension: golang/vscode-go#2229 |
I wonder if using |
Ref: aquaproj/aqua#710 Signed-off-by: Noel Georgi <[email protected]>
Oh, I didn't know this package. This is interesting. https://pkg.go.dev/golang.org/x/[email protected]/unix#pkg-overview
https://pkg.go.dev/golang.org/x/[email protected]/unix#Exec syscall package is locked down. https://pkg.go.dev/syscall#pkg-overview
|
so i think the problem is that when aqua executed a package it's a subprocess as seen from the process tree tilix─┬─fish───viddy─┬─aqua─┬─viddy───13*[{viddy}] as opposed to calling the binary directly from the path, ─tilix─┬─fish───viddy───9*[{viddy}] so if using the |
thanks for finding that, I need to update some code (forgot it was moved to sys package) |
Here is how my
|
Maybe we can replace os.Exec in aqua/pkg/controller/exec/exec.go Lines 79 to 107 in 849ccae
|
That'd be cool, less code to maintain |
WIP #715 |
It works well. #715 aquaproj/aqua-proxy#25 The process tree is good. $ nvim $ pstree -s nvim
-+= 00001 root /sbin/launchd
\-+= 00743 shunsukesuzuki /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
\-+= 54801 root login -pf shunsukesuzuki
\-+= 54802 shunsukesuzuki -zsh
\--= 46635 shunsukesuzuki nvim |
Awesome work, really appreciate fixing it this fast ❤️ |
I've published prerelease versions.
I'd like to verify them for a while. Please update aqua to v1.6.0-0. $ aqua -v
aqua version 1.6.0-0 (da98e9d04300ed3daad3710389430193bf4b2248) aqua.yaml registries:
- type: standard
ref: v2.14.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: neovim/[email protected] $ aqua i # aqua-proxy would be updated to v1.1.0-0
INFO[0000] download and unarchive the package aqua_version=1.6.0-0 package_name=aqua-proxy package_version=v1.1.0-0 program=aqua registry= $ nvim $ pstree -s nvim
-+= 00001 root /sbin/launchd
\-+= 00743 shunsukesuzuki /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
\-+= 75216 root login -pf shunsukesuzuki
\-+= 75217 shunsukesuzuki -zsh
\--= 90024 shunsukesuzuki nvim aqua.yaml |
Thanks! I just tested it and it works now.
After:
You can close this issue or I can close it now. |
You are using Linux but I'm using macOS amd64 and arm64. |
I see there's a commit by renovate that update the |
You were using version from 9 releases old. |
I build the latest main branch b6bd86d , but the problem isn't solved. |
This is just an idea, but I'm considering to release this feature as an experimental feature. e.g. $ export AQUA_EXPERIMENTAL_FEATURES=x_sys_exec # comma separated |
I'm fine with this |
I launched Linux amd64 on macOS amd64 with lima-vm and tested, then it works good. $ limactl --version
limactl version 0.10.0 shunsuke-suzuki@lima-default:/Users/shunsuke-suzuki/repos/src/github.com/aquaproj/aqua-registry$ hyperfine 'tfcmt -v'
Benchmark 1: tfcmt -v
Time (mean ± σ): 60.6 ms ± 4.5 ms [User: 19.6 ms, System: 49.8 ms]
Range (min … max): 52.5 ms … 70.6 ms 41 runs
shunsuke-suzuki@lima-default:/Users/shunsuke-suzuki/repos/src/github.com/aquaproj/aqua-registry$ hyperfine 'ci-info -v'
Benchmark 1: ci-info -v
Time (mean ± σ): 62.1 ms ± 7.1 ms [User: 21.2 ms, System: 52.8 ms]
Range (min … max): 51.4 ms … 88.5 ms 41 runs
shunsuke-suzuki@lima-default:/Users/shunsuke-suzuki/repos/src/github.com/aquaproj/aqua-registry$ hyperfine 'tfmigrator -v'
Benchmark 1: tfmigrator -v
Time (mean ± σ): 76.3 ms ± 36.1 ms [User: 27.1 ms, System: 52.4 ms]
Range (min … max): 58.9 ms … 200.9 ms 14 runs
Warning: The first benchmarking run for this command was significantly slower than the rest (200.9 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run. |
So the problem is only on darwin, both x86_64 and arm64? Maybe we should report to upstream? Or maybe there's a way to make |
The issue is reproduced on both darwin amd64 and darwin arm64. |
To report to upstream, we want to find the procedure to reproduce the issue with less dependencies. |
sorry I couldn't be of much help with darwin |
I've released the prerelease version aqua-proxy v1.1.0-1 and aqua v1.6.0-2. https://github.com/aquaproj/aqua-proxy/releases/tag/v1.1.0-1 Please set the environment variable $ export AQUA_EXPERIMENTAL_X_SYS_EXEC=true The problem has been reproduced with GitHub Actions. |
Use aqua experimental `exec` mode Ref: aquaproj/aqua#710 (comment) Signed-off-by: Noel Georgi <[email protected]>
I've tested with aqua version |
Thank you for your confirmation. |
Released. https://github.com/aquaproj/aqua/releases/tag/v1.6.0 And I've created an issue to track the above problem. #729 Let me close this issue now. Thank you for your contribution! |
@budimanjojo @frezbo |
@suzuki-shunsuke Tested and it works fine without the env variable on v2.5.0. Thanks! |
Thanks for following this up after a long time ❤️ |
aqua version
Please use the latest version.
Environment
Overview
How to reproduce
Actual Behaviour
When golang binary is in
/usr/local/go/bin/go
, My neovim which is running gopls LSP client is not crashing onpackage
orimport
completion. But when golang binary is in~/.local/share/aquaproj-aqua/bin/go
, it will crash neovim without any log at all.Important Factoids
References
The text was updated successfully, but these errors were encountered: