[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-bugs] [bugs #11384] Source of Orphaned File Descriptor Bug
From: |
Rand Childs |
Subject: |
[Mldonkey-bugs] [bugs #11384] Source of Orphaned File Descriptor Bug |
Date: |
Thu, 23 Dec 2004 10:58:02 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12 |
This mail is an automated notification from the bugs tracker
of the project: mldonkey, a multi-networks file-sharing client.
/**************************************************************************/
[bugs #11384] Full Item Snapshot:
URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11384>
Project: mldonkey, a multi-networks file-sharing client
Submitted by: Rand Childs
On: Thu 12/23/2004 at 15:46
Category: Core
Severity: 5 - Average
Item Group: Program malfunction
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Release: None
Release: 2.5-22
Platform Version: Mac OS X Jaguar
Binaries Origin: CVS / Self compiled
CPU type: PowerPC
Summary: Source of Orphaned File Descriptor Bug
Original Submission: On Mac OS X and I assume other systems there are two bugs
in mlnet which together generate hundreds of orphaned file descriptors causing
mlnet to eventually hang. I worked with mlnet 2.5-22 source and ocaml 3.07-p12
to debug the source of the problem:
I don't know the source code or OCAML well enough to suggest exactly why it is
happening or the best way to fix it, but I have done enough debugging to figure
out the cause of the probem. There are two issues:
1. The first is in src/daemon/common/commonChat.ml in the routine
send_paquet_to_mlchat. The Unix.connect fails with "Connection refused :
connect" but the error is not trapped and the socket is not closed. Trapping
the error and closing the socket fixes this one.
2. The rest of the orphaned file descriptors is in
src/utils/net/tcpServerSocket.ml in the routine tcp_handler. The Unix.accept
fails with Exception tcp_handler: failed: Address family not supported by
protocol family" but apparently has created a new socket which is never closed.
If I trap the exception and issue the following "close t (Closed_for_error
(Printexc2.to_string e));" I find that lsof only shows one orphaned socket
after hours of running. I assume that issuing "close t" closes the original
socket that is being listened to and this stop this Unix.accept from being
called again. I don't know why it is getting this error unless perhaps the
previous bind failed and that wasn't trapped, but maybe there is some other
reason.
So if a developer who knows the code and OCAML can fix these two problems and
get the patches in the current release then that should solve the orhpaned file
descriptor problem which causes mlnet to hang after running for some hours
For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11384>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Mldonkey-bugs] [bugs #11384] Source of Orphaned File Descriptor Bug,
Rand Childs <=