From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bjoern 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: Sun, 07 Aug 2022 17:51:25 +0300 Message-ID: <20004002.VVDfsmh7uS@odin> References: <1932596.zmb9SnqgO4@odin> <2972937.jrzt3BHeHG@odin> <87fsib9p9g.fsf@yahoo.com> Reply-To: Bjoern 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="19454"; mail-complaints-to="usenet@ciao.gmane.io" 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 Sun Aug 07 16:52:10 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 1oKhdS-0004sr-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 16:52:10 +0200 Original-Received: from localhost ([::1]:33800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKhdQ-0008MO-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 10:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKhdK-0008ME-7j for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 10:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKhdJ-0004l6-VA for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 10:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKhdJ-0006aN-RK for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 10:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bjoern Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Aug 2022 14:52: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.165988389525280 (code B ref 56967); Sun, 07 Aug 2022 14:52:01 +0000 Original-Received: (at 56967) by debbugs.gnu.org; 7 Aug 2022 14:51:35 +0000 Original-Received: from localhost ([127.0.0.1]:38128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKhct-0006Zg-80 for submit@debbugs.gnu.org; Sun, 07 Aug 2022 10:51:35 -0400 Original-Received: from thaodan.de ([185.216.177.71]:58398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKhcq-0006ZQ-OM for 56967@debbugs.gnu.org; Sun, 07 Aug 2022 10:51:33 -0400 Original-Received: from odin.localnet (dsl-trebng12-b04885-76.dhcp.inet.fi [176.72.133.76]) by thaodan.de (Postfix) with ESMTPSA id 06823D07416; Sun, 7 Aug 2022 17:51:25 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1659883886; bh=4/ypZ4hSIJxURwbovF0gHzicAPqhNuj25F8hih+zCHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mmxzoSRKL1H/zsEAMvpDMTChm+MzL+EQWMTFR2hzMw3pRHdg+h1OomqEBavsp4wNA XAKhWnaRxl5nuP+bxlvZcheI5BVzF5OhThjeP3acWYRPMzTkxsODp02ruHf3MUkILh gR5mM+5BfXTQQ+rRGfRLMa+rQwPY/joUOhenOXKVr8JUsoy/+SYlZ37AubRG2L3IQN TqPuhsEQl0dN24kLYB3Awat6P69J4pQX/FkcVShadPZa83mwARK0EGOXr/vChddFQ5 1n2aurhxGBXoNNW3FjwzaFnK+FNSFf0Tsw+3b6uLfYLRmHFd5xymTHJs8vYQ718DEY 3nuQSNVEc+l2z/QxZY5rkKQSBXccAT4/waj8AWV4v8InRMjQUSEvmlcY0pRvyybAyB yJZOCa6mS01IURNhuuFkvtEegVgT39STIisoQvlD2NZL6z4BQ/jcaSMSTFXPVylAty 6uSW1oGZ2AAU3ryPYd7W6Jlau1K62mQorZy4pwICh7qItlyDrRlewUruZN+/xM3tH0 cvrIFZhla8w4y9xjPdzMsRPFvsgWMXO2PjQoXEBiWczqsulwJnq1xQIQ/zw4vaiy7s YpzKkXmEban2fIP6f3LIubnZp7b8g3SOeNXbRYZomEw36L+VRAE99W85MCWjm0nkl8 K4ha/LtyuesjI1E1gv0FXTWI= In-Reply-To: <87fsib9p9g.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" Xref: news.gmane.io gmane.emacs.bugs:239071 Archived-At: Am Freitag, 5. August 2022, 09:29:47 EEST schrieb Po Lu: > [*Please* use "Reply All" to reply, otherwise your response will not be > recorded on the bug tracker] >=20 > Bjoern Bidar writes: > > That's the thing it doesn't look like the connection is unstabl alos > > nothing else but Emacs has this issue. >=20 > Did you leave anything else up for long enough? Try keeping gtk3-demo up > for a similar amount of time. I did I had my hole session running, nothing else had that issue. I kept the GTK-Demo running nothing happened it ran just fine. After a few hours Emacs exited with the same behaviour as explained in the= =20 bug. I on the #gtk channel on what do and I got from ebassi that it is ok to jus= t=20 call _exit. He says it might be the client behaving wrong: Thaodan: It could happen because the client made an invalid reques= t=E2=80=94 Wayland mandates that the display server closes the connection in that case I don't really understand why calling _exit is an acceptable solution anyon= e=20 that has to safe some state to the disk is lost. I attach the whole conversation to not take anything out of context here: Hello why does GTK call _exit when a display connection is lost i= n=20 wayland, how can the app react to loosing the display connection? I noticed that Emacs sometimes looses the display connection unde= r=20 Wayland (not XWayland). You don't If a client loses the connection to a running compositor then it's= =20 generally a bug in the client If you lose the connection to the display server all hope is=20 generally lost ebassi: An app may run longer or before the compositor starts eve= n=20 if not it's not nice as an application to just quit and not even let the=20 application clean up after it self. In theory, under Wayland, it might be possible to clean all data=20 attached to the display, but it's unlikely this will ever work without=20 applications dealing with it And if you lose the socket then you' you'll have to find the new one and reconnect Thaodan: Only emacs does that Pretty much literally "that"? "app may run longer or before the compositor starts" Because emacs is really a 1980s teletype app What does that change? calling _exit is not a solution. Lets assume the fault for this happening is emacs, what could cau= se=20 this? Calling exit is perfectly acceptable: the display connection is=20 severed, and that can happen for multiple reasons, including the display=20 server going away There's no "the display server is still running, but it closed the= =20 socket" mechanism for the toolkit to use The socket got closed The toolkit terminates Thaodan: It could happen because the client made an invalid reques= t=E2=80=94 Wayland mandates that the display server closes the connection in that case Or the display server decided to kill the client because it was=20 unresponsive Why should the toolkit/lib call exit isn't there any better=20 mechanism to doing such a thing in glib or gtk for that matter?=20 It would be better to not need any hacks to prevent gtk from kill= ing=20 apps. Thaodan: There is no such mechanism ebassi: OK so what's the idea behind using _exit as a mechanism,= =20 doesn't that break any other app that has state so safe too? like for examp= le=20 an office application that wants to safe it's data before going down. I already told you If the display connection is closed by the server, then there's no= =20 safe way to store the data