fix(web-server): reap zombie action subprocesses + fix meet_bot pcm_pump leak - #38040
Closed
ygd58 wants to merge 4 commits into
Closed
fix(web-server): reap zombie action subprocesses + fix meet_bot pcm_pump leak#38040ygd58 wants to merge 4 commits into
ygd58 wants to merge 4 commits into
Conversation
…read from config Two fixes for issue NousResearch#33947 (regression in cc8e5ec): 1. Silent drop logging: when require_mention filters a message, log at INFO level with channel/author context so operators can diagnose why bots are silent without source-patching. Previously logged at DEBUG (invisible at default log level). 2. auto_thread config awareness: read discord.auto_thread from config.extra first (like require_mention already does), falling back to DISCORD_AUTO_THREAD env var. Profiles without an explicit discord: block now get env-var behavior instead of hardcoded true. Fixes NousResearch#33947 (partial — addresses items 2 and 3 from the proposed fixes)
INFO-level logging for every dropped message is too noisy in busy Discord servers — can generate hundreds of log lines per minute. DEBUG is appropriate: useful for diagnosing silent bot issues but not cluttering production monitoring. Suggested by @liuhao1024 in review of NousResearch#33975.
The status bar context meter read context_compressor.context_length which could hold a stale value from a previous model/alias session. When model_aliases defines a persona with a different context_length (e.g. sophia-cloud: m2.7, 204800K) and the active model is different (m3, 1M), the compressor value could show the alias context instead of the active model's (issue NousResearch#38006). Fix: re-resolve context_length via get_model_context_length() with the agent's current model+provider+base_url+config_context_length, falling back to the compressor value if resolution fails. Fixes NousResearch#38006
…ump leak Two zombie process fixes (issue NousResearch#38032): 1. hermes_cli/web_server.py: after proc.poll() returns non-None, call proc.wait(timeout=1) to reap the child and remove it from _ACTION_PROCS. Without this, every completed dashboard action (update, restart, etc.) lingers as a <defunct> zombie. 2. plugins/google_meet/meet_bot.py: add pcm_pump cleanup to the teardown block — terminate() + wait(timeout=3) so the paplay/ ffmpeg subprocess is reaped on normal bot exit. Fixes NousResearch#38032
1 task
13 tasks
Contributor
|
Superseded by #38049 (commit 78e2101), now merged to main — closes #38032. The zombie-reap half of your PR is fully covered there. Note the meet_bot pcm_pump cleanup was a separate concern from this issue; if you'd like that change landed on its own, please open a focused PR for it and we'll review. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Two zombie process leaks (issue #38032):
web_server.py:proc.poll()reads exit code but never reaps — every completed dashboard action lingers as<defunct>meet_bot.py:pcm_pump(paplay/ffmpeg) never cleaned up on bot exitFix
poll()returns non-None, callproc.wait(timeout=1)and remove from_ACTION_PROCSpcm_pump.terminate()+.wait(timeout=3)to meet_bot teardownFixes #38032