Bug 215791 - x11-servers/xorg-server: please increase MAXCLIENTS in include/misc.h to at least 512
Summary: x11-servers/xorg-server: please increase MAXCLIENTS in include/misc.h to at l...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-x11 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 08:55 UTC by vermaden
Modified: 2018-01-09 10:23 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2017-01-05 08:55:02 UTC
Current limit for MAXCLIENTS on X11 is set to 256 which sometimes is too small.

# grep -r MAXCLIENTS xorg-server-1.17.4 | grep 256
./include/resource.h:#if MAXCLIENTS == 256
./include/misc.h:#define MAXCLIENTS     256

If You ask how to reach that limit (256), then try using ClusterSSH on more then 250 hosts ;)

Dunno if that is good argument, but RHEL or Debian distrubutions also increased it to at least 512.

Regards,
vermaden
Comment 1 vermaden 2017-01-05 10:11:26 UTC
Fast way to test below, I am using it with 512 and it was stable ala the time.



# XORG=/usr/ports/x11-servers/xorg-server

# make -C ${XORG} extract
By default, the X Server installs as a set-user-id root binary. When run by
a normal user, it checks arguments and environment as done in the x11/wrapper
port before handling them normally.  If you are concerned about the security
of this, but still want to run an X Server (for example using xdm/kdm/gdm,
which will still run the server as root), you can cancel the build and set
xorg-server_UNSET=SUID in /etc/make.conf.
===>  License MIT accepted by the user
===>  Found saved configuration for xorg-server-1.17.4,1
===>   xorg-server-1.17.4,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by xorg-server-1.17.4,1 for building
===>  Extracting for xorg-server-1.17.4,1
=> SHA256 Checksum OK for xorg/xserver/xorg-server-1.17.4.tar.bz2.

# cd /usr/ports/obj/${XORG}/work/xorg-server-*/include
(OR)
# cd ${XORG}/work/xorg-server-*/include

# grep MAXCLIENTS misc.h
#define MAXCLIENTS     256

# sed -i -E 's/MAXCLIENTS.*256/MAXCLIENTS\ 512/g' misc.h

# grep MAXCLIENTS misc.h
#define MAXCLIENTS 512

# make -C ${XORG} build deinstall install clean



Regards,
vermaden
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-09 02:16:56 UTC
xorg-server has xorg-server-1.18.4

grep MAXCLIENTS gives
xorg-server-1.18.4/include/misc.h:#define MAXCLIENTS	512

I think it is done and can be closed.
Comment 3 vermaden 2018-01-09 10:10:15 UTC
Yep.
Comment 4 Niclas Zeising freebsd_committer 2018-01-09 10:23:01 UTC
This has already been fixed/done, but the PR still lingers. Close this.