[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] avoiding file descriptor collisions
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] avoiding file descriptor collisions
- From: Myk Taylor <myk002@xxxxxxxxx>
- Date: Fri, 09 Dec 2011 07:21:44 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 09 Dec 2011 10:21:58 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323444106; bh=/qwJrikc/RPpIggsDn5vN6lqwfgiMOhztjL9/sy9Rsc=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:Reply-To:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding; b=I2vIHl01WX0XEe0zhFs0l/i1gBjga0DmQvHU1RmYFlWtsXtNa5uoJ5cVjPlW1dgqwV4UzovcGtYnjyzzkbk+egUtQNmuDfpRNbQ2SCDhqJNW/r30DuWvn6SL2UEDxnv2IOVtORlVnFHknFFCsq9ZfVTdr44D2btPG6uDM6Hae/g=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111206 Thunderbird/8.0
Hi all,
I've run into another bit of trouble, but I don't see an easy way out
this time. The http(s) client I'm writing has many connections going up
and down continuously, and I'm running into what seem to be file
descriptor collisions in evhttp. I believe this is what is happening:
1) connection A opens a socket and receives fd N for a request
2) The request fails on the server and the server closes the TCP
connection (sends a FIN)
3) the OS frees up fd N for the process, even though connection A hasn't
closed it explicitly yet
4) connection B opens a socket and receives fd N
5) connection A runs its callback and closes fd N
6) B attempts to use fd N and errors out
Does this sound possible? I'm running on x86_64 Linux kernel 2.6.38.
Thanks,
Myk
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.