From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ali Bahrami Newsgroups: gmane.emacs.bugs Subject: bug#69762: X11 versions of Emacs 29 on sparc fail at startup Date: Fri, 15 Mar 2024 22:58:44 -0600 Message-ID: <344699e3-8dad-4cde-adcd-35ebec4900e7@emvision.com> References: <1e95c2c8-f7fc-456c-a8aa-d2ada44b7d13@emvision.com> <87a5n3vujp.fsf@yahoo.com> <244fddd2-2de4-4e16-945e-4927fab4af12@emvision.com> <87jzm5vf8y.fsf@yahoo.com> <2de8afe1-6410-4729-abc1-cfd541b1b4d1@emvision.com> <87frwtuymr.fsf@yahoo.com> <877ci4us9b.fsf@yahoo.com> <8e8a39c6-1272-4f2b-b749-56722bd394d7@emvision.com> <87wmq4t2rp.fsf@yahoo.com> <8790adce-e863-46f8-bbaf-25660a917e04@emvision.com> <871q8bt4au.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37289"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 69762@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 16 05:59:49 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rlM96-0009Wi-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Mar 2024 05:59:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlM8q-0003G1-07; Sat, 16 Mar 2024 00:59:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlM8j-0003FT-RN for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 00:59:26 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlM8j-0001Sc-Io for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 00:59:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rlM9K-0004zv-6T for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 01:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ali Bahrami Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69762 X-GNU-PR-Package: emacs Original-Received: via spool by 69762-submit@debbugs.gnu.org id=B69762.171056517519153 (code B ref 69762); Sat, 16 Mar 2024 05:00:02 +0000 Original-Received: (at 69762) by debbugs.gnu.org; 16 Mar 2024 04:59:35 +0000 Original-Received: from localhost ([127.0.0.1]:54722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlM8s-0004yq-Eq for submit@debbugs.gnu.org; Sat, 16 Mar 2024 00:59:34 -0400 Original-Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:33721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlM8p-0004ya-Fx for 69762@debbugs.gnu.org; Sat, 16 Mar 2024 00:59:33 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.west.internal (Postfix) with ESMTP id C52C11C000ED; Sat, 16 Mar 2024 00:58:46 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 16 Mar 2024 00:58:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emvision.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1710565126; x=1710651526; bh=5if322hSyrQ2KGSoGPRRhVZ/M+fH8W92bKhDzCD9OSU=; b= gOSrRiXQ/rgTiaKPHmMxQpyqHKl4tZ8an7iTSt3kearoKmVX0ZN+ENo051c+1CMc V1TnIaJiYDwuzOfo2pFJvXe8kwcyTM9MlN+XKdprTR3pPzscXwllCjYL22wjqeic lbKlMTvZtmLpfRWvXQn68Ue7t7LUBk8g6VnC5SewArlc9+i0QNTgIBCrF2SiEaT8 p5xld0mC3Wq8uFOVHUE+k7yrtUB9QuDSxIHbQCiptYVb06m7GsCW2cnPiIJllxvr jEhkCMjzC1CacP9Scz+9Wm9IPCRgqTLu3/iqo2H1fSzaNui5NIGcGid5sC4CkK9B mRhUCrsZckv25sPLZQu3vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1710565126; x= 1710651526; bh=5if322hSyrQ2KGSoGPRRhVZ/M+fH8W92bKhDzCD9OSU=; b=d 7ERqU+r7q0n64YPivMnDLQ6oUTBmI1q19MGwDtaUZgiLpyT57szsYp4mHTVTZbDg 4qNyYXFS7BhyoHhs4ZjnuG5O3KcUY5TCUiXIJMwXKV0QY0KzlwZjdeS3GluynQ6/ YNTRteV1f1bMEeqgmlsg43Msb+d9GGtxGgq1F4hiIqHGw0CExCtLQiNpLUBbPtE3 y3xVjTfKcOvP8fXYn7KHc7RoDAMxOtAJT5HomZMIozD4SRZEBvReTGxX76QQnRo+ VlktJTVE1kSNHxKJFtWrVII6PrLxVR6wWqO8GkMLpi8wvV33hDpXudZtty3s4GKC pK4lLidBvif3t2kesPuQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrkedtgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtje ertddtvdejnecuhfhrohhmpeetlhhiuceurghhrhgrmhhiuceorghlihgpghhnuhdvsegv mhhvihhsihhonhdrtghomheqnecuggftrfgrthhtvghrnhepveetfedvveekieehteekud euledvtdeiieetleeuheevkedttdeiieeghfetuedvnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghlihgpghhnuhdvsegvmhhvihhsihhonh drtghomh X-ME-Proxy: Feedback-ID: ie0614658:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Mar 2024 00:58:45 -0400 (EDT) Content-Language: en-US In-Reply-To: <871q8bt4au.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281705 Archived-At: On 3/15/24 6:21 PM, Po Lu wrote: > Ali Bahrami writes: > >> Standing by for the next iteration. Thank you! >> >> - Ali > > How about this? Thanks. > > diff --git a/src/xterm.c b/src/xterm.c > index c8a43785564..c4cd9386270 100644 > --- a/src/xterm.c > +++ b/src/xterm.c > @@ -7297,11 +7297,11 @@ x_sync_init_fences (struct frame *f) > /* The drawable given below is only used to > determine the screen on which the fence is > created. */ > - FRAME_X_WINDOW (f), > + dpyinfo->root_window, > False); > output->sync_fences[1] > = XSyncCreateFence (FRAME_X_DISPLAY (f), > - FRAME_X_WINDOW (f), > + dpyinfo->root_window, > False); > > XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), I'm afraid that it still fails with the same error: % src/emacs X protocol error: BadDrawable (invalid Pixmap or Window parameter) on protocol request 134 Serial no: 1318 Failing resource ID (if any): 0x43020000 Minor code: 14 This is a bug! Please report this to bug-gnu-emacs@gnu.org! ----- The following isn't a fix, but I've come up with a workaround. I was looking at the code for x_sync_init_fences() that we've been doing these experiments on. I noticed that that this code is not always used: /* Sync fences aren't supported by the X server. */ if (dpyinfo->xsync_major < 3 || (dpyinfo->xsync_major == 3 && dpyinfo->xsync_minor < 1)) return; Hence, the sync fence support is optional, and emacs is willing to run without it. It's also only compiled in when built on systems that know the extension, guarded by a '#ifdef HAVE_XSYNCTRIGGERFENCE'. And lastly, it's only called for non-GTK X11, which essentially means, only for Lucid: xfns.c #if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \ && defined HAVE_CLOCK_GETTIME x_sync_init_fences (f); #endif So this works on Solaris 10 sparc, because those old X11 bits lack the sync fence extension. And it "works" on current Solaris GTK, because it's not used. Hence, the workaround, which is to put this at the top of x_sync_init_fences(): /* This feature does not work properly on sparc */ #ifdef __sparc return; #endif With that in place, Lucid emacs starts, and runs normally. This is clearly not a proper fix, but it is an effective workaround, and presumably, no worse that using emacs 28.2, which completely lacks sync fence support. I wonder if we might be looking at a problem with the sync fence extension on sparc? Although I now have usable way around the issue, I'm willing to continue with any experiments you want to try. Let me know... Thanks! - Ali