-
Notifications
You must be signed in to change notification settings - Fork 455
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
Host Recycles causing AccessViolations #2367
Comments
Note that this has been around for a while and will ultimately cause the process to crash/restart. |
Closing this as won't fix since this is a V1 only bug with minimal impact (we can revisit if this behavior ends up causing customer issues in production). |
No we won't be revisiting this. In v2 we no longer use EdgeJs as our execution engine for Javascript, so investing time in pushing for an EdgeJs fix for this issue doesn't make sense for us. No firm date for v2 GA yet - ball park, this fall or end of the year. |
@eHealthManny - update: V2 is now GA! |
In certain situations the runtime initiates a host shutdown via
HostingEnvironment.InitiateShutdown
, for example when an unhandled global exception occurs, when a functionTimeoutException
is thrown, or when performance counter thresholds are exceeded (HostHealthMonitor). This results in a new AppDomain being created in the same process.When the FunctionApp includes Node.js functions, this AppDomain recycling can trigger the existing known issue reported here, resulting in AccessViolations like the following when a new host is initialized in the new AppDomain:
The issue is that within the process we've already initialized Edge.JS, however when we recycle the AppDomain we try to initialize again, triggering the bug.
Ideally we'd fix the Edge.JS bug - or find a workaround for it. An option until that happens would be for us to change the host recycle logic such that if Node.JS is being used, we do a harder process recycle (e.g.
Process.Close()
).Note that these recycles are already happening in situations where an error is forcing the host to restart, so the effect of this bug currently is to just make the host restart process take a bit longer. I.e. an error occurs, we recycle the app domain, when the host spins up it causes an AV which kills the process.
The text was updated successfully, but these errors were encountered: