Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 857483 - x11-base/xorg-server-21.1.3-r3 BadIDChoice with >256 clients when MaxClients is defined
Summary: x11-base/xorg-server-21.1.3-r3 BadIDChoice with >256 clients when MaxClients ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-10 17:20 UTC by Hank Leininger
Modified: 2022-12-05 10:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hank Leininger 2022-07-10 17:20:35 UTC
In my xorg.conf's ServerFlags section I have: Option "MaxClients" "512"

This works fine with x11-base/xorg-server-1.20.*

With x11-base/xorg-server-21*, X clients start getting BadIDChoice errors once there are ~256 connections:

$ for A in $(seq 1 300) ; do xterm & sleep 0.2 ; done
...
[212] 17654
$ X Error of failed request:  BadIDChoice (invalid resource ID chosen for this connection)
  Major opcode of failed request:  55 (X_CreateGC)
  Resource id in failed request:  0x20000000
  Serial number of failed request:  3
  Current serial number in output stream:  7

At that point, according to xrestop, there were 256 connections (with the balance taken up by window manager, other apps, etc.).

Downgrading back to x11-base/xorg-server-1.20.* avoids the error.

This happened the first time I tried xorg-server-21* some months ago. I thought maybe https://bugs.gentoo.org/830482 was related, so I tried again now that that is fixed, but the same problem occurs.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 07:51:16 UTC
I've reproduced this with the Intel drivers too. It looks like https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310 is the report upstream.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 07:58:19 UTC
I've included some of the details here upstream: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310#note_1464002
Comment 3 Larry the Git Cow gentoo-dev 2022-12-05 10:21:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=632db727dc0c879fa4eb1aedcb747d9a9265d330

commit 632db727dc0c879fa4eb1aedcb747d9a9265d330
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-05 10:17:44 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-05 10:19:33 +0000

    x11-base/xorg-server: backport BadIDChoice fix w/ MaxClients
    
    I was hoping this would slip into a release but it hasn't yet.
    
    In any case, this fix has been on master for a while & I've
    been running with it for months.
    
    Closes: https://bugs.gentoo.org/857483
    Closes: https://bugs.gentoo.org/875977
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/xorg-server-21.1.4-BadIDChoice.patch     |  59 +++++++
 x11-base/xorg-server/xorg-server-21.1.4-r1.ebuild  | 195 +++++++++++++++++++++
 x11-base/xorg-server/xorg-server-9999.ebuild       |   2 +-
 3 files changed, 255 insertions(+), 1 deletion(-)