From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#63865: 29.0.90; call-process while owning the X selection hangs other processes Date: Sat, 03 Jun 2023 07:10:41 -0400 Message-ID: References: <83edmt9j8i.fsf@gnu.org> <87bkhxnhpk.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9206"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 63865@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 13:11:32 2023 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 1q5PAP-0002Ds-Nn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 13:11:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5PA1-0000QU-6p; Sat, 03 Jun 2023 07:11:05 -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 1q5P9z-0000Py-1M for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 07:11:03 -0400 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 1q5P9y-0004Ps-PI for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 07:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5P9y-0001t4-LR for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 07:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63865 X-GNU-PR-Package: emacs Original-Received: via spool by 63865-submit@debbugs.gnu.org id=B63865.16857906487212 (code B ref 63865); Sat, 03 Jun 2023 11:11:02 +0000 Original-Received: (at 63865) by debbugs.gnu.org; 3 Jun 2023 11:10:48 +0000 Original-Received: from localhost ([127.0.0.1]:41634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5P9k-0001sD-7F for submit@debbugs.gnu.org; Sat, 03 Jun 2023 07:10:48 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5P9i-0001rz-BI for 63865@debbugs.gnu.org; Sat, 03 Jun 2023 07:10:46 -0400 In-Reply-To: <87bkhxnhpk.fsf@yahoo.com> (Po Lu's message of "Sat, 03 Jun 2023 15:11:19 +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:262821 Archived-At: Po Lu writes: > Eli Zaretskii writes: > >>> From: Spencer Baugh >>> Date: Fri, 02 Jun 2023 21:55:09 -0400 >>> >>> >>> 1. Under X11, with the GTK or Lucid toolkits: >>> emacs -Q >>> 2. Become owner of the clipboard selection by killing some text; the >>> starting comments in the scratch buffer are a good candidate. >>> 3. Immediately afterwards (i.e. without copy and pasting text in another >>> window), run: >>> (call-process "sleep" nil nil nil "inf") >>> 4. Now other applications will hang when they attempt to paste text. >>> Google Chrome and Slack are two examples. (GTK-based applications >>> seem to be fine. So much for proprietary software...) >> >> Thanks. >> >> Does this happen also with the latest pretest, v29.0.91? > > I can't reproduce this, but the closest thing to Google Chrome on the > computer I am currently using is Firefox 10.0.7. BTW, this can also be reproduced using just Emacs. If I try to paste in another Emacs instead of in Google Chrome, I get a hang, followed by: gui-get-selection: (error "Timed out waiting for reply from selection owner") With -DTRACE_SELECTION on both Emacsen, the selection-owner Emacs prints no logs, while the pasting Emacs prints the following log: 48866: Get selection UTF8_STRING, type _EMACS_TMP_ 48866: Start waiting 5 secs for SelectionNotify. 48866: Waiting for 0 nsecs in addition. 48866: Got event = NO 48866: Get selection TIMESTAMP, type _EMACS_TMP_ 48866: Start waiting 5 secs for SelectionNotify. 48866: Waiting for 0 nsecs in addition. 48866: Got event = NO > So would you also build Emacs with -DTRACE_SELECTION, and show what is > printed by Emacs when the requestor hangs? Emacs prints nothing while stuck in call-process and the requestor (Chrome) is hanging. After I interrupt call-process, this log prints. 48290: x_handle_selection_event 48290: XGetAtomName --> NULL 48290: XGetAtomName --> text/plain;charset=utf-8 48290: x_handle_selection_request: selection=CLIPBOARD, target=text/plain;charset=utf-8 48290: XInternAtom text/plain;charset=utf-8 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 70 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 70 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=UTF8_STRING 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 70 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 70 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=UTF8_STRING 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 70 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 70 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=UTF8_STRING 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 70 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 70 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=TARGETS 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 92 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 23 elements directly to requestor window 48290: x_handle_selection_event 48290: x_handle_selection_request: selection=CLIPBOARD, target=UTF8_STRING 48290: x_start_selection_transfer: transferring to 0x1600000. transfer consists of 70 bytes, quantum being 16777112 48290: x_start_selection_transfer: writing 70 elements directly to requestor window