mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
`OpenVikingMemoryProvider.shutdown()` joins in-flight writers, deferred-commit threads, and prefetch threads, but not `_runtime_start_thread` — the tracked `daemon=True` waiter that runs `_finish_runtime_openviking_start`, which blocks on network health probes (`_wait_for_openviking_health` polling + a `_VikingClient.health()` request). If the local OpenViking runtime is slow or unreachable, that waiter can still be blocked in network I/O at interpreter exit. CPython then forcibly kills it during `Py_FinalizeEx` (`PyThread_exit_thread` -> `__pthread_unwind` -> `abort()`), producing SIGABRT (exit 134) with no traceback — the same daemon- thread-at-exit failure class fixed for the Honcho provider. Fix: - `shutdown()` now joins `_runtime_start_thread` (timeout-bounded) alongside the other tracked threads. - `_wait_for_openviking_health()` gains a `should_stop` callback; the waiter passes `lambda: self._shutting_down` so the poll loop bails out promptly once `shutdown()` flips the flag, instead of lingering up to the 60s autostart timeout and timing out the join (which would leave the thread alive). - Add tests/plugins/memory/test_openviking_shutdown.py covering the short-circuit and the shutdown-joins-runtime-thread behaviour. (cherry picked from commit 5471ec70210b35462450aa52f0cd483439fffba7) |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_byterover_provider.py | ||
| test_config_schema.py | ||
| test_hindsight_config_schema.py | ||
| test_hindsight_provider.py | ||
| test_holographic_auto_extract.py | ||
| test_holographic_retrieval.py | ||
| test_holographic_shutdown_closes_db.py | ||
| test_holographic_store.py | ||
| test_honcho_config_schema.py | ||
| test_mem0_backend.py | ||
| test_mem0_providers.py | ||
| test_mem0_setup.py | ||
| test_mem0_v3.py | ||
| test_memory_lazy_install.py | ||
| test_openviking_provider.py | ||
| test_openviking_shutdown.py | ||
| test_retaindb_provider.py | ||
| test_supermemory_provider.py | ||