DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 31st January 2023
nipos nipos is offline
Real Name: Niklas Poslovski
Port Guard
 
Join Date: Nov 2022
Location: Würzburg, Germany
Posts: 21
Default How to reliably terminate processes?

I have a problem with dead processes that don't want to go away on my servers.
I searched countless hours already without a suitable solution.
I'm experimenting with a ASP.NET based webapp that doesn't correctly work currently and the amount of mono processes keeps increasing,as I just can't kill them.
I tried many different kill signals already,up to -126 (which is the most aggressive,I think?).
Now htop shows the processes with a red T,what I think stands for terminating.
Still the processes haven't gone away for hours,and the network port is still blocked by them.
I don't want to change the port (and the Nginx reverse proxy config) for every try,or do I really have to?
Is there any way to get rid of those processes?
Or is there a way that I can at least detach the port from them,so that I can listen to it in another process again?
You can see the htop output in the attached screenshot.

The same thing already happened to me in the past with other programs,for example some Node.js applications.
They crash sometimes and show up as Zombie in the process list (and I learnt that I can't kill something that is already dead,right?) but they still block the port where the application should run,so that I can't start them again.
When that happened on a development server,it wasn't that much of a problem as I could simply reboot,but I can't reboot a production server with dozens of public services every time a Zombie process appears...
Please help,I need the ports to be usable again at least
Attached Images
File Type: png Bildschirmfoto zu 2023-01-31 09-10-10.png (412.5 KB, 17 views)
Reply With Quote
  #2   (View Single Post)  
Old 31st January 2023
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

As root user sending signal nr 9 (KILL) should do it. Signal nr 9 is not catchable by the process itself.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Tags
port, process, server, terminate, zombie

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hide processes to ohter user ? bsdcord OpenBSD Security 2 21st April 2019 12:38 PM
Differences between processes and threads in Linux and *BSD (i.e. OpenBSD) e1-531g Programming 4 3rd February 2016 12:12 AM
Identifying interfaces reliably for firewall geek FreeBSD Security 0 14th November 2015 09:20 AM
See processes on other servers? biscuits FreeBSD General 2 20th January 2009 04:15 AM
chmods for users & hiding processes mike OpenBSD Security 2 12th June 2008 04:15 PM


All times are GMT. The time now is 12:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick