docs: record pipeline-reliability verify evidence on 399da05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Память контейнера worker
|
||||
|
||||
- Команда: разовая проба на рабочем стенде через LB (`student-tests/images.py`, `api_client.py`): для каждого случая `docker stop` worker, две одинаковые загрузки, `docker start` (новая cgroup: `memory.peak` с нуля), ожидание `ready` обоих, затем `/proc/1/status`, `memory.peak`, `memory.events` контейнера, `docker inspect`, журнал worker
|
||||
- Дата: 2026-10-31, 15:57:24–15:57:52 UTC; проба дошла до конца без исключения (код выхода не записан), разовый скрипт в репозиторий не входит. Перед этим прогоном были ещё два: первый — без файлов на обеих границах, те же числа в пределах 2 МиБ у `render_peak` и `VmHWM`, `memory.peak` до 857 МиБ; второй остановился на 413: файл пробы вышел больше 10 MiB, ошибка самой пробы
|
||||
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево чистое
|
||||
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`; worker 1 CPU / 1 ГБ без swap, конкуренция 2, `render_memory_limit_mib` 450
|
||||
- Спеки: `attachment-processing` «Изображение в лимите пикселей», design change `pipeline-reliability`, решение 7, «Уточнения apply», п. 13 и 19
|
||||
- Столбцы: `render_peak_kib` записи «Attachment became ready» по двум заданиям; «пересеклись» — оба задания начаты раньше, чем первое стало `ready`; `VmHWM` и `VmRSS` — процесс 1 worker; `memory.peak` — вся cgroup контейнера с процессами обработки. Файлы «40 Мпкс и ~10 MiB»: начало строк — шум, остальное — нули, поэтому обе границы контракта достигнуты разом
|
||||
|
||||
| Два файла разом | Файл, МиБ | `render_peak`, МиБ | `render_ms` | Пересеклись | `VmHWM`, МиБ | `VmRSS`, МиБ | `memory.peak`, МиБ | `oom` / `oom_kill` | `OOMKilled` | Рестарты |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| PNG из шума 10 MiB, 1868 × 1868 | 9,99 | 84 / 84 | 840 / 856 | да | 159 | 110 | 261 | 0 / 0 | false | 0 |
|
||||
| PNG RGBA 8 бит, 40 Мпкс | 0,15 | 357 / 357 | 872 / 885 | да | 111 | 110 | 794 | 0 / 0 | false | 0 |
|
||||
| PNG серый с альфой 8 бит, 40 Мпкс | 0,07 | 357 / 357 | 723 / 775 | да | 110 | 110 | 795 | 0 / 0 | false | 0 |
|
||||
| PNG RGB 8 бит с tRNS, 40 Мпкс | 0,11 | 357 / 357 | 908 / 929 | да | 110 | 110 | 791 | 0 / 0 | false | 0 |
|
||||
| PNG RGB 16 бит с tRNS, 40 Мпкс | 0,22 | 357 / 357 | 1036 / 1037 | да | 111 | 110 | 795 | 0 / 0 | false | 0 |
|
||||
| PNG палитра с tRNS, 40 Мпкс | 0,04 | 357 / 357 | 740 / 750 | да | 110 | 110 | 794 | 0 / 0 | false | 0 |
|
||||
| PNG серый 16 бит, 40 Мпкс | 0,07 | 404 / 404 | 706 / 712 | да | 110 | 110 | 888 | 0 / 0 | false | 0 |
|
||||
| PNG RGBA 8 бит, 40 Мпкс и ~10 MiB | 9,85 | 366 / 367 | 1226 / 1288 | да | 157 | 111 | 832 | 0 / 0 | false | 0 |
|
||||
| PNG серый 16 бит, 40 Мпкс и ~10 MiB | 9,79 | 414 / 414 | 723 / 730 | да | 154 | 115 | 905 | 0 / 0 | false | 0 |
|
||||
|
||||
Итог:
|
||||
|
||||
- все задания `ready`; ни одного `oom` и `oom_kill`, `OOMKilled` false, рестартов нет;
|
||||
- самый дорогой файл в пределах контракта — серый 16 бит на обеих границах: `render_peak` 414 МиБ при лимите 450, `memory.peak` контейнера 905 МиБ при лимите 1024;
|
||||
- верхняя оценка суммой пиков, которые на деле не совпадают по времени: 159 + 2 × 414 = 987 МиБ < 1 ГБ.
|
||||
+63
-28
@@ -1,12 +1,12 @@
|
||||
# Процесс worker
|
||||
|
||||
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 worker-process`
|
||||
- Дата: 2026-10-31, 13:25:24–13:26:05 UTC; код выхода 0
|
||||
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
|
||||
- Дата: 2026-10-31, 15:58:11–16:01:07 UTC; код выхода 0
|
||||
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
|
||||
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
|
||||
- Спеки: `container-run`, `container-image`, `graceful-shutdown`, `service-configuration`
|
||||
- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2, запись называет поле без значения; значения по умолчанию и подмена окружением; остановка простаивающего и на старте; «Worker переживает рестарт хранилищ»
|
||||
- Вывод сокращён: однотипные строки таблицы «record names …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым
|
||||
- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2, запись называет поле без значения; значения по умолчанию и подмена окружением; остановка простаивающего и на старте; «Worker переживает рестарт хранилищ»; остановка на двух дорогих JPEG: 8,15 с, при замороженных PostgreSQL и брокере 9,18 с, граница 9,5 с (design, решение 19), код 0, задания после этого дошли по аренде до `failed`, `limit_cpu`
|
||||
- Вывод сокращён: однотипные строки таблицы «record names …», «default …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым
|
||||
|
||||
```text
|
||||
Started worker:
|
||||
@@ -39,34 +39,69 @@ WORKER__GRACEFUL_SHUTDOWN_SECONDS=9: exit 2, errors [{'loc': 'worker.graceful_sh
|
||||
WORKER__RENDER_MEMORY_LIMIT_MIB=0: exit 2, errors [{'loc': 'worker.render_memory_limit_mib', 'msg': 'Input should be greater than or equal to 1'}]
|
||||
WORKER__RENDER_TIMEOUT_SECONDS=120: exit 2, errors [{'loc': 'worker.render_timeout_seconds', 'msg': 'Value error, must be less than job_timeout_seconds'}]
|
||||
docker compose stop worker: 0.2 s
|
||||
docker stop after 0.3 s: 0.07 s, exit 0, records ['Stopped worker before startup']
|
||||
docker stop after 0.2 s: 0.06 s, exit 0, records ['Stopped worker before startup']
|
||||
docker stop after 0.3 s: 0.06 s, exit 0, records ['Stopped worker before startup']
|
||||
docker stop after 0.2 s: 0.05 s, exit 0, records ['Stopped worker before startup']
|
||||
docker stop after 0.4 s: 0.07 s, exit 0, records ['Stopped worker before startup']
|
||||
PID 1 of the worker expected python -m src.worker got python -m src.worker
|
||||
healthcheck expected NONE got NONE
|
||||
limit NanoCpus expected 1000000000 got 1000000000
|
||||
limit Memory expected 1073741824 got 1073741824
|
||||
_imaging in mtusi-lab5-api-10 expected no got no
|
||||
_imaging in mtusi-lab5-api-9 expected no got no
|
||||
_imaging in PID 1 of the worker expected no got no
|
||||
Pillow in the image = uv.lock expected 13.0.0 got 13.0.0
|
||||
stop under load: docker stop worker took 8.15 s
|
||||
stop frozen storage: docker stop worker took 9.18 s
|
||||
PID 1 of the worker expected python -m src.worker got python -m src.worker
|
||||
healthcheck expected NONE got NONE
|
||||
limit NanoCpus expected 1000000000 got 1000000000
|
||||
limit Memory expected 1073741824 got 1073741824
|
||||
_imaging in mtusi-lab5-api-15 expected no got no
|
||||
_imaging in mtusi-lab5-api-16 expected no got no
|
||||
API replicas checked expected yes got yes
|
||||
_imaging in PID 1 of the worker expected no got no
|
||||
Pillow in the image = uv.lock expected 13.0.0 got 13.0.0
|
||||
'Started worker' record, every field named, defaults as above: expected = got
|
||||
six invalid WORKER__* : exit code 2, names the field, hides the value: expected = got
|
||||
env override concurrency expected 3 got 3
|
||||
env override reconnect_seconds expected 1.0 got 1.0
|
||||
stop idle: command exit code expected 0 got 0
|
||||
stop idle: container exit code expected 0 got 0
|
||||
stop idle: under 10 s expected yes got yes
|
||||
stop idle: last record expected Stopped worker got Stopped worker
|
||||
stop idle: record exit_code expected 0 got 0
|
||||
env override container started expected 0 got 0
|
||||
env override concurrency expected 3 got 3
|
||||
env override reconnect_seconds expected 1.0 got 1.0
|
||||
stop idle: command exit code expected 0 got 0
|
||||
stop idle: container exit code expected 0 got 0
|
||||
stop idle: under 10 s expected yes got yes
|
||||
stop idle: last record expected Stopped worker got Stopped worker
|
||||
stop idle: record exit_code expected 0 got 0
|
||||
docker compose start worker expected 0 got 0
|
||||
early stop 0.2, 0.3, 0.4 s: docker stop 0, exit code 0, within 1 s: expected = got
|
||||
'Stopped worker before startup' seen expected yes got yes
|
||||
scripts/restart.sh expected 0 got 0
|
||||
LB ready after restart expected yes got yes
|
||||
worker StartedAt unchanged expected yes got yes
|
||||
worker RestartCount expected 0 got 0
|
||||
new upload after restart expected 202 got 202
|
||||
new upload becomes ready expected yes got yes
|
||||
'Stopped worker before startup' seen expected yes got yes
|
||||
worker running before restart expected yes got yes
|
||||
scripts/restart.sh expected 0 got 0
|
||||
LB ready after restart expected yes got yes
|
||||
worker StartedAt unchanged expected yes got yes
|
||||
worker RestartCount expected 0 got 0
|
||||
new upload after restart expected 202 got 202
|
||||
new upload becomes ready expected yes got yes
|
||||
expensive JPEG generated expected yes got yes
|
||||
stop under load: worker stopped before uploads expected 0 got 0
|
||||
stop under load: upload 0 expected 202 got 202
|
||||
stop under load: upload 1 expected 202 got 202
|
||||
stop under load: worker started expected 0 got 0
|
||||
stop under load: both files in processing expected processing got processing
|
||||
stop under load: command exit code expected 0 got 0
|
||||
stop under load: under 9.5 s expected yes got yes
|
||||
stop under load: container exit code expected 0 got 0
|
||||
stop under load: OOM killed expected false got false
|
||||
stop under load: last record expected Stopped worker got Stopped worker
|
||||
stop under load: worker back expected 0 got 0
|
||||
stop frozen storage: worker stopped before uploads expected 0 got 0
|
||||
stop frozen storage: upload 0 expected 202 got 202
|
||||
stop frozen storage: upload 1 expected 202 got 202
|
||||
stop frozen storage: worker started expected 0 got 0
|
||||
stop frozen storage: both files in processing expected processing got processing
|
||||
stop frozen storage: storage paused expected 0 got 0
|
||||
stop frozen storage: command exit code expected 0 got 0
|
||||
stop frozen storage: under 9.5 s expected yes got yes
|
||||
stop frozen storage: container exit code expected 0 got 0
|
||||
stop frozen storage: OOM killed expected false got false
|
||||
stop frozen storage: last record expected Stopped worker got Stopped worker
|
||||
stop frozen storage: worker back expected 0 got 0
|
||||
LB ready after unpause expected yes got yes
|
||||
stopped work finished: 4f53824c-a065-4875-8ddf-d7a507e505a0 expected failed limit_cpu got failed limit_cpu
|
||||
stopped work finished: 6845c972-0f91-4401-91dc-d84dc2229b10 expected failed limit_cpu got failed limit_cpu
|
||||
stopped work finished: fc9cc3a5-dbeb-4e3c-9b63-d2ce6180b584 expected failed limit_cpu got failed limit_cpu
|
||||
stopped work finished: 7811470c-95fd-492d-95f1-ff4d4dde4a23 expected failed limit_cpu got failed limit_cpu
|
||||
PASS: the worker process matches the spec
|
||||
worker and relay running at the end: yes
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user