Open jason-speck opened 2 weeks ago
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 reflect
While the underlying code
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 :
GlobalTypes
to begin withcc @olegbespalov
@jason-speck you can probably try the propose from the faq
of running with GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn k6 ...
to not get this as an error.
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