From owner-freebsd-x11@freebsd.org Mon Feb 8 16:39:44 2021 Return-Path: Delivered-To: freebsd-x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 550C5539010 for ; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DZBZS1nGMz4Thg for ; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 3B037538EB6; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) Delivered-To: x11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39966539102 for ; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZBZS0qP9z4TqM for ; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AD5D1ABDB for ; Mon, 8 Feb 2021 16:39:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 118GdhmL027391 for ; Mon, 8 Feb 2021 16:39:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 118GdhdV027390 for x11@FreeBSD.org; Mon, 8 Feb 2021 16:39:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 253278] x11-servers/xorg-server: Lock file: Various fixes Date: Mon, 08 Feb 2021 16:39:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: olivier.freebsd@free.fr X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_severity Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 16:39:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253278 Olivier Certner changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Affects Only Me |Affects Some People --- Comment #2 from Olivier Certner --- Hi, sorry for not having stated the high-level use case here: - Launch X with "startx", specifying '/usr/local/bin/Xorg' as the server. E.g.: "startx -- /usr/local/bin/Xorg :1" You'll get an immediate crash saying "Can't read lock file /tmp/.X1-lock". Although no lock file exists at all under '/tmp'. The error comes from the fact that some lock file is prepared under another name (e.g., for display :1, under name '/tmp/.tX1-lock'), and this file is = then hardlink to the final lock name using link(2), which improperly fails.=20 The point of fixes 2 and 3 is to respectively better report on this problem= and solve it. 3 is a simplification of the existing code (no functional change intended), which has the effect of working around a FreeBSD bug in link(2) = that I'm going to submit as a separate bug with patch. Fix 1 is unrelated, done while I was looking at this code, and its usefulness is debatable, especial= ly once bug #253277 is fixed. Even with this patch, pursuing with: "startx -- /usr/local/bin/Xorg :1" still doesn't work, because Xorg must be run as root. Substitution with: "startx -- /usr/local/bin/X :1" or "startx -- /usr/local/bin/Xorg.wrap :1" makes it work, but then the fixes are not needed, since link(2) works. Given all that, here is a path I find reasonable: 1. Focus should be #253277, this one is secondary. 2. I'll submit these fixes upstream. Maybe should we keep this PR open and I'll link the upstream bug here. Or I= /you can close it. Don't know what's the policy in such cases. Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=