-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dapr stop
does not kill additional processes spun up by an app process
#1184
Comments
@mukundansundar -Just a suggestion- can you please add a 'ps' output for the different stages of this issue showing PID and parent PID - to help comprehend the issue better. |
@akhilac1 updated |
This exists in normal Run
|
dapr stop -f
does not kill a go run
process correctlydapr stop
does not kill a go run
process correctly
dapr stop
does not kill a go run
process correctlydapr stop
does not kill additional processes spun up by an app process
@mukundansundar Right now we use kill command with the process PID.. which does not stops the grand children(/var/folders/8n/vhq7f8w1419g3t4ww_46_tlr0000gn/T/go-build3898998650/b001/exe/app in our case). We can use kill with process group PID to stop all children.. This will behave similar to ctrl +c. |
This change should also be fine with the normal |
For normal stop also it should be the same thing ... We need to be able to make changes for Windows also. In Windows we use |
yes, it should be same. But the tests failed consistently on local and github runner. Something to do with tests can also be a possibility. |
I figured out the failure scenario. Nothing to do with the logic but since in the tests processes are started by make file. So, the process group contains every process including the tests starter script. So it kills the whole tests. Need to create a new process group whenever we start the Have made the changes only for |
partially fixed for the |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions. |
Hello,
Thanks in advance for all your help. |
Version
This is with latest master build of CLI
Expected Behavior
When an application is run in golang using the go run command, and it is started using
dapr run -f
, it is expected thatdapr stop -f
will properly interrupt and kill thego run
process and associatedapp
process.Actual Behavior
dapr stop -f
stops thego run
process, but another process thats started bygo run
still keeps runningeg:
/var/folders/8n/vhq7f8w1419g3t4ww_46_tlr0000gn/T/go-build2324290313/b001/exe/app
Steps to Reproduce the Problem
When the distributed calc application in quickstarts is run using the new
dapr run -f
templateIn the above scenario,
go run app.go
starts one process which then starts the app process separately.When
dapr stop -f
is called using the run template file, it only kills thego run app.go
process and not the binary app process forked from it.But when a binary is built using say
go build -o test-app
and that binary is run as./test-app
,dapr stop -f
kills the application process.Have tried, send
os.Interrupt
,syscall.SIGTERM
but that does not work as expected.In
dapr stop -f
,kill
command with process ID is used to kill the process.ps output with pid and ppid
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: