[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#646940: default RLIMIT_NOFILE surpasses kern.maxfilesperproc

Package: kfreebsd-image-8.1-1-amd64
Version: 8.1+dfsg-8
Severity: important

On my system, the default limits for RLIMIT_NOFILE surpass the system-wide
maximum limit set in kern.maxfilesperproc:

$ sysctl kern.maxfilesperproc
kern.maxfilesperproc: 11095
$ ulimit -n

attempting to change this limit, however, results in the effective value
being corrected:

$ ulimit -n 12328
$ ulimit -n

This confuses some application software.  For example, valgrind assumes that
if you substract 20 to rlim_cur you obtain a free file descriptor for
dup2()-ing into it, etc.

I could only reproduce this problem with kFreeBSD 8.1.  My tests on 8.2,
9-STABLE and 10-CURRENT indicate these versions are not affected (but
I can't be sure if there are other factors that could be hiding the bug).

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kfreebsd-image-8.1-1-amd64 depends on:
ii  freebsd-utils                 8.1-5      FreeBSD utilities needed for GNU/k
ii  kldutils                      8.1-5      tools for managing kFreeBSD module

kfreebsd-image-8.1-1-amd64 recommends no packages.

kfreebsd-image-8.1-1-amd64 suggests no packages.

-- no debconf information

Reply to: