You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but after goja has stopped running the above code.
This is ... Extremely hard to do which is why this is low prio.
Also this is only a problem after #2800 as before this the context was not cancelled.
This will also not be a problem if/when we do not use babel unless someone writes this code.
And finally as this happens mostly at the beginning of the test and the window is really small in the real world it is very unlikely. The case it was noticed is with unplanned VUs for arrival rate but even there I needed to use sleep to reproduce it.
Brief summary
Under very specific situations initialization of a VU can panic.
This requires that getting an export includes calling a function as is the case when the internal babel transpiles
export * from "./a.js"
to
(you can see it in the playground here)
And the run context was cancelled between the k6 running the init context
k6/js/bundle.go
Lines 320 to 334 in bbfe357
and getting the exports in
k6/js/bundle.go
Line 234 in bbfe357
This in practice means that the interrupt from
k6/js/bundle.go
Line 314 in bbfe357
k6/js/bundle.go
Line 335 in bbfe357
This is ... Extremely hard to do which is why this is low prio.
Also this is only a problem after #2800 as before this the context was not cancelled.
This will also not be a problem if/when we do not use babel unless someone writes this code.
And finally as this happens mostly at the beginning of the test and the window is really small in the real world it is very unlikely. The case it was noticed is with unplanned VUs for arrival rate but even there I needed to use
sleep
to reproduce it.k6 version
v0.43.0 (not released), commit: bbfe357
OS
all
Docker version and image (if applicable)
No response
Steps to reproduce the problem
k6/js/bundle.go
Line 335 in bbfe357
export *
and a.js being
Expected behaviour
No panic
Actual behaviour
The text was updated successfully, but these errors were encountered: