From c1d7dcdd889dd063340b61499a956e18d05e0340 Mon Sep 17 00:00:00 2001 From: chrislusf Date: Sat, 6 Dec 2025 13:54:02 -0800 Subject: fix: log process.stop() error and document 100ms delay - Log warning if stopping mount process fails after mount wait timeout to help diagnose potential zombie processes - Add comment explaining the 100ms delay before unmounting is for FUSE cleanup and pending I/O to complete --- pkg/mountmanager/manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/mountmanager/manager.go b/pkg/mountmanager/manager.go index 67b29a4..dd15c6b 100644 --- a/pkg/mountmanager/manager.go +++ b/pkg/mountmanager/manager.go @@ -261,7 +261,9 @@ func startWeedMountProcess(command string, args []string, target string, volumeI go process.wait() if err := waitForMount(target, 10*time.Second); err != nil { - _ = process.stop() + if stopErr := process.stop(); stopErr != nil { + glog.Warningf("[%s] failed to stop mount process after mount wait failure: %v", volumeID, stopErr) + } return nil, err } @@ -275,6 +277,7 @@ func (p *weedMountProcess) wait() { glog.Infof("weed mount exit (pid: %d, target: %s)", p.cmd.Process.Pid, p.target) } + // Brief delay to allow FUSE cleanup and pending I/O to complete before unmounting time.Sleep(100 * time.Millisecond) _ = kubeMounter.Unmount(p.target) -- cgit v1.2.3