Движок остаётся в состоянии Running после выхода процесса на границе запуска

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
backend

Research direction

Start with ProcessEngineBase.cs:133–139 and :173–183, then inspect the existing process engine tests. Reproduce the race with a controlled process exit during the final HasExited check. Done when startup reports failure or transitions to Failed and performs the usual cleanup, with a deterministic regression test.

Written by the indexing model from the issue text.

Description

bug network

Приоритет P1 · milestone 0.4.1

При выходе процесса сразу после последней проверки готовности оболочка может опубликовать Running для уже завершённого движка и пропустить аварийную очистку.

Воспроизведение с фейковым процессом

  1. В последнем чтении HasExited сохранить false, синхронно вызвать Exited с кодом 1 и вернуть сохранённое false.
  2. Дождаться окончания StartAsync. Процесс завершён, состояние движка — Running.

Причина: ProcessEngineBase.cs:133–139 проверяет HasExited перед SetState(Running). OnProcessExited (:173–183) игнорирует событие в состоянии Starting. Событие между проверкой и публикацией Running теряется.

Доказательство: детерминированный изолированный прогон вывел Dead process during final HasExited check; engine state=Running.

Ожидаемо: запуск сообщает сбой либо состояние сразу переходит в Failed с обычной очисткой.

Направление исправления: синхронизировать публикацию состояния и событие выхода или запоминать выход до завершения запуска. Добавить воспроизводящий тест с управляемым событием.

Аудит ffa65648867139f9e45c15f4b635a83c1ff52c1b.

Dominant language
C#
Stars
5
Forks
1
Avg merge
23m
Merged PRs (30d)
144

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from endercodezz/BYDLO

All issues in endercodezz/BYDLO

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.