Skip to content

zombie issues #2274

@therealnb

Description

@therealnb

Bug description

See the sequence of commands below. There seem to be accidental long lived process for thv.

Steps to reproduce

nigels-MacBook-Pro:code nigel$ ps aux | grep 'thv'
nigel            48437   0.3  0.1 411547648  16608   ??  Ss   11:17a.m.   0:03.11 /Users/nigel/go/bin/thv restart github --foreground
nigel            56254   0.0  0.3 411530208  50256   ??  Ss   12:29p.m.   0:00.65 /Users/nigel/go/bin/thv restart meta-mcp --foreground
nigel            53714   0.0  0.2 412040784  39824 s006  S+   12:12p.m.   0:00.71 /Users/nigel/code/toolhive-studio/bin/darwin-arm64/thv serve --openapi --experimental-mcp --experimental-mcp-host=127.0.0.1 --experimental-mcp-port=60887 --host=127.0.0.1 --port=50065
nigel            47643   0.0  0.1 411554992  18832   ??  Ss   10:35a.m.   0:05.46 /Users/nigel/go/bin/thv restart fetch --foreground
nigel            15761   0.0  0.0 411542112   4848   ??  S     5:14p.m.   0:06.39 thv proxy stdio mcpserver-proxy-stdio-target-15280-1760976842757344000-1760976427
nigel            57598   0.0  0.0 410733664   1568 s019  S+   12:45p.m.   0:00.01 grep thv
nigels-MacBook-Pro:code nigel$ thv restart fetch
A new version of ToolHive is available: v0.3.11
Currently running: v0.3.7-14-g595e5e76-dirty
12:46PM	INFO	Container fetch is already running
Workload fetch restarted successfully
nigels-MacBook-Pro:code nigel$ ps aux | grep 'thv'
nigel            56254   0.0  0.3 411530208  43488   ??  Ss   12:29p.m.   0:00.69 /Users/nigel/go/bin/thv restart meta-mcp --foreground
nigel            53714   0.0  0.2 412032592  39776 s006  S+   12:12p.m.   0:00.75 /Users/nigel/code/toolhive-studio/bin/darwin-arm64/thv serve --openapi --experimental-mcp --experimental-mcp-host=127.0.0.1 --experimental-mcp-port=60887 --host=127.0.0.1 --port=50065
nigel            48437   0.0  0.1 411547904  23424   ??  Ss   11:17a.m.   0:03.16 /Users/nigel/go/bin/thv restart github --foreground
nigel            47643   0.0  0.2 411554992  25168   ??  Ss   10:35a.m.   0:05.52 /Users/nigel/go/bin/thv restart fetch --foreground
nigel            15761   0.0  0.0 411542112   4832   ??  S     5:14p.m.   0:06.41 thv proxy stdio mcpserver-proxy-stdio-target-15280-1760976842757344000-1760976427
nigel            57852   0.0  0.0 410734688   1664 s019  S+   12:46p.m.   0:00.00 grep thv
nigels-MacBook-Pro:code nigel$ thv stop fetch
A new version of ToolHive is available: v0.3.11
Currently running: v0.3.7-14-g595e5e76-dirty
12:48PM	INFO	Stopping proxy process (PID: 47643)...
12:48PM	INFO	Proxy process stopped
12:48PM	INFO	Stopping containers for fetch...
12:48PM	INFO	Server fetch belongs to group default, updating 0 registered client(s)
12:48PM	INFO	No target clients found for server fetch
12:48PM	INFO	Client configurations for fetch removed
12:48PM	INFO	Successfully stopped fetch...
workload fetch stopped successfully
nigels-MacBook-Pro:code nigel$ ps aux | grep 'thv'
nigel            56254   0.0  0.3 411530208  43280   ??  Ss   12:29p.m.   0:00.78 /Users/nigel/go/bin/thv restart meta-mcp --foreground
nigel            53714   0.0  0.1 412032592  18592 s006  S+   12:12p.m.   0:00.80 /Users/nigel/code/toolhive-studio/bin/darwin-arm64/thv serve --openapi --experimental-mcp --experimental-mcp-host=127.0.0.1 --experimental-mcp-port=60887 --host=127.0.0.1 --port=50065
nigel            48437   0.0  0.1 411547904  22976   ??  Ss   11:17a.m.   0:03.23 /Users/nigel/go/bin/thv restart github --foreground
nigel            15761   0.0  0.1 411542112  15120   ??  S     5:14p.m.   0:06.42 thv proxy stdio mcpserver-proxy-stdio-target-15280-1760976842757344000-1760976427
nigel            57903   0.0  0.0 410584080    736 s019  R+   12:48p.m.   0:00.01 grep thv
nigels-MacBook-Pro:code nigel$ thv restart fetch
A new version of ToolHive is available: v0.3.11
Currently running: v0.3.7-14-g595e5e76-dirty
12:49PM	INFO	Loaded configuration from state for fetch
12:49PM	INFO	Starting tooling server fetch...
12:49PM	INFO	Logging to: /Users/nigel/Library/Application Support/toolhive/logs/fetch.log
12:49PM	INFO	MCP server is running in the background (PID: 57975)
12:49PM	INFO	Use 'thv stop fetch' to stop the server
Workload fetch restarted successfully
nigels-MacBook-Pro:code nigel$ ps aux | grep 'thv'
nigel            56254   0.0  0.3 411530208  50432   ??  Ss   12:29p.m.   0:00.82 /Users/nigel/go/bin/thv restart meta-mcp --foreground
nigel            53714   0.0  0.1 412032592  18768 s006  S+   12:12p.m.   0:00.80 /Users/nigel/code/toolhive-studio/bin/darwin-arm64/thv serve --openapi --experimental-mcp --experimental-mcp-host=127.0.0.1 --experimental-mcp-port=60887 --host=127.0.0.1 --port=50065
nigel            48437   0.0  0.1 411547904  22592   ??  Ss   11:17a.m.   0:03.25 /Users/nigel/go/bin/thv restart github --foreground
nigel            15761   0.0  0.0 411542112   4848   ??  S     5:14p.m.   0:06.42 thv proxy stdio mcpserver-proxy-stdio-target-15280-1760976842757344000-1760976427
nigel            57985   0.0  0.0 410734688   1632 s019  S+   12:49p.m.   0:00.01 grep thv
nigel            57975   0.0  0.3 412049360  51760   ??  Ss   12:49p.m.   0:00.04 /Users/nigel/go/bin/thv restart fetch --foreground

Expected behavior

No zombies

Actual behavior

Zombies

Environment (if relevant)

  • OS/version: Mac 15.6.1
  • ToolHive version: v0.3.7-14-g595e5e76-dirty

Additional context

These probably don't do that much harm. The don't look good though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliChanges that impact CLI functionalityproxy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions