`dapr stop` does not kill additional processes spun up by an app process
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Riproduci il problema con il distributed calc quickstart e il relativo modello di esecuzione, in particolare con l’app Go che usa command: ["go", "run", "app.go"]. Inizia eseguendo dapr run -f seguito da dapr stop -f e ispeziona gli ID dei processi correlati e il gruppo di processi descritto nel report. Il lavoro è completato quando sia go run app.go sia il processo /exe/app generato sono stati arrestati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 that dapr stop -f will properly interrupt and kill the go run process and associated app process.
Actual Behavior
dapr stop -f stops the go run process, but another process thats started by go run still keeps running
eg: /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 template
version: 1
apps:
- appDirPath: ./go/
appID: addapp
appPort: 6000
daprHTTPPort: 3503
command: ["go", "run", "app.go"]
- appID: divideapp
appDirPath: ./node/
appPort: 4000
daprHTTPPort: 3502
command: ["node", "app.js"]
- appID: multiplyapp
appDirPath: ./python/
appPort: 5001
daprHTTPPort: 3501
command: ["flask", "run"]
env:
FLASK_RUN_PORT: 5001
- appID: subtractapp
appDirPath: ./csharp/
appPort: 7001
daprHTTPPort: 3504
env:
ASPNETCORE_URLS: 'http://localhost:7001'
command: ["dotnet", "./bin/Debug/netcoreapp7.0/Subtract.dll"]
- appID: frontendapp
appDirPath: ./react-calculator/
appPort: 8080
daprHTTPPort: 3507
command: ["node", "server.js"]
Note : netcoreapp3.1 needs to be changed to netcoreapp7.0 for the existing quickstart to work
In 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 the go 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
ps aj | grep go
user 94976 37431 94975 0 2 S+ s001 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox go
user 94930 94924 94924 0 1 S+ s005 0:00.21 go run app.go
user 94952 94930 94924 0 1 S+ s005 0:00.01 /var/folders/8n/vhq7f8w1419g3t4ww_46_tlr0000gn/T/go-build2832959224/b001/exe/app
Note that both
go run app.goand....../exe/appbelong to the same process group,94924
Release Note
RELEASE NOTE:
- Lingua principale
- Go
- Stelle
- 353
- Fork
- 220
- Merge medio
- 6g 16h
- PR unite (30g)
- 1
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dapr/cli
-
kind/bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
dapr/cli#1700 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue kind/proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue kind/proposal
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Docs (Automation) - Dapr CLIForse di nuovo libera @mikeee l’ha presa 558 giorni fa e non c’è nessuna pull request aperta. ApertaP1 pinned
dapr/cli#1507 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Update the CLI install script release sourceForse di nuovo libera @mikeee l’ha presa 732 giorni fa e non c’è nessuna pull request aperta. Apertakind/bug pinned
dapr/cli#1454 · 8 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
netdata/netdata#24062 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
meshery/meshery#22119 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
automation documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno