From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Bisson Newsgroups: gmane.emacs.bugs Subject: bug#49253: 27.2; Emacs non-responsive when pasting into terminal-mode Date: Mon, 28 Jun 2021 10:28:59 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26021"; mail-complaints-to="usenet@ciao.gmane.io" To: 49253@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 28 17:23:10 2021 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 1lxt6M-0006Wu-LX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Jun 2021 17:23:10 +0200 Original-Received: from localhost ([::1]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxt6L-0003CI-JG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Jun 2021 11:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxt6F-00039H-1v for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 11:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxt6E-0005ct-QN for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 11:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lxt6E-0001jA-IU for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Bisson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Jun 2021 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49253 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16248937276558 (code B ref -1); Mon, 28 Jun 2021 15:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2021 15:22:07 +0000 Original-Received: from localhost ([127.0.0.1]:52253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxt5K-0001hh-9y for submit@debbugs.gnu.org; Mon, 28 Jun 2021 11:22:07 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxsGA-0000Nx-VX for submit@debbugs.gnu.org; Mon, 28 Jun 2021 10:29:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxsGA-00022W-Mp for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 10:29:14 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:37722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxsG8-0004dE-Qz for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2021 10:29:14 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id k8so25993140lja.4 for ; Mon, 28 Jun 2021 07:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=59vzM3X5Ao9ueh+egCpEBjG8mQjW4vxpuWqfuJb9V/8=; b=I5VEr5rR6lMlxok5YH5OGt4gONJ2v/AGfMJdxa9AUIKK0dDpJlzWTfS7hK9ZO0CmI5 q7mC1J0ZrW49+8L0owr9JoZ7/P1gU5KPhwf1dtk/n/tzhWkkgjfvuwWEFdZoWPggGL2B mMkDBq+WMKI1bJeOWTtG5Oglj3JzWLKZrW2Nlpnt4UDI0H4VWp6lq12bNOhb0RvUxCkU LUYO5DkC+ZMWftorqU1v/r6b3dg3jdL2kXJcZ4U+ZAqHQTIr0wSP9Uwn5Uug8xesUrVJ wDBrojcMkByHamGI1ANrJAKkvgCnfKPQyNPPtHY1hGh9WapU/LNc5cg4Q46GQ9gz1dJi Mtmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=59vzM3X5Ao9ueh+egCpEBjG8mQjW4vxpuWqfuJb9V/8=; b=hvf+ZYKce339SXmX62+qFUajdtSkVI/JCyARpAOl0gFsEp46YW4FNZLGpqsD0ADAZD hfNMBCFadjCMI+2U2Ls5X3eB06V0ba/TA0KKsNKT1MSSD2IBrRo6iQff8BfQpKhmo/6S 0rCaDwBeSfU85l+AMQOlNEHddBNECQQBgegrggEhInqICpa1DQobyCYnPmZuVT8CNTrQ JGGYG9n6IL+IEgpIyUt6AFexBwZaVB5d/tkwYbYdaFil6SEdGgiDd16cIwnEU8zb9krR MWDQMqjXfBx40X6yIDOSXmR1H3QAgV7Pv8ah/QOZIS9BV3FShSyOpJO8ZzzR0l4I7bfM BoOQ== X-Gm-Message-State: AOAM531J5PoJsE9byXQcQaZu/+7AwQOepL2lnhW6vnhY0jtjk1w/R/GS PHJVTaFgLifaoEXMWj4WsscTDndC7oV3NK1wuK9Jrh+K+PU= X-Google-Smtp-Source: ABdhPJz7Mxuu3nMwCAjC/mJVhwzAD9EcuRTjCNeYLltd6NUujE1FO9y57l9QeEKvkDxeVYGb6dzd0zoSD4USYUm+Bt4= X-Received: by 2002:a2e:2f14:: with SMTP id v20mr20834095ljv.363.1624890550724; Mon, 28 Jun 2021 07:29:10 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=bisson.m@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 28 Jun 2021 11:22:05 -0400 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:209062 Archived-At: I have observed this behavior from MacOS, with an Emacs running either locally on MacOS, or over SSH (running on Linux). Without any modifications, a -Q invocation causes "xterm--pasted-text: Failed select: Invalid argument", but without -Q it simply hangs. It can attach emacsclient sessions, but they do not accept input. 1. Start "emacs -nw" 2. M-x term 3. In another application, copy some text into the clipboard, it doesn't matter what. 4. Return to the Emacs session, and paste into the terminal (I used Command-V). 4a. Emacs no longer responds. You have to kill (not kill -9, mind you). Running strace makes it seem like it's missing some pselect call, but I haven't quite sniffed out the issue. 4b. With -Q, it more helpfully prints "xterm--pasted-text: Failed select: Invalid argument" and continues functioning, but this is clearly not the desired behavior either. I no longer have (direct) access to a Linux, XTerm, so I've been running into the problem since Emacs 26.3 on Linux *through* the Mac OS Terminal application. Emacs doesn't have to be the version listed below, in other words. I will try to update this bug when I figure out what thing in my dot file causes the hang instead of the delay+error message. All I have relating to terminal-mode is a hook that sets two key-bindings. When I manually add this in -Q, it still doesn't hang. Perhaps it's some other mode that loads outside my dot file. This problem is actually super annoying :) as I will have hundreds of files open, as well as a bunch of terminals in an emacs daemon process, and accidentally I will forget and paste some text into the session, at which point I will have to open a second terminal to this remote host, find and kill the emacs process, then rearrange all my things back to what I was doing. It happens once a day at this point... In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2021-03-27 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.4 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Quit [2 times] Making completion list... Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: global-whitespace-mode: t display-battery-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq gv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils disp-table whitespace battery paren time byte-opt bytecomp byte-compile cconv advice tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 48031 7233) (symbols 48 6582 1) (strings 32 17172 1862) (string-bytes 1 572362) (vectors 16 10205) (vector-slots 8 127980 10714) (floats 8 28 24) (intervals 56 200 0) (buffers 1000 12))