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
Parsing this syntactically incorrect js fragment triggers https://github.com/bblfsh/sdk/issues/371 but if a bblfshd is used instead of the driver directly - this condition kick the bblfhsd v2.11.7 into the infinite loop on the next request to the same driver
Logs
time="2019-02-21T21:11:10Z" level=error msg="error re-scaling pool: context canceled" language=javascript
time="2019-02-21T21:11:10Z" level=debug msg="scaling driver pool from 0 instance(s) to 1 instance(s)" language=javascript
time="2019-02-21T21:11:10Z" level=debug msg="spawning driver instance "bblfsh/javascript-driver:latest" ..."
time="2019-02-21T21:11:10Z" level=error msg="error re-scaling pool: context canceled" language=javascript
time="2019-02-21T21:11:10Z" level=debug msg="scaling driver pool from 0 instance(s) to 1 instance(s)" language=javascript
time="2019-02-21T21:11:10Z" level=debug msg="spawning driver instance "bblfsh/javascript-driver:latest" ..."
Previous changes added a context argument to newDriverPool, which is
called when the first request for the driver is received. By mistake,
the context of this first request is captured by the closure and is used
to create all other driver instances. Thus, if the first request
specifies the context timeout and fails for some reason, all future
requests will fails with "context cancelled" error.
Instead, we need to pass the real context from the user request down to
the pool's driver factory function.
This is not an ideal way of managing drivers - pool should be managed by
a separate goroutine. This will be implemented later. This is merely a
hotfix for the real issue.
Signed-off-by: Denys Smirnov <denys@sourced.tech>
Previous changes added a context argument to newDriverPool, which is
called when the first request for the driver is received. By mistake,
the context of this first request is captured by the closure and is used
to create all other driver instances. Thus, if the first request
specifies the context timeout and fails for some reason, all future
requests will fails with "context cancelled" error.
Instead, we need to pass the real context from the user request down to
the pool's driver factory function.
This is not an ideal way of managing drivers - pool should be managed by
a separate goroutine. This will be implemented later. This is merely a
hotfix for the real issue.
Signed-off-by: Denys Smirnov <denys@sourced.tech>
Parsing this syntactically incorrect js fragment triggers https://github.com/bblfsh/sdk/issues/371 but if a
bblfshd
is used instead of the driver directly - this condition kick thebblfhsd v2.11.7
into the infinite loop on the next request to the same driverLogs
Could be related to #252
Steps to reproduce
Same as in https://github.com/bblfsh/sdk/issues/371 but with
bblfshd
instead of only the driver.The text was updated successfully, but these errors were encountered: