From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#16737: Timed out waiting for reply from selection owner Date: Fri, 21 Nov 2014 03:53:49 -0700 Message-ID: <871tow6czm.fsf@tromey.com> References: <48440A51-37B4-44A2-A999-4A0ABC90B721@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416567328 30236 80.91.229.3 (21 Nov 2014 10:55:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 10:55:28 +0000 (UTC) Cc: 16737@debbugs.gnu.org, 17101@debbugs.gnu.org, Alex =?UTF-8?Q?Benn=C3=A9e?= , Nicolas Richard To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 11:55:21 2014 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 1Xrls0-0006Zl-SC for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 11:55:21 +0100 Original-Received: from localhost ([::1]:39982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrls0-0007k7-Hb for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 05:55:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrlrq-0007jg-7Q for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:55:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrlrj-0006e1-2j for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:55:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrlri-0006dF-QX for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xrlrh-0005B9-SQ for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Nov 2014 10:55:01 +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.141656725619853 (code B ref 16737); Fri, 21 Nov 2014 10:55:01 +0000 Original-Received: (at 16737) by debbugs.gnu.org; 21 Nov 2014 10:54:16 +0000 Original-Received: from localhost ([127.0.0.1]:40326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xrlqx-0005A9-Q2 for submit@debbugs.gnu.org; Fri, 21 Nov 2014 05:54:16 -0500 Original-Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]:49980) by debbugs.gnu.org with smtp (Exim 4.80) (envelope-from ) id 1Xrlqw-00059i-IU for 16737@debbugs.gnu.org; Fri, 21 Nov 2014 05:54:15 -0500 Original-Received: (qmail 19292 invoked by uid 0); 21 Nov 2014 10:54:03 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy2.mail.unifiedlayer.com with SMTP; 21 Nov 2014 10:54:03 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id JAtt1p00d2f2jeq01AtwPV; Fri, 21 Nov 2014 03:54:03 -0700 X-Authority-Analysis: v=2.1 cv=dfgTgxne c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=udL4O0NGDEAA:10 a=zstS-IiYAAAA:8 a=PnD2wP_eR3oA:10 a=-Ceb2LbMfV4A:10 a=5y4faFyK3SkA:10 a=HW8pJ4E7vGSlrub8d_QA:9 a=bmZKLLeu_dDhJzvt:21 a=9lDUnHblYvoe4pkV:21 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=U/EdolG/rBLDJcHE0ZgHLBvsrr/4LdfM1EqUWUiStbc=; b=ZrHL+2JfLuIEvhPLPd5l7RsCR7QRk/EqRoKxVqKDjaCAtxsjtuk34Msx30BGtcl3TpH809KwpIHoqojz1Q6QgdjlTHkqeXbqNDRpAeXyfO4j598SWsG6ArwTcPhhdYOc; Original-Received: from [71.33.142.103] (port=42163 helo=pokyo) by box522.bluehost.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1Xrlqb-0005wB-EL; Fri, 21 Nov 2014 03:53:53 -0700 X-Attribution: Tom In-Reply-To: <48440A51-37B4-44A2-A999-4A0ABC90B721@swipnet.se> ("Jan \=\?utf-8\?Q\?Dj\=C3\=A4rv\=22's\?\= message of "Wed, 25 Jun 2014 20:28:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 71.33.142.103 authed with tom+tromey.com} 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:96370 Jan> If it times out, it is because we don't get the PropertyNotify we Jan> expect. There is some TRACE one can turn on in xselect.c by Jan> defining TRACE_SELECTION. FWIW, this bug bites me enough that I have basically had to stop pasting into Emacs. This is no good! However, I still don't know the sequence to recreate the bug. For instance it didn't happen right away with "emacs -Q". All I know is that it happens to me in basically any normal emacs session I try, and that sometimes it works for a while before breaking. I did do a little debugging tonight. One thing I found is that the correct selection notify event does arrive. I set a breakpoint in x_handle_selection_notify and I see a matching event come in. However, the event arrives after x_get_foreign_selection returns. I think this is what is unexpected -- the event ought to be processed by the call to wait_reading_process_output there. When the event does arrive, if I go up the stack I see gobble_input. I don't know this area well but maybe it would work to either disable the SIGIO code, or to call gobble_input before calling wait_reading_process_output. If I debug "emacs -Q" and paste, what I see is that x_get_foreign_selection calls unblock_input and that this causes the event to be read. I don't know why this isn't done in the failing case. Any suggestions? I can't promise much but maybe I could try something out. Tom