Re: How to delete unix socket entries

From: Varshavchick Alexander (alex_at_metrocom.ru)
Date: 06/25/03

  • Next message: Paul Robinson: "Re: How to delete unix socket entries"
    Date: Wed, 25 Jun 2003 15:34:01 +0400 (MSD)
    To: Terry Lambert <tlambert2@mindspring.com>
    
    

    On Wed, 25 Jun 2003, Terry Lambert wrote:

    > If it's fixed: reboot.
    >
    > If it's not fixed, add this to your /etc/rc.local:
    >
    > sysctl net.inet.tcp.always_keepalive=0
    >
    > ...and reboot.
    >
    > Nothing short of rebooting is going to undo the deadlock, unless
    > you have the kernel debugger compiled into your kernel, and are
    > willing to grovel around in data structures to find the root cause
    > of your problem.
    >
    > There is no such thing as a "zombie socket", there are only sockets
    > which are in TIME_WAIT, FIN_WAIT, FIN_WAIT_2, etc., states. These
    > tend to persist for 2MSL (about 5 minutes) after the process has
    > exited.
    >
    > That you are having this problem is indicative of the other end of
    > the socket connection still being alive somewhere, and/or a real
    > bug that was triggered by the default being to set "keepalive" on
    > the sockets, even though they are UNIX domain sockets. You could
    > probably fix this by overriding the "keepalive" setting on the
    > created sockets in the kernel function "socketpair".
    >
    > Without a reproducible test case, I can't provide you a kernel patch
    > to fix the problem for you in the future. My advice is to turn off
    > the keepalive; I expect it will help.
    >

    Thank you Terry for such a good explanation, you seem to be hitting the
    core. To be more specific, this server socket application is a
    spamassassin-milter filter for sendmail. This filter uses threads and it
    didn't work with the native FreeBSD threads so I recompiled it with linux
    threads. It workes steadily enough now, but from time to time something
    seems to be turning wrong and the filter deadlocks leaving a lot of alive
    socket connections.

    As you see it's not to handy to reboot a server to turn off keepalive
    setting, and besides, it seems to be unneeded to make it globally for the
    server. Instead, I'd rather use your advice about setsockopt()
    recompiling libmilter library without keepalives. It shouldn't have any
    side effects on server load or anything else, what do you think?

    ----
    Alexander Varshavchick, Metrocom Joint Stock Company
    Phone: (812)118-3322, 118-3115(fax)
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Paul Robinson: "Re: How to delete unix socket entries"

    Relevant Pages

    • Re: XP Home rebooting randomly
      ... Dust is a heat insulator, ... remove the wall socket cord before pressing on things ... > insufficient for the hardware it is asked to support. ... > sudden and unexplained shutdowns with or without a reboot (the reboot part ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: How to terminate a socket in CLOSE_WAIT state
      ... FTP Server fixed for certain FTP clients who use both passive ... This was causing a PASSIVE opened socket to be left ... but instead expect the "half close" from the receiver. ... this sends a TCP/IP FIN packet to the ...
      (microsoft.public.win32.programmer.kernel)
    • Re: Socket switch delay
      ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
      (microsoft.public.win32.programmer.networks)
    • Another disaster recovery exercise (but not yet)...
      ... I updated a client's Server. ... indeed, I reboot before updating, and after ). ... Chkdsk is all good on all drives. ... Enabling boot logging option at boot - well, ...
      (microsoft.public.backoffice.smallbiz2000)
    • RE: Event 19011: SBS Monitoring services wont auto-start
      ... automatically start when rebooting the SBS server. ... Let us ensure the MSSQL$SBSMONITORING service and the Microsoft Exchange ... Please clean the Event logs in event viewer and then reboot the server, ... This newsgroup only focuses on SBS technical issues. ...
      (microsoft.public.windows.server.sbs)