From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56967: 29.0.50; Frequent crashes under Wayland Date: Tue, 13 Dec 2022 19:06:43 +0200 Message-ID: <87sfhj9qsc.fsf@thaodan.de> References: <1932596.zmb9SnqgO4@odin> <20004002.VVDfsmh7uS@odin> <875yj3sbj5.fsf@yahoo.com> <2062339.XFdaHZJ8Qi@odin> <87zgbra4hy.fsf@thaodan.de> <87a63rh2hy.fsf@yahoo.com> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30262"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 56967@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 13 18:07:18 2022 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 1p58kO-0007f6-RF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Dec 2022 18:07:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p58kE-0000Ao-0l; Tue, 13 Dec 2022 12:07:06 -0500 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 1p58kA-0000AR-Ns for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:07:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p58kA-0006qw-6r for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p58k9-0006Ti-Kq for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2022 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56967 X-GNU-PR-Package: emacs Original-Received: via spool by 56967-submit@debbugs.gnu.org id=B56967.167095121224894 (code B ref 56967); Tue, 13 Dec 2022 17:07:01 +0000 Original-Received: (at 56967) by debbugs.gnu.org; 13 Dec 2022 17:06:52 +0000 Original-Received: from localhost ([127.0.0.1]:33393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p58jz-0006TS-So for submit@debbugs.gnu.org; Tue, 13 Dec 2022 12:06:52 -0500 Original-Received: from thaodan.de ([185.216.177.71]:47344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p58jx-0006TM-9U for 56967@debbugs.gnu.org; Tue, 13 Dec 2022 12:06:50 -0500 Original-Received: from odin (dsl-trebng12-b04885-76.dhcp.inet.fi [176.72.133.76]) by thaodan.de (Postfix) with ESMTPSA id F223FD08B48; Tue, 13 Dec 2022 19:06:45 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1670951206; bh=7bqeXLN1ZvF6CY2smhvt9HOLmZlKtSV9JqU1KlA249I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=lTpzy3FbXzafwCI/9JDIlM+ivlfNik07Vf4/3MwST4QxEg5tlABXkdsLII21I/0WQ uRVEBhFEYmyMtPuROLGXGmyNIVl16oelK5cb5vF5a2v8ypKepSvx2QrpUgyY3j9qdC aWCksC4ftK/vK3Ryn+9xvlG8BO72A2d79tnSOK0JEOn49TlsnZHzMnZ7J547HYr2ab mV5P5HhP7brFtdPhnd79ROU/popwQ3SsMTsSPuXXxYtH3BtPKe7hiMEbfaeS6U5OIo LB7G2XXA7ETFLh4/85u31utEO+giZ1Akrf1U1nSuya29Jd+OZLGgAnrLHTRLD3XMsZ /ufAJCoRY9cclFaCxdVi+YnW8y87USc3h31ucx2lG5yeMVQmRQ9CZP3E/a4QPtB2po k+dqgylQoIVKsTqSL8hbvaCzCiZEyJPi0bFtALq1nAMMHIKqW8AhkjkE+VHaIE5UMo gnfgX/hj2PJBHef+4YBW5tMwnmCosMLTIZQdL5O1pVVXv4bhvgWj8LdrAW9ykZnyEG Akrgsv9/1uFhd+S51rJT5S6kHb/o4io+7XOWJE0TZImbxlHoCgKCNR8imf5oCuatf5 W2N+w2nz/7taHZ3ddphJcP0uO1QV0Us2Ovq2Dt0RzCUqGSuHVjIb4BlosJ+v5io2gl rJoYV7Hw2AOu89otl01o8tzg= In-Reply-To: <87a63rh2hy.fsf@yahoo.com> (Po Lu's message of "Tue, 13 Dec 2022 21:11:53 +0800") 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:250858 Archived-At: Po Lu writes: > Bj=C3=B6rn Bidar writes: > >> The issue got picked up on Mastodon recently: >> https://home.social/@ebassi@mastodon.social/109505829096414816 > > That site doesn't work for me, could you please paste an excerpt here? This is my mastodon.el dump that should at some context, I added the first post then my toot and Emanuel Ebassi's replies to me: START mastdon.el dump I do not like #Electron but I'm also not a fan of #Emacs. However, I apprec= iate the self-deprecating humor. https://cdn.fosstodon.org/media_attachments/files/109/501/742/682/624/996/o= riginal/749afb0111253dab.png Aaron Toponce =E2=9A=9B=EF=B8=8F:debian: (@atoponce@fosstodon.org) 2022-12-= 12 18:59:04 @atoponce @sotolf I think you get used to lisp, the language works just dif= ferent to other languages, after a time it's not as bad. What usually bothers me is Emacs being single threaded quite often or using= outdated technologies such as #xembed which is now used to embedded #webkit. The most annoying issue thou is #GTK doing funny stuff. Like for example if you loose your display manager connection on #Wayland t= hen GTK just kills your application with _exit().=20 Bj=C3=B6rn (@thaodan) 2022-12-13 10:08:16 via Web ------------ @thaodan @atoponce @sotolf Terminating on display connection loss is recomm= ended by the Wayland protocol, because Wayland is not UDP: events don't get resent, and = if the compositor and the client don't agree on their state, you'll just going to crash later= on. You could do an orderly display connection drop while keeping the process alive, but a) = only Emacs even attempts this on X11 or Wayland; and b) it's not tested in toolkits because= it's only needed by Emacs=20 Emmanuele Bassi (@ebassi@mastodon.social) 2022-12-13 12:12:26 ------------ @ebassi @atoponce @sotolf Never argued against closing the display connecti= on but using _ exit() instead of exit() to make sure the program can not react is bad at b= est or at worst malicious. This issue not only affects #Emacs but any program that wants to react on l= oosing the display connection.=20 Bj=C3=B6rn (@thaodan) 2022-12-13 13:32:46 ------------ @thaodan @atoponce @sotolf GTK only uses `_exit()` on remote display close.= It's kind of intentional: if the *server* terminates the connection, then there's nothin= g to recover from an application side. An application can only recover if it's the one that i= nitiated the closing of the display connection.=20 Emmanuele Bassi (@ebassi@mastodon.social) 2022-12-13 13:39:09 ------------ @ebassi @atoponce @sotolf So you decide for the application itself instead = of letting the application decide to what to do on `exit()`? You say there's nothing to recover the applications opinion might be differ= ent.=20 Bj=C3=B6rn (@thaodan) 2022-12-13 13:42:32 ------------ @thaodan @atoponce @sotolf You cannot safely/reliably/portably do something= after server-side disconnection. We've been there with X11 first, and the same ap= plies with Wayland: https://bugzilla.gnome.org/show_bug.cgi?id=3D646338=20 Emmanuele Bassi (@ebassi@mastodon.social) 2022-12-13 13:50:19 =E2=9C=8D 202= 2-12-13 17:22:14 ------------ @atoponce @sotolf For reference the #Debuggs entry for this: https://lists.gnu.org/r/bug-gnu-emacs/2022-08/msg00305.html=20 Bj=C3=B6rn (@thaodan) 2022-12-13 13:45:57 ------------ END mastodon.el dump=20 >> Someone reported a similar issue under X11 years earlier: >> https://bugzilla.gnome.org/show_bug.cgi?id=3D646338 > > That applies only to the GDK X11 backend though, sadly. Worth to send a patch on this? I think it might be wort to talk other GTk developers, e.g. the one that has done the change. Br, Bj=C3=B6rn