-
-
Notifications
You must be signed in to change notification settings - Fork 676
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
Getting segfault when running gopackagesdriver on v0.40.0 & v0.41.0 #3604
Comments
@JamyDev Do you happen to have an idea what could cause this? |
Yeah I just ran into this and have a potential patch as well |
Effectively the recent changes to the driver here remove a critical piece that mapped a request for |
Nice fix! Was running into this as well. |
I am having the same SIGSEGV at the same line using 0.40.1 and gazelle 0.24.0
Do not know how to call the driver directly but it happens when gazelle is doing "something" with org_golang_x_crypto:
Version 0.39.1 shows a DEBUG with the |
I am also seeing a panic with [email protected]. Seems like there is still an issue and this should either be renamed and reopened, or I can create a new issue if preferred.
|
CC @JamyDev |
I noticed some comments, e.g. #3659 (comment), mentioning that this could be related to bzlmod, but in our case we are not using bzlmod at all yet — we have these versions:
Our workaround for now has been to patch |
I can confirm the workaround mentioned by @ian-h-chamberlain (reverting both commits) also works in my context.
Some additional remarks from my debugging efforts so far:
|
We probably need to wait for #3659 to be fixed before we can fully address this, which in turn requires bazelbuild/bazel#19508 and thus Bazel 6.4.0 (hopefully we can still get it in). |
TL;DR; for anyone new to this issue: an official fix has been merged but only for bazel version +6.4.0, for anyone on an older bazel version, this advice from Ian to create a patch from these two revert commits fixes the problem. |
fwiw we have some patches at Uber that resolve this segfault. I'm looking at contributing this back, but not without writing some integration tests for this driver first. Patch 1 fixes the panic, but may mean some packages don't get resolved. For us this was fixed with adding some extra attrs to the aspect in the driver. Seemed that for us the trouble was that in case of code generated through one of our custom rules that defines a plugins attribute, bazel wouldn't run the aspect on those plugins (it wasn't an attr in the aspect, so that's sort of expected), and causing missing data in the registry of the packagesdriver. Now that shouldn't segfault, hence patch 1, but the root cause was elsewhere. |
What version of rules_go are you using?
v0.40.0
What version of gazelle are you using?
v0.24.0
What version of Bazel are you using?
bazel 6.2.1
Does this issue reproduce with the latest releases of all the above?
Seems like it only occurs with rules_go v0.40.0 as v0.39.1 works fine.
What operating system and processor architecture are you using?
Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Any other potentially useful information about your toolchain?
No.
What did you do?
where
gopackagesdriver.sh
has the following contents:What did you expect to see?
No error/panic.
What did you see instead?
The text was updated successfully, but these errors were encountered: