curl-library
RE: Socket connect error after repeated failures
Date: Mon, 10 Jun 2002 01:43:28 -0700
Hello Rick,
Thank you for your response. I am attaching two small section of the system
call trace; one is the initial part when the system has still not reached
its limit of file descriptors and the other is when it has.
If you notice the initial trace (first one), the file descriptor 59 is not
closed (which is actually the data socket). Could someone please confirm if
this is correct, and if there is any fix for this.
Thanks a lot,
Gautam
------>>> System call traces attached
Initial trace:
open("/etc/hosts", O_RDONLY) = 59
fstat64(59, 0xFFBEC3E0) = 0
ioctl(59, TCGETA, 0xFFBEC36C) Err#25 ENOTTY
read(59, " #\n # I n t e r n e t".., 8192) = 395
brk(0x01E84C00) = 0
brk(0x01E86C00) = 0
llseek(59, 0xFFFFFFFFFFFFFEDA, SEEK_CUR) = 101
close(59) = 0
so_socket(2, 2, 0, "", 1) = 59
fcntl(59, F_GETFL, 0x00000000) = 2
fstat64(59, 0xFFBEEA40) = 0
getsockopt(59, 65535, 8192, 0xFFBEEB40, 0xFFBEEB38, 0) = 0
fstat64(59, 0xFFBEEAB0) = 0
getsockopt(59, 65535, 8192, 0xFFBEEBB0, 0xFFBEEBAC, -13207436) = 0
setsockopt(59, 65535, 8192, 0xFFBEEBB0, 4, -13207436) = 0
fcntl(59, F_SETFL, 0x00000082) = 0
connect(59, 0xFFBEEC28, 16, 1) = 0
getsockopt(59, 65535, 4103, 0xFFBEEBA4, 0xFFBEEBA0, 1) = 0
send(57, " T Y P E I\r\n", 8, 0) = 8
poll(0xFFBEE958, 1, 3600000) = 1
recv(57, " 2 0 0 T y p e s e t".., 20480, 0) = 20
send(57, " S I Z E U P D - M - 2".., 60, 0) = 60
poll(0xFFBEE958, 1, 3600000) = 1
recv(57, " 5 0 0 ' S I Z E U P".., 20480, 0) = 91
send(57, " R E T R U P D - M - 2".., 60, 0) = 60
poll(0xFFBEE9D0, 1, 3600000) = 1
recv(57, " 5 5 0 U P D - M - 2 _".., 20480, 0) = 79
sigaction(SIGPIPE, 0xFFBEED48, 0xFFBEEE48) = 0
sigaction(SIGPIPE, 0xFFBEED48, 0xFFBEEE48) = 0
poll(0xFFBEE9B0, 1, 1) = 0
sigaction(SIGALRM, 0x00000000, 0xFFBEED90) = 0
sigaction(SIGALRM, 0xFFBEEC68, 0x00000000) = 0
lwp_alarm(60) = 0
sigaction(SIGALRM, 0xFFBEEC68, 0x00000000) = 0
lwp_alarm(0) = 60
Trace when system has reached its limit of file descriptors:
open("/etc/hosts", O_RDONLY) = 256
close(256) = 0
sigaction(SIGPIPE, 0xFFBEED48, 0xFFBEEE48) = 0
sigaction(SIGPIPE, 0xFFBEED48, 0xFFBEEE48) = 0
poll(0xFFBEE9B0, 1, 1) = 0
sigaction(SIGALRM, 0x00000000, 0xFFBEED90) = 0
sigaction(SIGALRM, 0xFFBEEC68, 0x00000000) = 0
lwp_alarm(60) = 0
sigaction(SIGALRM, 0xFFBEEC68, 0x00000000) = 0
lwp_alarm(0) = 60
send(57, " C W D / e x p o r t /".., 27, 0) = 27
poll(0xFFBEE958, 1, 3600000) = 1
recv(57, " 2 5 0 C W D c o m m".., 20480, 0) = 29
send(57, " C W D r o a m w a r e".., 29, 0) = 29
poll(0xFFBEE958, 1, 3600000) = 1
recv(57, " 2 5 0 C W D c o m m".., 20480, 0) = 29
send(57, " E P S V\r\n", 6, 0) = 6
poll(0xFFBEE8D8, 1, 3600000) = 1
recv(57, " 2 2 9 E n t e r i n g".., 20480, 0) = 48
time() = 1023697491
-----Original Message-----
From: Rick Jones
To: Gautam Mani
Cc: 'curl-library_at_lists.sourceforge.net'
Sent: 6/7/2002 1:07 PM
Subject: Re: Socket connect error after repeated failures
can you take a system call trace - perhaps the gethostbyname_r call was
unable to allocate a file descriptor on which to issue the DNS request.
perhaps the failure mode was leaving fd's behind. you could also see
about using ulimit/setrlimit to up the maximum number of FD's per
process, but if there is indeed an FD leak that only delays the
inevitable.
rick jones
-- Wisdom Teeth are impacted, people are affected by the effects of events. these opinions are mine, all mine; HP might not want them anyway... :) feel free to post, OR email to raj in cup.hp.com but NOT BOTH... _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlinkReceived on 2002-06-10