Hitting X limit in launching maximum number of vkcube instances

Anuj Phogat anuj.phogat at gmail.com
Mon Aug 14 18:26:56 UTC 2023


Hi Olivier, Adam

My apologies for the delayed response. I was pulled into something more
urgent. Listing down my findings after experimentation based on your
suggestions:

- I was earlier using x server version 1.21.1.4. I recently upgraded the version
to 1.21.1.8. This upgrade fixed issues (dead windows and rendering) with
launching kcalc instances past the 256 default max client limit. I tested
launching 300 kcalc instances.
- I'm still getting the "_XSERVTransSocketUNIXAccept: accept() failed" error
after launching ~ 256 instances of vkcube. I was able to find the root
cause of error after patching libxtrans based on Adam's suggestion:
"_XSERVTransSocketUNIXAccept: accept() failed (Too many open files)"
- Based on the hint from the error string, I changed the system wide limit to
increase the maximum number of open files allowed from default 1024 to
'ulimit -n' confirmed the new limit. But, this change doesn't change
the error past launching ~ 256 instances of vkcube.
- I hit the same error but at ~330 instances when I try to run glxgears.

Questions:
What am I missing when changing the open files limit ?
What else can I try to get past this error ?
Should I reopen xserver issue [1] or create a new issue to track it ?

[1] : https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310


Thanks
Anuj

On Tue, May 23, 2023 at 1:41 AM Olivier Fourdan <ofourdan at redhat.com> wrote:
>
> Hi
>
> On Thu, May 18, 2023 at 10:45 AM Anuj Phogat <anuj.phogat at gmail.com> wrote:
> >
> > On Sat, May 6, 2023 at 9:04 AM Alan Coopersmith
> > <alan.coopersmith at oracle.com> wrote:
> > >
> > > On 5/5/23 16:07, Anuj Phogat wrote:
> > > > Thanks for the quick response Adam. I've seen this behavior across multiple
> > > > graphics applications
> > > > and graphics drivers. This is an extreme use case I'm trying out. So, there's a
> > > > possibility of this use
> > > > case not being handled correctly by any of the applications or graphics drivers.
> > > > But I also see some basic X functionality, like closing the window using the "x"
> > > > button, not working
> > > > properly with windows opened past the 256 limit. This happens with a modified
> > > > limit of 512. I had to
> > > > use xkill to close those windows. Any thoughts about this?
> > >
> > > Closing the window with the "x" button is a function of the window manager.
> > > Does the window manager you are using assume the number of X clients is
> > > limited to 256?  That xkill works suggests the X server is handling it
> > > correctly.
> > Alan, I took the window manager out of the equation by running multiple
> > instances of vkcube with Xorg without running any window manager.
> > Xorg.0.log file does show a log about set max clients through a .conf file:
> > (**) Option "MaxClients" "512"
> >
> > But, I start seeing below error messages at the end of the log file once
> > the number of vkcube instances go past 256:
> > "_XSERVTransSocketUNIXAccept: accept() failed"
> >
> > Seems like the modified max clients limit of 512 is not getting configured
> > correctly in X.
> >
> > What can I do to fix / debug this error ?
>
> I didn't find a mention of the actual version of the Xserver you're
> running (not knowing what Ubuntu ships), but this may be relevant for
> your issue:
>
> https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310
>
> Fixed with:
>
> https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/937
>
> And backported to the 21.1 branch with:
>
> https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/953
>
> HTH
>
> Cheers
>
> Olivier
>


More information about the xorg-devel mailing list