Azure / Azure/azure-functions-host

RpcFunctionMetadata - script_file is empty in the request from host to java worker

Open
#8,645 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### Investigative information

Exception observed in Functions logs
```
Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: Failure
Exception: IllegalArgumentException: "" is not a qualified JAR file name
Stack: java.lang.IllegalArgumentException: "" is not a qualified JAR file name
at com.microsoft.azure.functions.worker.description.FunctionMethodDescriptor.guardAgainstUnqualifiedJarPath(FunctionMethodDescriptor.java:141)
at com.microsoft.azure.functions.worker.description.FunctionMethodDescriptor.validate(FunctionMethodDescriptor.java:106)
at com.microsoft.azure.functions.worker.broker.JavaFunctionBroker.loadMethod(JavaFunctionBroker.java:37)
at com.microsoft.azure.functions.worker.handler.FunctionLoadRequestHandler.execute(FunctionLoadRequestHandler.java:27)
at com.microsoft.azure.functions.worker.handler.FunctionLoadRequestHandler.execute(FunctionLoadRequestHandler.java:9)
at com.microsoft.azure.functions.worker.handler.MessageHandler.handle(MessageHandler.java:45)
at com.microsoft.azure.functions.worker.JavaWorkerClient$StreamingMessagePeer.lambda$onNext$0(JavaWorkerClient.java:92)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```

This happens when RpcFunctionMetadata has empty [script_file](https://github.com/Azure/azure-functions-language-worker-protobuf/blob/dev/src/proto/FunctionRpc.proto#L300) being passed to the Java worker.

IcM - https://portal.microsofticm.com/imp/v3/incidents/details/316217064/home

Please provide the following:

- Timestamp: 2022-06-22 22:00
- Function App version: 3.7.1.0
- Function App name: sla-ws-func-prod-bay-071-v3-hot-java-zip-001
- Function name(s) (as appropriate): http trigger
- Region: West US

#### Repro steps

Provide the steps required to reproduce the problem: Do not know repro steps. Host to send empty script file can be a way to repro

#### Expected behavior

Jar location must be passed in the script_file and Java worker must execute the function

#### Actual behavior

Jar location passed is empty as the script_file is empty so the Java worker is not initialized correctly but host is sending further requests.

Host versions where this issue is seen
3.8.2.0
3.10.2.0
3.11.0.0
2.0.15229.0
3.7.1.0
3.12.0.0
3.12.1.

Contributor guide

Open the contributing guide

Research direction

Start by reading the FunctionRpc.proto definition for RpcFunctionMetadata.script_file and tracing how the host sends it to the Java worker. Use the reported empty script_file failure as the reproduction target; done means the host sends the jar location and the Java worker initializes and executes the function without the validation exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.