Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] dota 2 stopped working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 12:47 am    Post subject: [solved] dota 2 stopped working Reply with quote

after an update to dota 2 yesterday, it stopped working. i get this message in the console

Code:
bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.


and of course
Code:
sysctl kernel.unprivileged_userns_clone=1

doesn't work.

Code:
sysctl kernel.unprivileged_userns_clone=1
sysctl: cannot stat /proc/sys/kernel/unprivileged_userns_clone: No such file or directory


user namespaces are enabled in my kernel. how do i enable unprivileged_userns_clone on gentoo to see if that fixes my problem?

this is happening on two boxes where i run steam & dota 2.


Last edited by slaterson on Thu Feb 03, 2022 3:37 am; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1712

PostPosted: Thu Feb 03, 2022 1:27 am    Post subject: Reply with quote

As per https://serverfault.com/questions/939455/unprivileged-userns-clone-no-such/939457#939457/, this sysfs path is a Debian specific patch. Gentoo does not use this patch, but you could apply anything yourself via /etc/portage/patches. No promises things work as expected.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 1:52 am    Post subject: Reply with quote

is there a different way to enable this is gentoo, or is it something that the kernel enables by default and debian allows it to be turned on/off? i don't want to get into patching the kernel manually, too much maintenance.

is this possibly a library or executable that is part of the steam install that i could replace with the native gentoo library/executable?

and thanks for the quick reply!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21835

PostPosted: Thu Feb 03, 2022 2:37 am    Post subject: Reply with quote

From the same shell where that fails, can you manually unshare a user namespace? If not, what error is shown?

Exactly what options is bwrap using when it tries to set up the user namespace?
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 3:32 am    Post subject: Reply with quote

not sure i am doing this correctly, here is my attempt

Code:
$ unshare -U
unshare: unshare failed: Operation not permitted


obviously something wrong.

i'm not sure what options bwrap is using as this is run by dota 2 and after searching through a trail of start up scripts, bwrap isn't being called by any of them that i can find.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 3:37 am    Post subject: Reply with quote

marking this as solved.

in a recent dota 2 update (couple days ago) a bunch of steam play stuff was automatically downloaded and installed. after searching the interwebs, i discovered there was an option to use steam play, which made me suspicious. i found the option in the steam client and disabled it on both boxes, restarted steam, and dota 2 works again.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 3:48 am    Post subject: Reply with quote

also, thanks for the questions and suggestions. while it didn't directly fix anything, it prompted additional thinking and searching which ultimately did solve the problem.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21835

PostPosted: Thu Feb 03, 2022 4:23 am    Post subject: Reply with quote

Odd. For me, unshare -U starts a new user namespace with no user mappings. It does not fail.
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 5:14 am    Post subject: Reply with quote

Hu wrote:
Odd. For me, unshare -U starts a new user namespace with no user mappings. It does not fail.


my steam install is in a chroot. interestingly, unshare -U works from outside the chroot. not sure what the difference is or what to check.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21835

PostPosted: Thu Feb 03, 2022 4:50 pm    Post subject: Reply with quote

You cannot create a user namespace while in a chroot relative to your mount namespace. This appears to have been blocked at least since 2013. See kernel/user_namespace.c function create_user_ns with its call to current_chrooted:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c?h=v5.16#n92:
   /*
    * Verify that we can not violate the policy of which files
    * may be accessed that is specified by the root directory,
    * by verifying that the root directory is at the root of the
    * mount namespace which allows all files to be accessed.
    */
   ret = -EPERM;
   if (current_chrooted())
      goto fail_dec;
Back to top
View user's profile Send private message
slaterson
Guru
Guru


Joined: 26 Feb 2003
Posts: 313

PostPosted: Thu Feb 03, 2022 6:19 pm    Post subject: Reply with quote

alrighty then. seems if i really want to make this work i'll need to get steam running outisde the chroot. thats something for another day...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum