The X server code is assuming that one file descriptor is opened per client in os/connection.c , so it limits the number of file descriptors to the number of clients. Unfortunately Xwayland opens a lot more file descriptors than a regular X server because of those "weston-shared-XXXXXX" anonymous files for sharing buffers. The number of /extra/ file descriptors opened depends on the client so the actual limit depends on what application is running. Once the X server (Xwayland) reaches the number of file descriptors opened, it will raise a "Maximum number of clients reached" even if the actual number of clients is a lot less that the expected limit.
Follow-up patch send to the ML for further review/discussion: http://lists.x.org/archives/xorg-devel/2015-June/046695.html
Try diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c index 2d0ce3e..1022c0d 100644 --- a/hw/xwayland/xwayland-shm.c +++ b/hw/xwayland/xwayland-shm.c @@ -82,7 +82,7 @@ create_tmpfile_cloexec(char *tmpname) } #endif - return fd; + return os_move_fd(fd); } /* as a shor term fix.
(In reply to Chris Wilson from comment #2) > Try > [...] > - return fd; > + return os_move_fd(fd); Or right, that's much better, thanks! > as a shor term fix. Why just a short term fix? it looks perfectly spot on to me...
BTW, do you mind if I resend a patch as a follow-up to the ML with your solution with you as author and your signed-off-by?
(In reply to Olivier Fourdan from comment #3) > (In reply to Chris Wilson from comment #2) > > Try > > [...] > > - return fd; > > + return os_move_fd(fd); > > Or right, that's much better, thanks! > > > as a shor term fix. > > Why just a short term fix? it looks perfectly spot on to me... I thought you had scenarios requiring more than 256 clients. Certainly seems conceivable that we will run out. If that works for you send it on with Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> and your Reported-and-tested-by.
(In reply to Chris Wilson from comment #5) > If that works for you send it on with > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > and your Reported-and-tested-by. Done here: http://lists.x.org/archives/xorg-devel/2015-June/046722.html Thanks!
Fix has been merged in git by Keith, closing.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.