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
Invoking a worker with an invalid function name via the /invoke or /invoke-and-await endpoint causes the worker to enter an endless running state. Interrupting the worker also fails. This issue occurs when the function specified in the request does not exist or is malformed. On invoke-and-await it does return a valid 500 Internal Server Error.
Steps to Reproduce:
Deploy a component and worker using the Golem backend server.
Construct a POST request to the worker's /invoke or /invoke-and-await endpoint.
In the request payload, specify a function parameter with an invalid or non-existent function name (For shopping-cart.wasm, invoke?function=golem:component/api.{checkout} is a valid function, Invoke at invoke?function=checkout or invoke?function=badinvoke:{badcheckout}). The params parameter is irrelevant to the bug.
Send the POST request.
Expected Behavior:
The Golem backend should:
Return a 500 Internal Server Error indicating that the function name is invalid. (Which it does), and the worker should enter a failed state.
or Return a 400 Bad Request response, and let the worker be unaffected.
Maybe add failed invoke to the OPlog
Actual Behavior:
The worker enters an endless running state.
/invoke-and-await returns 500 Internal Server Error.
Attempting to interrupt the worker fails.
Environment:
Golem Backend Server Version: 1.1.6
Example (PowerShell for Reproduction):
Use your specific component and worker IDs, the following PowerShell snippet illustrates the general process of triggering the bug:
# Replace with your actual values $componentId="<your_component_id>"$workerId="<your_worker_id>"$url="http://localhost:9881/v1/components/$componentId/workers/$workerId/invoke-and-await?function=invalid:function"$jsonPayload='{ "params": [] }'try {
$response=Invoke-RestMethod-Uri $url-Method Post -ContentType 'application/json'-Body $jsonPayloadWrite-Host"Response from server:"$response|ConvertTo-Json|Write-Host
} catch {
Write-Host"Error occurred:"Write-Host$_.Exception.Message
}
The text was updated successfully, but these errors were encountered:
Description:
Invoking a worker with an invalid function name via the
/invoke
or/invoke-and-await
endpoint causes the worker to enter an endless running state. Interrupting the worker also fails. This issue occurs when the function specified in the request does not exist or is malformed. On invoke-and-await it does return a valid 500 Internal Server Error.Steps to Reproduce:
/invoke
or/invoke-and-await
endpoint.function
parameter with an invalid or non-existent function name (For shopping-cart.wasm,invoke?function=golem:component/api.{checkout}
is a valid function, Invoke atinvoke?function=checkout
orinvoke?function=badinvoke:{badcheckout}
). Theparams
parameter is irrelevant to the bug.Expected Behavior:
The Golem backend should:
500 Internal Server Error
indicating that the function name is invalid. (Which it does), and the worker should enter a failed state.400 Bad Request
response, and let the worker be unaffected.Actual Behavior:
/invoke-and-await
returns500 Internal Server Error
.Environment:
Example (PowerShell for Reproduction):
Use your specific component and worker IDs, the following PowerShell snippet illustrates the general process of triggering the bug:
The text was updated successfully, but these errors were encountered: