Bug 1628297 - Shell running in GNOME Terminal seems to ignore increased limits specified in /etc/security/limits.conf
Summary: Shell running in GNOME Terminal seems to ignore increased limits specified in...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-terminal
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-12 17:15 UTC by Yann Droneaud
Modified: 2021-05-25 14:59 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-25 14:59:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1364332 0 unspecified CLOSED systemd --user does not load limits from /etc/security/limits.d/ 2021-02-22 00:41:40 UTC

Description Yann Droneaud 2018-09-12 17:15:49 UTC
Description of problem:

Not after a logout, followed by a login, not even after a reboot, increased limits set in /etc/security/limits.conf take effect on shell running in GNOME Terminal.

$ cat /etc/security/limits.d/ydroneaud.conf

ydroneaud soft nofile 32768
ydroneaud hard nofile 65536

$ id
uid=1000 (ydroneaud) ...

$ ulimit -S -n
1024
$ ulimit -H -n
4096

But it works outside of GNOME Terminal, for example through SSH:

$ ssh localhost
$ ulimit -S -n
32768
$ ulimit -H -n
65536

Or inside GNOME Terminal, using su:

$ su ydroneaud
$ ulimit -S -n
32768
$ ulimit -H -n
65536

Or inside GNOME Terminal, using sudo:

$ sudo -u ydroneaud -s
$ ulimit -S -n
32768
$ ulimit -H -n
65536

It even works when using GNOME Shell Alt-F2 shortcut to run a command:

/bin/sh -c "(ulimit -S -n && ulimit -H -n) > ~/ulimit.test 2>&1"


So I wonder why the shell in GNOME Terminal doesn't have the increased limits ?

I guess GNOME Terminal inherits the limits set by gnome-session/gdm, so why is gdm/gnome-session bypassing the PAM stack that would set those limits as specified in /etc/security/limits.conf ?

It shouldn't happen since the session it opened through systemd.

What's going on ?

Comment 1 Yann Droneaud 2018-09-12 17:29:57 UTC
Seems to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1364332

Comment 2 Yann Droneaud 2018-09-12 19:05:59 UTC
As I've understood bug #1364332, having GNOME Terminal using systemd, it ignores /etc/security/limits.conf and /etc/security/limits.d/*.conf.

So I've followed the explanation in bug #1364332, adding the following file allows me to have almost coherent settings between session kinds (gnome-terminal, ssh, su, sudo, etc.)

$ cat /etc/systemd/system/user.d/limits.conf

[Service]
LimitNOFILE=65536
LimitNOFILESoft=32768

Comment 3 Jia Yuan Lo 2019-01-18 11:52:15 UTC
the fact that other terminals like xterm and tty3+
can output the changed ulimit correctly
just doesn't make sense for gnome-terminal not behaving accordingly

i think more people starting to use esync will hit this roadblock
sooner or later and think they did something wrong...

https://github.com/lutris/lutris/issues/1462

Comment 4 Ben Cotton 2019-10-31 19:32:42 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-11-27 22:09:45 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Yann Droneaud 2019-11-28 11:30:36 UTC
I believe it's still applicable

Comment 7 Christian Stadelmann 2020-02-17 13:25:30 UTC
(In reply to Yann Droneaud from comment #6)
> I believe it's still applicable

In which version?

Comment 8 Tao Bojlén 2020-04-21 10:20:54 UTC
I am running into this same issue with the Fedora 32 beta, fully up-to-date as of right now -- GNOME terminal 3.36.1.1, and systemd 245 (v245.4-1.fc32). What is the process to reopen this bug against Fedora 32? I don't have permission  to re-open this bug; should I file a new one?

Comment 9 Fedora Program Management 2021-04-29 15:54:39 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2021-05-25 14:59:03 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.