Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296663 - net-dns/bind-9.4.3-P4 reports "max open files (1024) is smaller than max sockets (4096)"
Summary: net-dns/bind-9.4.3-P4 reports "max open files (1024) is smaller than max sock...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-12 22:27 UTC by Huemi
Modified: 2012-05-20 16:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Huemi 2009-12-12 22:27:05 UTC
According to a RedHat bug report this is caused by a kernel bug.
(https://bugzilla.redhat.com/show_bug.cgi?id=477540) 

It seems that this bug hasn't been fixed in gentoo-sources-2.6.31-r6?

It is possible that this issue is a duplicate of a sub-issue of bug 269202, but because it also affects another named version, wasn't the main issue and hasn't been fixed/worked on yet, I report this as a new bug. 

So please don't mark it as duplicate without fixing it. Thanks.

Reproducible: Always

Steps to Reproduce:
Start named and read the output in /var/log/messages. 
Actual Results:  
You will see that named will use up to 4096 sockets, but won't be able to do so, because it can only use 1024 files.

Expected Results:  
Named can use as many files as it needs.
Comment 1 William Waisse 2010-02-02 13:37:51 UTC
same problem here since I upgraded to 
net-dns/bind-9.4.3_p4
Comment 2 William Waisse 2010-02-11 03:40:28 UTC
(In reply to comment #1)
> same problem here since I upgraded to 
> net-dns/bind-9.4.3_p4
> 

 sonmeone found a workaround here : 

http://www.mail-archive.com/freebsd-stable@freebsd.org/msg102398.html

"So I limited the number of sockets named would ask for using this in
/etc/rc.conf:"

named_flags="-4 -S 1024"

 where should I add this in gentoo ( /etc/conf.d ? )

 I dont want to upgrade the kernel just for this small problem

Comment 3 Huemi 2010-02-11 06:42:37 UTC
you could add in /etc/bind/named.conf in the options-section as a workaround:
files 1024;

Remember that you limit the maximum number of open files to 1024, which might have negative side effects when i.e. open libraries also count (maybe 8096 is a better value). 

But this doesn't solve the problem that occurs, when you don't want to limit the maximum number of used files (=unlimited, which is the default).

BTW: you shouldn't only update the kernel to the latest version for small problems, but for security reasons, but it seems that the newest stable gentoo-kernel wouldn't fix the problem with the unlimited files restriction :-(
Comment 4 Huemi 2010-10-26 17:29:24 UTC
Problem is caused by default open files ulimit (try to enter ulimit -n and you see that it is 1024).

Is there a possibility to set in /etc/bind/named.conf in the options-section following value (at least for future versions)?
files 4096;
Comment 5 Christian Ruppert (idl0r) gentoo-dev 2012-05-20 16:33:37 UTC
I don't think we're going to change the default value.
If bind exceeds the limit than either increase it by using limits or use the -S or even files ...; option.