Closed ogerardin closed 5 years ago
Hi @ogerardin
Can you provide some code to reproduce this behaviour?
Best regards, Oscar
As I wrote, running TestStop in dbserver_test.go will produces error: "Stop did not stop the server".
Hey @ogerardin
I think this is probably an issue with scoop not propagating the signal to the child mongod
process if scoop itself is stopped.
Dom
You're certainly right, but I think killing the process tree is safer in all cases. I'll see if I can open an issue with scoop.
When mongod is installed using scoop, a shallow executable called a "shim" is created in the path (usually in
%USERPROFILE%\scoop\shims
). The actual mongod.exe lies somewhere else (normally%USERPROFILE%\scoop\apps\mongodb\current
). When you launch mongod from the command line, the shim launches the actual mongod as a sub-process. The same happens when dbtest launches mongod, but when it tries to stop the server only the shim gets terminated, the actual server process stays alive and is adopted by userinit.What version of MongoDB are you using (
mongod --version
)?What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Install mongo with scoop (
scoop install mongodb
) Run TestStop in dbserver_test.go Produces error: "Stop did not stop the server"Fix (tested): replace
dbs.server.Process.Signal(os.Kill)
withpsutil.TerminateTree(dbs.server.Process.Pid, int(syscall.SIGKILL))
in method StopCan you reproduce the issue on the latest
development
branch?yes