From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16737: 24.3.50; Yank causes hang Date: Tue, 04 Mar 2014 18:59:38 +0200 Message-ID: <83d2i1sxvp.fsf@gnu.org> References: <21244.16071.147204.408385@gargle.gargle.HOWL> <52FC56B0.6040206@yandex.ru> <87r46i870m.fsf@yahoo.fr> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1393952416 17429 80.91.229.3 (4 Mar 2014 17:00:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 17:00:16 +0000 (UTC) Cc: 16737@debbugs.gnu.org, sujith@msujith.org, dmantipov@yandex.ru To: Nicolas Richard Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 04 18:00:23 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 1WKsha-0005nx-Ip for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 18:00:22 +0100 Original-Received: from localhost ([::1]:46525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKsha-0006IC-32 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 12:00:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKshR-00061V-VB for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 12:00:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKshI-0008F1-BA for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 12:00:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKshI-0008EI-8S for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 12:00:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WKshG-0007rV-UJ for bug-gnu-emacs@gnu.org; Tue, 04 Mar 2014 12:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Mar 2014 17:00: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.139395239630176 (code B ref 16737); Tue, 04 Mar 2014 17:00:02 +0000 Original-Received: (at 16737) by debbugs.gnu.org; 4 Mar 2014 16:59:56 +0000 Original-Received: from localhost ([127.0.0.1]:50535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKsh9-0007qd-FZ for submit@debbugs.gnu.org; Tue, 04 Mar 2014 11:59:55 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:42117) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WKsh5-0007qR-1n for 16737@debbugs.gnu.org; Tue, 04 Mar 2014 11:59:52 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N1X00C008C3ZQ00@mtaout28.012.net.il> for 16737@debbugs.gnu.org; Tue, 04 Mar 2014 19:00:01 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1X006628K1PH70@mtaout28.012.net.il>; Tue, 04 Mar 2014 19:00:01 +0200 (IST) In-reply-to: <87r46i870m.fsf@yahoo.fr> X-012-Sender: halo1@inter.net.il 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:86537 Archived-At: > From: Nicolas Richard > Date: Tue, 04 Mar 2014 13:47:53 +0100 > Cc: 16737@debbugs.gnu.org, Sujith Manoharan > > Dmitry Antipov writes: > > 1) It's better to attach gdb and try to obtain a backtrace, especially when > > Emacs sits in CPU-eating loops. > > > > 2) If CPU-eating loop involves I/O (read/write/sendmsg/recvmsg/select/etc.), > > try to understand how the relevant fds are used, by looking under > > /proc/[Emacs PID]/fd directory. (In your log, the most important is fd 4; > > probably this is an X socket). > > I'm currently in a session which has the same problem. (This is not from > emacs -Q, emacs-uptime reports almost 2 weeks of uptime.) > > Evalling (x-get-selection) or (x-get-selection 'CLIPBOARD) with C-x C-e > work fine but (x-get-selection 'SECONDARY) hangs for about 5 seconds (it > seemed more before I started timing it... not sure if it's purely > psychological). I then get a lisp bt: > > Debugger entered--Lisp error: (error "Timed out waiting for reply from selection owner") > x-get-selection-internal(SECONDARY STRING) > x-get-selection(SECONDARY) > eval((x-get-selection (quote SECONDARY)) nil) > eval-last-sexp-1(nil) > eval-last-sexp(nil) > call-interactively(eval-last-sexp nil nil) > command-execute(eval-last-sexp) > > During these 5 seconds, htop shows that emacs has almost 100% CPU usage. > > Btw I also have bug #16925, which triggers debugger regularly. > > Below is a gdb backtrace. I keep this emacs session open in case you > want me to investigate more. It looks like you attached GDB too late, the backtrace it shows is after the busy loop, when Emacs already signaled an error and entered the Lisp debugger. Since you say that Emacs hangs for several seconds, would it be possible for you to attach GDB right after you type C-x C-e to eval (x-get-selection)? You could prepare the "gdb -p PID" command line in the shell window in advance, so all you'd need to type is RET. Thanks.