[Bug 1038004] New: Cannot increase max number of descriptors
http://bugzilla.suse.com/show_bug.cgi?id=1038004 Bug ID: 1038004 Summary: Cannot increase max number of descriptors Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: x86-64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Joachim.Reichelt@helmholtz-hzi.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- As we need for parallel processing of a huge number of files we want to increase the number of file descriptors for a user. I changed in: /etc/security/limits.conf * hard nofile 12000 and /etc/systemd/user.conf DefaultLimitNOFILE=40960 but after reboot: [jr@nalani:~]>unlimit [jr@nalani:~]>limit cputime unlimited filesize unlimited datasize unlimited stacksize unlimited coredumpsize unlimited memoryuse unlimited vmemoryuse unlimited descriptors 4096 memorylocked 64 kbytes maxproc 23536 maxlocks unlimited maxsignal 23536 maxmessage 819200 maxnice 0 maxrtprio 0 maxrttime unlimited -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
Chenzi Cao
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c1
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c2
Dr. Werner Fink
I don't think setting DefaultLimitNOFILE= in user.conf is supposed to change the ulimit in bash. Actually this setting controls default resource limit for *units*.
And even in this case the limit is set on the main process only and it can change the limit, ie there's no enforcement.
Werner could you give your opinion ?
Compare the output of cat /proc/$$/limits with `ulimit -a' or `ulimit -aH' in bash respec. `limit' or `limit -h' in tcsh. The hard limits can not be increased by the process it self, e.g. limit -h descriptors descriptors 4096 limit -h descriptors 5000 limit: descriptors: Can't set hard limit (Operation not permitted) only root can do sudo -i ulimit -Hn 4096 ulimit -Hn 5000 ulimit -Hn 5000 that is that upper/hard limit is done by system aka here systemd (system.com or user.con) and/or pam (limits.conf) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c3
--- Comment #3 from Dr. Werner Fink
here systemd (system.com or user.con) and/or pam (limits.conf)
system.conf or user.conf is meant ;) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c4
Franck Bui
system.conf or user.conf is meant ;)
I don't think system.conf nor user.conf have any influence in this case. Anyways I gave it a try on an up to date Leap 42.2 and it seems to work as expected: fbui@linux-bzg2:~> cat /etc/security/limits.d/nofile.conf * hard nofile 12000 fbui@linux-bzg2:~> ulimit -Hn 12000 fbui@linux-bzg2:~> ulimit -Sn 12000 fbui@linux-bzg2:~> ulimit -Sn 12001 -bash: ulimit: open files: cannot modify limit: Invalid argument fbui@linux-bzg2:~> ulimit -Sn 3000 fbui@linux-bzg2:~> ulimit -Sn 3000 This is with: - pam-1.3.0-1.9.x86_64 - systemd-228-25.1.x86_64 @Joachim, which versions are you using ? also did you tweak any file in /etc/pam.d ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c5
Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c6
Franck Bui
# cat /etc/security/limits.d/nofile.conf cat: /etc/security/limits.d/nofile.conf: No such file or directory
yeah that's a sample I created for testing purpose. BTW in your comment #0, are you sure you're actually displaying the hard limit ? what's the output of "limit -h descriptors" ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c7
Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c8
--- Comment #8 from Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c9
--- Comment #9 from Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c10
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c11
Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c12
Franck Bui
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c13
--- Comment #13 from Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c14
Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c15
Franck Bui
and this gives the limit of 12000 files. So our problem is related by login via ssh!
I don't see any issue here with ssh: $ ssh fbui@localhost ulimit -Hn 12000 $ rpm -q openssh openssh-7.2p2-9.1.x86_64 $ cat /etc/pam.d/sshd #%PAM-1.0 auth requisite pam_nologin.so auth include common-auth account requisite pam_nologin.so account include common-account password include common-password session required pam_loginuid.so session include common-session session optional pam_lastlog.so silent noupdate showfailed Anyways I'm resetting the default assignee here because that doesn't look a systemd issue. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c16
--- Comment #16 from Joachim Reichelt
http://bugzilla.suse.com/show_bug.cgi?id=1038004
http://bugzilla.suse.com/show_bug.cgi?id=1038004#c17
Joachim Reichelt
participants (1)
-
bugzilla_noreply@novell.com