오래된 스레드를 어떻게 제거할 수 있나요?

오래된 스레드를 어떻게 제거할 수 있나요?

Ubuntu 18.04에서 웹 앱을 제공하는 프로세스를 실행 중입니다. 앱을 제공한 후 프로세스는 종료되지만 고스트 스레드는 기본 프로세스에서 실행되므로 메모리 누수가 느려집니다. 이것이 소프트웨어에 문제가 있다는 것을 알고 있지만 Ubuntu 측에서 오래된 스레드를 정리하기 위해 할 수 있는 일이 있습니까? 실행하면 ps -elfT프로세스 아래에 있는 모든 고스트 스레드를 볼 수 있지만 해당 스레드를 종료해도 안전한지(또는 종료하는 방법) 확실하지 않습니다.

ps -elfT관련된 부분은 다음과 같습니다 .

F S UID        PID  SPID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
1 S ubuntu   32765 32765     1  0  80   0 -  8045 poll_s Jun11 ?        00:00:00 SCREEN voila --template=mytemplate
0 S ubuntu   32766 32766 32765  0  80   0 - 367365 ep_pol Jun11 pts/1   00:02:51 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766   306 32765  0  80   0 - 367365 ep_pol Jun11 pts/1   00:10:50 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766   307 32765  1  80   0 - 367365 ep_pol Jun11 pts/1   02:40:07 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766   308 32765  0  80   0 - 367365 poll_s Jun11 pts/1   00:02:12 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766   328 32765  0  80   0 - 367365 poll_s Jun11 pts/1   00:02:12 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766   626 32765  0  80   0 - 367365 poll_s Jun12 pts/1   00:02:05 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  2622 32765  0  80   0 - 367365 poll_s Jun12 pts/1   00:01:57 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  2636 32765  0  80   0 - 367365 poll_s Jun12 pts/1   00:01:57 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  2773 32765  0  80   0 - 367365 poll_s Jun12 pts/1   00:01:56 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  2860 32765  0  80   0 - 367365 poll_s Jun12 pts/1   00:01:54 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  3735 32765  0  80   0 - 367365 poll_s Jun13 pts/1   00:01:42 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  3750 32765  0  80   0 - 367365 poll_s Jun13 pts/1   00:01:45 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  3768 32765  0  80   0 - 367365 poll_s Jun13 pts/1   00:01:42 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  4389 32765  0  80   0 - 367365 poll_s Jun14 pts/1   00:01:36 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  6769 32765  0  80   0 - 367365 poll_s Jun14 pts/1   00:01:30 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  7017 32765  0  80   0 - 367365 poll_s Jun14 pts/1   00:01:25 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766  9562 32765  0  80   0 - 367365 poll_s Jun16 pts/1   00:01:03 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 11561 32765  0  80   0 - 367365 poll_s Jun17 pts/1   00:00:48 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 11577 32765  0  80   0 - 367365 poll_s Jun17 pts/1   00:00:50 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 12518 32765  0  80   0 - 367365 poll_s Jun18 pts/1   00:00:38 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 12947 32765  0  80   0 - 367365 poll_s Jun19 pts/1   00:00:31 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 12964 32765  0  80   0 - 367365 poll_s Jun19 pts/1   00:00:31 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 13415 32765  0  80   0 - 367365 poll_s Jun19 pts/1   00:00:27 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 13438 32765  0  80   0 - 367365 poll_s Jun19 pts/1   00:00:27 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 13455 32765  0  80   0 - 367365 poll_s Jun19 pts/1   00:00:28 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 22318 32765  0  80   0 - 367365 poll_s 06:57 pts/1   00:00:06 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 23225 32765  0  80   0 - 367365 poll_s 16:32 pts/1   00:00:00 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate
1 S ubuntu   32766 23239 32765  0  80   0 - 367365 poll_s 16:32 pts/1   00:00:00 /usr/bin/python3 /home/ubuntu/.local/bin/voila --template=mytemplate

관련 정보