From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70760: 29.3.50; core dumps when copy in other apps Date: Sat, 18 May 2024 20:54:32 +0300 Message-ID: <86h6evc8fb.fsf@gnu.org> References: <86wmo8etca.fsf@gnu.org> <86r0egck5b.fsf@gnu.org> <87cyq0tb5w.fsf@gmx.de> <86le4cx3w2.fsf@gnu.org> <87le4be520.fsf@gmx.de> <87a5krdkq2.fsf@gmx.de> <87seyicduz.fsf@gmx.de> <8734qgz9t9.fsf@gmx.de> <86pltkfilr.fsf@gnu.org> <87ttivxveq.fsf@gmx.de> <8634qfe453.fsf@gnu.org> <87a5knxrm7.fsf@gmx.de> <86wmnrcoe2.fsf@gnu.org> <874javxdns.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: kun.liu@gmail.com, 70760@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 19:55:30 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 1s8OHK-0002Gz-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 19:55:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8OH1-000071-8u; Sat, 18 May 2024 13:55:11 -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 1s8OGw-00006K-1m for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 13:55:06 -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 1s8OGp-0006ws-34 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 13:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8OGs-0005pW-65 for bug-gnu-emacs@gnu.org; Sat, 18 May 2024 13:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70760 X-GNU-PR-Package: emacs Original-Received: via spool by 70760-submit@debbugs.gnu.org id=B70760.171605489522395 (code B ref 70760); Sat, 18 May 2024 17:55:02 +0000 Original-Received: (at 70760) by debbugs.gnu.org; 18 May 2024 17:54:55 +0000 Original-Received: from localhost ([127.0.0.1]:34761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8OGi-0005p9-Vm for submit@debbugs.gnu.org; Sat, 18 May 2024 13:54:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8OGd-0005oz-87 for 70760@debbugs.gnu.org; Sat, 18 May 2024 13:54:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8OGS-0006uf-4A; Sat, 18 May 2024 13:54:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xK0A0/GoSJKm7RFchRpvOVw7AE7LSxHXU7hC6TyXeuA=; b=eKkKKsfcyobN RwkzHgq1jIRfe+Xm8rtsDIyVrwPi++1LzMOtHCbbjqvtyQykcX5Vnf/DVmUjD9hd7fM/ot9mDNfR9 7SoI3T0wEF+ZvbAUOByn2ywT6Vnh67PRResqwDvoFo8gdXdzLlLH5K3NvQwKftXkhxLXBz4O5wpII GBFSGaA5k2u4GT3alIDrynxAsFHwIJUzXJQspERxpK4wNMneFTk/lW/gzAKvuVLdKwQGiMEucVT1Q vLquGK7s3ZZ3uCXhiPWARfiP47mcprnsnv52s3BHCDeI4ZVBM3upW5/GGXyf6Ykc0qK60hHvsRtZf iWLGmu9QU3BVhSTWezk4rQ==; In-Reply-To: <874javxdns.fsf@gmx.de> (message from Michael Albinus on Sat, 18 May 2024 18:55:51 +0200) 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:285360 Archived-At: > From: Michael Albinus > Cc: kun.liu@gmail.com, 70760@debbugs.gnu.org > Date: Sat, 18 May 2024 18:55:51 +0200 > > Eli Zaretskii writes: > > > OK. So how could a non-D-Bus event end up being interpreted as a > > D-Bus event? > > We see calls of dbus-event-handler in the backtrace shown by Kun > Liu. This can happen only via special-mode-map, when an event is > detected in the event queue, which is a list with the car being the > symbol `dbus-event'. The rest of the event is not checked at this point, > the event is checked for D-Bus properness in the handler. > > We have also seen by the tests of Kun Liu, that no external D-Bus event > has arrived at this time. So I guess either such an invalid D-Bus event > has been pushed by another package to the event queue, or an existing > valid event has been modified that the car is the symbol `dbus-event'. But the only place in Emacs that generates dbus-event events is dbusbind.c, right? So in that case, the first suspect is some Lisp package that pushes such events onto the Emacs event queue, do you agree? > > The only hint we have until now is that this happens when copying > > stuff from other applications. Does that ring any bells or suggest > > any ideas? > > Not for me. What I have seen is that xd_add_watch calls add_read_fd. But > in process.c, there is also the function add_non_keyboard_read_fd. I > have no idea what's the difference, but this function must exist for a > reason. Would it make sense to use this function instead? Just a wild > guess. Yes, the descriptors we use to read sub-process output are non-keyboard descriptors. But as far as I understand what you say, there's no way for those descriptors to generate dbus-event events.