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
On Linux environments, a race condition may lead the host to initialize placeholder (warmup) function.
Repro steps
Deploy a function app in Flex Consumption with a worker that will fail initialization (e.g., crash at startup)
The platform will restart the host. During the restart, the LinuxInstanceManager.StartAssignment logic runs, which pushes site assignment to a background task (see the line of code here).
Because this assignment call is “fire and forget,” the environment variable indicating the host is no longer in placeholder mode sometimes isn’t set before the host initialization proceeds.
The host detects placeholder mode environment settings and incorrectly indexes the placeholder (warmup) function.
Expected behavior
The host should wait for the assignment to complete before initializing the JobHost so placeholder information (as well as application settings) is correctly applied. As a result, it should not index the placeholder/warmup function if the assignment step has actually completed.
Actual behavior
Due to the race condition, the host sometimes sees the environment as still in placeholder mode because the assignment logic hasn’t finished setting the appropriate environment variables. This leads the host to index the placeholder function incorrectly.
The text was updated successfully, but these errors were encountered:
There is a hosted service called LinuxContainerInitializationHostedService (base for Atlas and Legion container abstractions), and the method inside called ApplySiteContextIfPresent is in the initialization path for the JobHost (see here). When this call is made quickly, JobHost begins to initialize, and the race starts.
On Linux environments, a race condition may lead the host to initialize placeholder (
warmup
) function.Repro steps
Deploy a function app in Flex Consumption with a worker that will fail initialization (e.g., crash at startup)
The platform will restart the host. During the restart, the LinuxInstanceManager.StartAssignment logic runs, which pushes site assignment to a background task (see the line of code here).
Because this assignment call is “fire and forget,” the environment variable indicating the host is no longer in placeholder mode sometimes isn’t set before the host initialization proceeds.
The host detects placeholder mode environment settings and incorrectly indexes the placeholder (warmup) function.
Expected behavior
The host should wait for the assignment to complete before initializing the
JobHost
so placeholder information (as well as application settings) is correctly applied. As a result, it should not index the placeholder/warmup function if the assignment step has actually completed.Actual behavior
Due to the race condition, the host sometimes sees the environment as still in placeholder mode because the assignment logic hasn’t finished setting the appropriate environment variables. This leads the host to index the placeholder function incorrectly.
The text was updated successfully, but these errors were encountered: