connect() hang under 2.1.11-ac3

Eric Buddington (eric@ed.clark.williams.edu)
Tue, 17 Aug 1999 17:00:47 -0400


Hi.

Linux-2.2.11-ac3 on a K6-2/333. Mostly Debian software.

Every so often (1-4 weeks) this machine fills up with processes
that are frozen in the middle of trying to connect() to /dev/log.
I looked at /proc/<pid>/fd/ for one frozen client, then ran
netstat --unix to see what it said about the sockets listed there.
It didn't show them. Restarting syslogd consistently fixes the problem.

The clients freeze like this:

[pid 1720] socket(PF_UNIX, SOCK_STREAM, 0) = 3
[pid 1720] fcntl(3, F_SETFD, FD_CLOEXEC) = 0
[pid 1720] connect(3, {sun_family=AF_UNIX, sun_path="/dev/log"}, 16 <unfinished ...>

and syslogd is spinning thusly:

--- SIGALRM (Alarm clock) ---
time(NULL) = 933978397
rt_sigaction(SIGALRM, {0x804b4a0, [], SA_RESTART}, {0x804b4a0, [], SA_RESTART}, 8) = 0
alarm(30) = 0
sigreturn() = ? (mask now [])
poll([{fd=40, events=POLLIN}], 1, 40000) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) ---
time(NULL) = 933978427
rt_sigaction(SIGALRM, {0x804b4a0, [], SA_RESTART}, {0x804b4a0, [], SA_RESTART}, 8) = 0
alarm(30) = 0
sigreturn() = ? (mask now [])
poll([{fd=40, events=POLLIN}], 1, 40000) = -1 EINTR (Interrupted system call)
--- SIGALRM (Alarm clock) ---

Syslog has a bunch of /dev/log sockets shown as CONNECTED by netstat during
this time. I don't think it's that /syslogd has stopped listening on /dev/log,
because when syslogd is stopped, the connect("/dev/log") fails immediately
with ECONNREFUSED.

Any hints would be appreciated. I'd appreciate a CC of replies, though I'll
watch dejanews as well.

Eric
ebuddington@clark.williams.edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/