Skip to content
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

Scripted check using 'k6/net/grpc' causes panic when writing output #832

Open
peterschretlen opened this issue Aug 22, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@peterschretlen
Copy link
Contributor

The following script will run as a k6 scripted check

import { Client, StatusOK } from 'k6/net/grpc';
import { check, sleep } from 'k6';

const client = new Client({});

export default () => {
  client.connect('grpcbin.test.k6.io:9001', {
    reflect: true
  });

  const data = { greeting: 'Bert' };
  const response = client.invoke('hello.HelloService/SayHello', data);

  console.log(response.status)

  check(response, {
    'status is OK': (r) => r && r.status === StatusOK,
  });

  console.log(JSON.stringify(response.message));

  client.close();
};

However it generates no output. There is a panic at targetMetricsCollection.Write

screenshot of the output:
image

@roobre
Copy link
Collaborator

roobre commented Aug 26, 2024

The unexpected k6 panic log seems to come from k6 itself: https://github.com/grafana/k6/blob/6116f7b97cc55d7c1ee9a73c28e721c64e1d8b32/cmd/root.go#L100

However the script above does not seem to fail on latest k6.

@peterschretlen peterschretlen added the bug Something isn't working label Sep 18, 2024
@peterschretlen peterschretlen assigned d0ugal and unassigned The-9880 Sep 18, 2024
@d0ugal
Copy link

d0ugal commented Oct 21, 2024

grafana/xk6-sm#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants