-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
gRPC using reflect race on registering types #3961
Comments
Hi @jason-speck, thanks for reporting this 🙇 This doesn't really have anything to do with the executors apart from likely making this more common or not. By the looks of this is due to a race in the registration of types when using k6/js/modules/k6/grpc/client.go Lines 448 to 454 in fc1d5cd
While the underlying code k6/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go Lines 493 to 511 in 7e82c3d
Has mutex it is after we do the Not found check so 2 different VUs doing gRPC requests can get to this point together. And then one will register it holding the lock while the other one will wait and then try to do it again. The latter will get the error you are seeing. I think that :
@jason-speck you can probably try the propose from the faq of running with |
constant-arrival-rate
tests on grpc services
@mstoykov will this be part of Nov-11 release? Also:
|
Hi @sharathjag, nobody has picked this up so it seems like currently it won't be part of it. I would argue both 1 and 2, but at least 2 to fix the issue. I will argue though that it should be both so that we do not mix types. If you want you are free to work on this, but we might decide to still postpone merging this PR after the v0.55.0 release. Especially if the changes seem too big and the PR comes next week. |
With the release being one week away, I'll move this to the next release (to avoid slowing down the release process, and risking introducing last minute issues) 🙇🏻 |
Brief summary
We have tests that use
constant-arrival-rate
executor against a number of grpc applications. We are using reflection. Most of these run fine. Against some applications, we occasionally receive a panic:This is not completely deterministic. However, for applications where it occurs, the probability increases as we increase
rate
.As a workaround we are switching these tests to
ramping-arrival-rate
, but ideally we would like to be able to useconstant-arrival-rate
.(I've obfuscated actual host and service names in all output)
k6 version
v0.53.0
OS
Mariner 2.0.20240628
Docker version and image (if applicable)
n/a
Steps to reproduce the problem
version:
OS:
Simple test script. See attached for script and output from several runs. Note the panic line may show different grpc endpoints, it doesn't always show the same one (I gather this is related to reflection).
Expected behaviour
Test executes.
Actual behaviour
See attached output files.
k6.js.txt
k6.out.1.txt
k6.out.2.txt
k6.out.3.txt
The text was updated successfully, but these errors were encountered: