[bug?]: EAGAIN - Resource temporarily unavailable

Barrett G. Lyon (blyon@netpr.com)
Mon, 15 Feb 1999 16:33:13 -0600


I've been experiencing EAGAIN ("Resource temporarily unavailable") when any
program (besides a daemonized one) tries to bind to a socket (I think
that's what is happening). A reboot does correct the error, but only after
about 19-20 hours of uptime it starts again.

It has bothered me a bit, but it has only been happening to my
non-production machine so I thought I would see if the newer kernels solved
the problem. Well, when my production machine crashed on the 2.2.2 kernel
it got my attention. After 20 days of uptime (this very very stressed
machine) the production machine exhibited the same behavior as the
non-production machine does.

The system is a Alpha 533MHz 21164 with 512 megs of ram. Currently on
kernel version 2.2.2.

Here is the slabinfo from the production machine (during a "crash"):
slabinfo - version: 1.0
kmem_cache 27 42
tcp_tw_bucket 15 63
tcp_bind_bucket 4171 4191
tcp_open_request 0 84
skbuff_head_cache 313 900
sock 1060 1425
dquot 256 300

Here is the slabinfo on the same machine while it is in normal operation:
slabinfo - version: 1.0
kmem_cache 28 42
pio_request 0 0
tcp_tw_bucket 27 63
tcp_bind_bucket 580 762
tcp_open_request 0 84
skbuff_head_cache 548 900
sock 846 930
dquot 256 300

I also did some traces on telnet in the hopes that it would further help
debugging. Here is the end part of 'strace telnet localhost':

open("/etc/services", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=01, st_size=919023394, ...}) = 0
mmap(0, 4831836000, PROT_READ, 0 /* MAP_??? */, 2, 0) = 0x20000012000
read(3, "#\n# services\tThis file describ"..., 8192) = 4959
close(3) = 0
munmap(0x20000012000, 8192) = 0
fstat(1, {st_mode=01, st_size=919023394, ...}) = 0
mmap(0, 4831834624, 0x2000, 0 /* MAP_??? */, 2, 0) = 0x20000012000
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
getxuid() = 500
setuid(500) = 0
setsockopt(3, IPPROTO_IP1, [16], 4) = 0
connect(3, {sin_family=AF_INET, sin_port=htons(23),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EAGAIN (Resource temporarily
unavailable)
write(2, "telnet: Unable to connect to rem"..., 75telnet: Unable to connect
to remote host: Resource temporarily unavailable
) = 75
close(3) = 0
write(1, "Trying 127.0.0.1...\n", 20Trying 127.0.0.1...
) = 20
munmap(0x20000012000, 8192) = 0
exit(1) = ?

I'm not sure if this is an Alpha specific problem or not. I can reproduce
it 100% after less than 1 day of uptime on the test machine, so if anyone
needs more information it would be easy to provide it.

Take care,
-Barrett

--
Barrett G. Lyon                        PGP: www.netpr.com/pgpkeys
Data & Network Security Consultant     Fax: 310-737-0196
Network Presence, LLC                Email: blyon@netpr.com
--

- 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/