Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ulimit restricted after starting sway #3929

Open
honza opened this issue Mar 18, 2019 · 9 comments
Open

ulimit restricted after starting sway #3929

honza opened this issue Mar 18, 2019 · 9 comments

Comments

@honza
Copy link

honza commented Mar 18, 2019

sway version 1.0-rc1-177-gacdb4ed7 (Mar 16 2019, branch 'master')

  1. Computer boots into tty
  2. ulimit -n says 50,000
  3. Start sway with sway
  4. ulimit -n says 1024

Any ideas?

@emersion
Copy link
Member

Maybe it's because sway is suid or has caps?

@honza
Copy link
Author

honza commented Mar 18, 2019

How can I verify these things? The "s" ins't in the output of of ls -l $(which sway).

@emersion
Copy link
Member

What about getcap /usr/bin/sway?

@honza
Copy link
Author

honza commented Mar 19, 2019

Empty output

@emersion
Copy link
Member

Beats me then

@honza
Copy link
Author

honza commented Mar 19, 2019

Beats me then

Thanks for trying!

@schauveau
Copy link

You may want to have a look at /proc/PID/limits for various processes (sway, shells, ...). That could give you some clues to figure out what is causing that.
My bet would be for PAM via some config files in /etc/security/

@mstoeckl
Copy link
Contributor

I ran into a similar issue, except with ulimit -c changing; according to strace sway,

prlimit64(0, RLIMIT_CORE, {rlim_cur=0, rlim_max=0}, NULL) = 0

was being called. Identifying the calling point by running sway with gdb and catch syscall 302 revealed that I had been building with AddressSanitizer enabled, and that its initialization routines were responsible.

@BoostCookie
Copy link

For me Lutris is complaining when I try to start a game.
https://github.com/lutris/docs/blob/master/HowToEsync.md

To work around sway resetting the limits, I start lutris via

sudo -u $(whoami) -E lutris

After sudo the limits are the ones I set in /etc/security/limits.conf

% ulimit -Hn
4096
% sudo -u $(whoami) -E sh -c "ulimit -Hn"
1048576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants