fix service crash when request_with_retries response is None #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when get_task invoke request_with_retries from service-server, if timeout, service will be crash, and then process stop,pod restart。
i met this issue in testing javadecompiler function.
service-server log:
{"@timestamp": "2025-01-06 19:45:41,340", "event": { "module": "assemblyline", "dataset": "assemblyline.dispatching.client" }, "host": { "ip": "10.244.51.99", "hostname": "service-server-79564465bc-7bhfg" }, "log": { "level": "WARNING", "logger": "assemblyline.dispatching.client" }, "process": { "pid": "10" }, "message": "[5m2ph3koTNghus87PKa2Dq/34b74ac57609efa5a423aef33aa4156dcbe06eb76141dc3d3f590302276595c7] JavaClassDecompiler could not find the specified task in its set of running tasks while processing successful results."}
javadecompiler log:
{"@timestamp": "2025-01-06 19:45:40,971", "event": { "module": "assemblyline", "dataset": "assemblyline.service.task_handler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "WARNING", "logger": "assemblyline.service.task_handler" }, "process": { "pid": "41" }, "message": "We've timed out on: http://service-server:5003/api/v1/task/ (HTTPConnectionPool(host='service-server', port=5003): Read timed out. (read timeout=30)) Retrying.."}
{"@timestamp": "2025-01-06 19:45:41,344", "event": { "module": "assemblyline", "dataset": "assemblyline.service.task_handler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.task_handler" }, "process": { "pid": "41" }, "message": "Requesting a task with 30s timeout..."}
{"@timestamp": "2025-01-06 19:45:46,021", "event": { "module": "assemblyline", "dataset": "assemblyline.service.task_handler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.task_handler" }, "process": { "pid": "41" }, "message": "Instance caught signal. Coming down..."}
{"@timestamp": "2025-01-06 19:45:46,021", "event": { "module": "assemblyline", "dataset": "assemblyline.service.task_handler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.task_handler" }, "process": { "pid": "41" }, "message": "Closing task_fifo named pipes..."}
{"@timestamp": "2025-01-06 19:45:46,021", "event": { "module": "assemblyline", "dataset": "assemblyline.service.javaclassdecompiler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.javaclassdecompiler" }, "process": { "pid": "40" }, "message": "Received an empty message for Task fifo. Cleaning up..."}
{"@timestamp": "2025-01-06 19:45:46,021", "event": { "module": "assemblyline", "dataset": "assemblyline.service.javaclassdecompiler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.javaclassdecompiler" }, "process": { "pid": "40" }, "message": "Closing named pipes..."}
{"@timestamp": "2025-01-06 19:45:46,021", "event": { "module": "assemblyline", "dataset": "assemblyline.service.javaclassdecompiler" }, "host": { "ip": "10.244.82.15", "hostname": "alsvc-javaclassdecompiler-85967f76-b247n" }, "log": { "level": "INFO", "logger": "assemblyline.service.javaclassdecompiler" }, "process": { "pid": "40" }, "message": "Stopping service: JavaClassDecompiler"}