From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#16737: Timed out waiting for reply from selection owner Date: Tue, 23 Jun 2015 19:45:47 -0400 Message-ID: References: <20150604134219.GC21407@att.net> <20150605143604.GE21407@att.net> <20150615030034.GG21407@att.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435103182 17673 80.91.229.3 (23 Jun 2015 23:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2015 23:46:22 +0000 (UTC) Cc: 16737@debbugs.gnu.org To: "Alan D. Salewski" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 24 01:46:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7XtK-0007kE-4p for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 01:46:10 +0200 Original-Received: from localhost ([::1]:47883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7XtJ-00015z-Js for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jun 2015 19:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7XtG-00015u-5v for bug-gnu-emacs@gnu.org; Tue, 23 Jun 2015 19:46:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7XtC-0007VX-M0 for bug-gnu-emacs@gnu.org; Tue, 23 Jun 2015 19:46:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7XtC-0007VT-GW for bug-gnu-emacs@gnu.org; Tue, 23 Jun 2015 19:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z7XtC-0000US-5n for bug-gnu-emacs@gnu.org; Tue, 23 Jun 2015 19:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jun 2015 23:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16737 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16737-submit@debbugs.gnu.org id=B16737.14351031551871 (code B ref 16737); Tue, 23 Jun 2015 23:46:02 +0000 Original-Received: (at 16737) by debbugs.gnu.org; 23 Jun 2015 23:45:55 +0000 Original-Received: from localhost ([127.0.0.1]:55654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Xt3-0000U5-IC for submit@debbugs.gnu.org; Tue, 23 Jun 2015 19:45:54 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:49443) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7Xt0-0000Tw-Au for 16737@debbugs.gnu.org; Tue, 23 Jun 2015 19:45:51 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t5NNjl3d016051; Tue, 23 Jun 2015 19:45:47 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 361E1AE2F7; Tue, 23 Jun 2015 19:45:47 -0400 (EDT) In-Reply-To: <20150615030034.GG21407@att.net> (Alan D. Salewski's message of "Sun, 14 Jun 2015 23:00:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.5 X-NAI-Spam-Rules: 2 Rules triggered SNW_DPH=0.5, RV5346=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5346> : inlines <3267> : streams <1460388> : uri <1967507> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104283 Archived-At: > The below cookbook works to reproduce the issue for me every time, so I > can now trigger the issue on-demand. Thanks. Sadly, the developer who was most familiar with this code has moved on to better pastures, so hopefully someone else will step up soon, but don't be surprised if your bug doesn't get the attention it deserves, Stefan > As noted in message #149 above[0], I'm running the > 'emacs24-lucid-24.4+1-5' package on Debian GNU/Linux; x86_64; 4 core > Intel i7. > I'm running an X11 window manager (sawfish) with no clipboard manager. > To reproduce the issue: > 1. $ type -a emacs > emacs is /usr/bin/emacs > $ readlink -f /usr/bin/emacs > /usr/bin/emacs24-lucid > $ emacs -Q > The "*scratch*" buffer is visible. > 2. M-x server-start > 3. In a terminal window (xterm in my case): > $ emacsclient -t > The "*scratch*" buffer is visible here, as well. > 4. Select a sizable bit of text to the X11 clipboard. A small amount > of text won't trigger the issue, but I don't yet know what the > boundary is. For my testing, I have a browser window open to > this web page in iceweasel (firefox), and use the 'C-a' hotkey in > that app followed by 'C-c' to select the full page of text: > http://matt.might.net/articles/low-level-web-in-racket/ > 5. In the emacsclient window in the terminal emulator, paste the > text from the clipboard. I use the middle button on my 3-button > mouse to do this. > 6. Back in iceweasel, select any small amount of text (~20 chars is > fine) from the same page (again, using 'C-c'). > 7. In the X11 emacs frame, position the mouse pointer over the > blinking cursor and press the middle mouse button to attempt a > "paste" operation (mouse-yank-primary). > Emacs appears to hang for about 20 seconds, and then the "Timed > out waiting for reply..." message appears. > The cookbook works not only with the stock Debian 'emacs24-lucid' > package, but also with that package compiled with different build time > options (-g, -O0, -DTRACE_SELECTION). The cookbook also works when I > build with random other debugging code compiled in (all based on the > Debian source package emacs24-24.4+1). It does not seem to be sensitive > to being set up "just right". > A slight variation of the above cookbook works with the stock 'emacs24' > Debian package (same version as the '*-lucid' package above), which is > the variation compiled to use gtk. For this version, the small amount of > text selected in step 6 above does not seem to trigger the issue, but > pasting the full amount of text from the web page does. So the cookbook > variation here is to simply skip step 6 (or replace it with step 4, if > some other process has become the X11 selction "owner"). When running > this version, the paste into the X11 emacs frame is preceeded by a pause > and CPU spiking to 100%, the same as indicated by other reports. > Once the issue has been triggered, no further "paste" operations will > work in any emacs X11 frame that is part of the same emacs process, at > least not without using gdb to jump over these lines in > x_get_foreign_selection (xselect.c): > 1241 if (NILP (XCAR (reading_selection_reply))) > 1242 error ("Timed out waiting for reply from selection owner"); > Once those are jumped, the "paste" operation completes (the text shows > up on the buffer, as desired), but the state is still hosed. > Pasting into 'emacsclient -t' buffers running in terminal emulator > windows (xterm) does continue to work, though. So if somebody is truly > desperate to keep a given emacs process alive, keeping a terminal-based > emacsclient window handy as a target for paste operations could serve as > a workaround once the issue has been triggered. > Thanks, > -Al > [0] message #149 > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16737#149