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

Recover from panics caused by goja #1665

Closed
wants to merge 1 commit into from
Closed

Conversation

2hamed
Copy link

@2hamed 2hamed commented Oct 8, 2020

Making sure k6 never panics (#1601 and #1487) by adding defer..recover blocks. I'm not sure about the performance penalty though.

making sure k6 never panics
@CLAassistant
Copy link

CLAassistant commented Oct 8, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@na-- na-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this PR and sorry for the late review!

Unfortunately the current change you propose doesn't encompass all executors. Looking at the code, it might be better to have a single recover() block in the lambda returned by the getIterationRunner() helper function, which is used in all executors: https://github.com/loadimpact/k6/blob/c22338c57edc61d808c5d0ec4f3b6f2c3b68fcfb/lib/executor/helpers.go#L82

Also, I don't see a reason for changing the import order?

Edit: also, could you please rebase on the latest master, we've switched our CI system to GitHub Actions now.

@mstoykov mstoykov mentioned this pull request Oct 30, 2020
@mstoykov
Copy link
Contributor

mstoykov commented Nov 2, 2020

Thanks for the PR @2hamed , but I wanted to actually get this in v0.29.0 and add some goja stack trace so I did this in #1697, and now that this is merged I need to close this PR, sorry :(.

@mstoykov mstoykov closed this Nov 2, 2020
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 this pull request may close these issues.

4 participants