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

k6 run ends up in fatal error #41

Closed
mariomann opened this issue Jul 6, 2022 · 5 comments · Fixed by #42
Closed

k6 run ends up in fatal error #41

mariomann opened this issue Jul 6, 2022 · 5 comments · Fixed by #42

Comments

@mariomann
Copy link

mariomann commented Jul 6, 2022

Hi all,

Based on the blog post load test Grafana loki with Grafana k6 I want to load test my loki installation.
I try to use k6 with loki extension. I followed the installation guide but any test with a push method ends up with the fatal error.

$ ./k6 run ./basic_test.js

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

WARN[0001] Running in multi-tenant-mode. Each VU has its own X-Scope-OrgID
  execution: local
     script: ./basic_test.js
     output: -

  scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
           * default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)

WARN[0001] Running in multi-tenant-mode. Each VU has its own X-Scope-OrgID
WARN[0001] Running in multi-tenant-mode. Each VU has its own X-Scope-OrgID
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x465e3f]

You can find the hole go stack-trace as an attachment

I've tested it on MacOS 12.4 and Ubuntu 20.04.3 LTS (Focal Fossa) the same error on both systems.
Go-Version: go1.18.3 (both in MacOs and Ubuntu)

Am I doing something wrong? How can I solve the problem?

It is possible to query logs with the method instantQuery() but it's not possible to push any logs, neither with the push() method nor with the pushParameterized() Method.

Sample test:

import loki from 'k6/x/loki';

let conf = loki.Config("http://localhost:3100");
let client = loki.Client(conf);

export default () => {
   client.push();
};
@mstoykov
Copy link
Contributor

mstoykov commented Jul 6, 2022

Looking at the numbers of open panic issues in json-iterator ... it seems to me it might be a bad idea to use it ...

@WFSVK
Copy link

WFSVK commented Jul 6, 2022

@mstoykov Could you, please, elaborate your thought?
Do you mean it requires deeper analyze and no workaround on user side?

@mstoykov
Copy link
Contributor

mstoykov commented Jul 7, 2022

Can you try both #42 and #43 and see if any of those help?

@mariomann
Copy link
Author

Hi @mstoykov,

thx for your reply. I've tested it with #42 and #43 and it looks good to me 👍 no panic errors any more but successful load tests 😄

@mstoykov
Copy link
Contributor

mstoykov commented Jul 7, 2022

Thanks for testing 🙇

@mstoykov mstoykov linked a pull request Jul 7, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants