Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
xserver
xserver
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 889
    • Issues 889
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 95
    • Merge Requests 95
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Issues
  • #1138

Closed
Open
Opened Feb 15, 2021 by Olivier Certner@OlCe

os/utils.c: Lock file: Refrain from removing "stale" files, remove link-in-place phase, hardening of abnormal situations

Trying to remove lock files determined to be stale is inherently racy (unlink may destroy legitimate lock files re-established in the meantime), causing rare but interesting problems when servers are launched repeatedly. So give up on trying to fix that (which, to be done properly, requires an external coordinator), and just put the burden on an external coordinator (e.g., the user as the last resort). This should not cause problems in practice, since the X server deletes the lock file even in the case of abnormal server termination (also, if an OS crash occur, /tmp is normally cleaned at boot).

This allows to significantly simplify the lock code, by removing the linking-in-place step altogether (see the commit message in the diff below for how this is possible).

Also, lots of abnormal situations in LockServer(), however unlikely, are not handled properly according to POSIX and arguably need to be fixed and reported properly.

The proposed patch must be applied after that for issue #1131:

0002-os-Lock-file-No-link-phase-never-unlink-foreign-lock.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xorg/xserver#1138