-
Notifications
You must be signed in to change notification settings - Fork 315
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In startDB(), if an error occurs after the postgres process is started but before Process.Release() is called, the defer block attempts cleanup. However, if the postgres command's Process field is nil or if Process.Kill() fails, the postgres process may not be terminated, leading to an orphaned process.
Severity
HIGH - Resource leak (orphaned process)
Test Reference
Test: TestStartDB_ProcessCleanupOnError in pkg/db/db_local/start_services_test.go:237 (skipped - requires mocking)
Suggested Fix
Ensure robust cleanup even in error paths, possibly using process groups and verifying process termination.
Related Code
pkg/db/db_local/start_services.go:226-244
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working