bugmldonkey, a multi-networks file-sharing client - Bugs: bug #15577, Please use setrlimit(2)

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15577: Please use setrlimit(2)

Submitted by:  Thomas Klausner <tk>
Submitted on:  Mon 30 Jan 2006 05:46:56 PM UTC  
 
Category: CoreSeverity: 4 - Important
Item Group: Feature requestStatus: None
Assigned to: NoneOpen/Closed: Closed
Release: 2.7.3-cvsRelease: 2.7.3
Operating System: NetBSDBinaries Origin: CVS / Self compiled
CPU type: Intel x86

(Jump to the original submission Jump to the original submission)

Sat 04 Feb 2006 01:24:49 AM UTC, comment #9:

Seems to work fine on NetBSD-3.99.15/i386.
During startup:
2006/02/04 02:23:45 raised ulimit for open files from 64 to 1772

Runtime:

> rlimit

cpu -1 -1
fsize -1 -1
data 524288000 524288000
stack 2097152 67108864
core -1 -1
rss 521584640 521584640
nprof 160 532
nofile 1772 1772
memlock 173861546 521584640
as -1 -1

Thanks!

Thomas Klausner <tk>
Fri 03 Feb 2006 08:54:47 PM UTC, comment #8:

Updated patch, always soft_limit of RLIMIT_NOFILE to hard_limit:

2006/02/03 23:47:16 Language EN, locale ASCII, ulimit for open files 64
2006/02/03 23:47:16 raised ulimit for open files from 64 to 1772

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 08:16:15 PM UTC, comment #7:

Compiling on OpenBSD fails...

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 07:47:29 PM UTC, comment #6:

bash-3.00# uname -a
NetBSD netbsd 2.0.2 NetBSD 2.0.2 (GENERIC)
bash-3.00# ulimit -a
open files (-n) 64
bash-3.00# ./mlnet -stdout
2006/02/03 22:46:02 Starting MLDonkey 2.7.3.CVS ...
2006/02/03 22:46:02 Language EN, locale ASCII, ulimit for open files 64
2006/02/03 22:46:02 raised ulimit for open files from 64 to 1024

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 07:40:53 PM UTC, comment #5:

setrlimit implemented, MLDonkey sets 1024 file descriptors on startup

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 07:07:19 PM UTC, comment #4:

Compile patch for NetBSD

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 12:49:01 PM UTC, comment #3:
  • updated patch to work on MinGW where rlimit does not exist - it reports zero values there
  • broken on Cygwin however because of incomplete rlimit implementation
  • updated rlimit command output, on Gentoo Linux it prints:

pu -1 -1
fsize -1 -1
data -1 -1
stack 8388608 -1
core 0 -1
rss -1 -1
nprof 8191 8191
nofile 1024 1024
memlock 32768 32768
as -1 -1

New setrlimit...

spiralvoice <spiralvoice>
Project Administrator
Fri 03 Feb 2006 03:56:05 AM UTC, comment #2:

This is a first try to implement rlimit stuff from Ocaml-annexlib.
Please test if it compiles on NetBSD and if the "rlimit" command
inside MLDonkey prints some numbers.

spiralvoice <spiralvoice>
Project Administrator
Tue 31 Jan 2006 09:13:04 AM UTC, comment #1:

setrlimit code can be ripped of Ocaml extlib
http://raevnos.pennmush.org/code/extlib/doc/UnixExtras.html#TYPErlimit_resource

spiralvoice <spiralvoice>
Project Administrator
Mon 30 Jan 2006 05:46:56 PM UTC, original submission:

Please use the setrlimit(2) function to increase the number of open files to the number needed by mldonkey.

This function is not in POSIX, but it's supported by (at least) Linux and the BSDs.

This improves upon the current situation, where many users have to increase the limit manually before starting mldonkey.

Thomas Klausner <tk>

 

Attached Files
file #2072:  rlimit.patch added by spiralvoice (11KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 11 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 04 Feb 2006 09:58:40 PM UTCspiralvoiceReassign ItemFrom group mldonkey, a multi-networks file-sharing client, bugs tracker=>To group mldonkey, a multi-networks file-sharing client, patch tracker
Fri 03 Feb 2006 08:54:59 PM UTCspiralvoiceAttached File#3367=>Removed
Fri 03 Feb 2006 08:54:47 PM UTCspiralvoiceAttached File-=>Added rlimit.patch, #3368
Fri 03 Feb 2006 07:40:53 PM UTCspiralvoiceAttached File-=>Added rlimit.patch, #3367
Fri 03 Feb 2006 07:34:52 PM UTCspiralvoiceAttached File#3366=>Removed
Fri 03 Feb 2006 07:07:19 PM UTCspiralvoiceAttached File-=>Added rlimit.patch, #3366
Fri 03 Feb 2006 07:07:01 PM UTCspiralvoiceAttached File#3363=>Removed
Fri 03 Feb 2006 12:49:01 PM UTCspiralvoiceAttached File-=>Added rlimit.patch, #3363
Fri 03 Feb 2006 12:45:55 PM UTCspiralvoiceAttached File#3360=>Removed
Fri 03 Feb 2006 03:56:05 AM UTCspiralvoiceAttached File-=>Added rlimit.patch, #3360
Tue 31 Jan 2006 09:13:04 AM UTCspiralvoiceSeverity3 - Normal=>4 - Important

Back to the top


Powered by Savane 3.1-cleanup1