xorg-server-1.1.1. Confirmed that the same problem exists in latest git by inspection. In os/utils.c the LockServer() code has a deficiency when detecting whether a lock file is stale or not. It reads the PID from the lock file, and if that PID doesn't exist, then the lock file is assumed stale and it is purged. This is fine. However, if the PID in that file refers to any running process, X assumes the lock is valid and refuses to start the X server. As process ID's wrap around, it is a legitimate scenario that the PID saved in a stale X lock file eventually ends up referring to a running (non-X) process, and in this case, X refuses to start. It sounds unlikely, but I just saw it happen. One possible solution for this is to check the process name of the PID referred to in that file, but I don't know of any cross-platform way of doing this (on Linux I think you would have to read it from /proc).
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/350.
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.