Subject: pkg/32602: mldonkey needs more than the default (64) number of open files
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <thomas.feddersen@t-online.de>
List: pkgsrc-bugs
Date: 01/23/2006 17:25:01
>Number:         32602
>Category:       pkg
>Synopsis:       mldonkey needs more than the default (64) number of open files
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 23 17:25:00 +0000 2006
>Originator:     Thomas Feddersen
>Release:        NerBSD 3.0
>Organization:
Dipl.-Ing. Thomas Feddersen, Beratender Ingenieur
>Environment:
NetBSD Bremen 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005  builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386

>Description:
MLdonkey needs more than the default number (64) of open files. Versions of mldonkey prior to 2.7.2. would after some time of running, start sending error messages to logfile about no more open files, and then shut down. Since Ver. 2.7.2 the minimum ulimit for open files is 150, MLDonkey will refuse to start if ulimit is lower.
>How-To-Repeat:
Install the package (from source, binary package currently contains Ver.2.7.1), 
start the daemon
 /etc/rc.d/mldonkey start
and look at the logfile
 cat /var/mldonkey/log

>Fix:
As a workaround I could off course increase the limit via the shell command and then invoke the startscript
 
limit openfiles 1024 (for bash users "ulimit -n 1024")
/etc/rc.d/mldonkey start
 
to let the mlnet-Daemon inherit the settings of the shell-process.
 
It would certainly be desirable to have mlnet automatically started at system-startup. Can you please devise the proper way, within the framework of the NetBSD /etc/rc.d startup scripts, to start the mlnet-Daemon with more than just 64 maximum open files?  A modified startup script should be included in the mldonkey package.