How to delete unix socket entries

Terry Lambert tlambert2 at mindspring.com
Wed Jun 25 02:50:23 PDT 2003


Varshavchick Alexander wrote:
> On Wed, 25 Jun 2003, Terry Lambert wrote:
> > > whole lot (about 2000!) of entries like these:
> > [ ... ]
> > > How can I get rid of these extra ones?
> >
> > kill -9 the process that has them open; if it's important, restart
> > it after fixing whatever is causing it to go insane.
> 
> The problem is that the process which opened them was already killed long
> time ago, these entries resembles zombi because they seem to exist
> by themselves, not connected with any file or process.

Sockets have to be explicitly closed.  They  are generally
closed automatically by exit(), which will close all the fd's
a process has open.

I agree with the previous poster, that it looks like a bug you
will need to fix or workaround.

It looks like what's happened is that you have a deadly embrace
deadlock, where you've sent data both ways and then exited.
One thing to try might be to either turn off keepalive via
sysctl, or explicitly disable keepalive on the sockets, first
thing after opening them.

-- Terry


More information about the freebsd-hackers mailing list