lablup / lablup/backend.ai

Prevent kernel-runner crash due to malformed service-def json files

Open
#6,312 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Currently, `BaseRunner._init()` method in the `ai.backend.kernel.base` module invokes `self.service_parser.parse()` and the `parse()` method may raise `InvalidServiceDefinition` upon unexpected `IOError` and `json.JSONDecodeError` while scanning and reading the json files in the given (dir) path.

The problem is that there is no catch-guard outside (it is directly invoked in `ai.backend.kernel.__main__` as the main “setup” coroutine after instantiating the concrete class inherting `BaseRunner`), effectively **crashing** the kernel runner.

JIRA Issue: BA-2751

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.