From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jon Dufresne Newsgroups: gmane.emacs.devel Subject: Need help debugging Emacs: emacsclient will not draw its contents sometimes Date: Tue, 8 Sep 2015 06:00:25 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1441717291 31133 80.91.229.3 (8 Sep 2015 13:01:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 13:01:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 15:01:27 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZZIWV-0007On-SF for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 15:01:20 +0200 Original-Received: from localhost ([::1]:33892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZIWQ-0001Zn-7L for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 09:01:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZIVl-0001Yf-Ip for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:00:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZIVg-0000gK-UC for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:00:33 -0400 Original-Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:36782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZIVg-0000fm-FM for emacs-devel@gnu.org; Tue, 08 Sep 2015 09:00:28 -0400 Original-Received: by qgx61 with SMTP id 61so81077362qgx.3 for ; Tue, 08 Sep 2015 06:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=BRVvK2CRJdCl8EcrXv+7VG64sJTlo27nRMnBIbdcSp8=; b=FTgImmnuHBnpJUBUpjdcuvri4QQHa26vv2Woij3+cY4xKej7PW0Ha0qx+g433G5P1s 0+EdZo2GBNsBy1nbn/P3nUN/YDVoQ0YKVQL0zQ4B//QiA9UBWB1llfWyHx53ZXf8NnXG LItgGRr0AulXM88Ey83PM0KhV/LvoTftMIuzO40P6CjCjFXw8fzlGHQvUWFSQH4v0xMf 5pN9H4rSEtaniQg0SihznGQJ3ortdoPGa+76btqPC1GByMNDhSOt6thAJhnjrrD1aEdk FS1wvzZdlvPUQOoIHks9Q5OowTE7isAfycpRlDNt5V6BzeVGUyhqt0UmVWxBqLokFJgi Xwuw== X-Received: by 10.140.231.208 with SMTP id b199mr37457930qhc.87.1441717225683; Tue, 08 Sep 2015 06:00:25 -0700 (PDT) Original-Received: by 10.55.100.135 with HTTP; Tue, 8 Sep 2015 06:00:25 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189703 Archived-At: Hi, I run into a bug daily but I can't pin down the exact source of the problem. I can't reproduce the bug on demand, but if I use Emacs long enough, eventually the bug will be triggered. The scenario: I run Emacs using the Emacs daemon. I regularly connect to the daemon with emacsclient. Frequently, the client is started from an external program, such as during a mercurial commit. _Sometimes the emacsclient frame will not draw its contents_, leaving Emacs in a useless state. This only occurs after the Emacs daemon has been running for hours and has already successfully started many emacsclients. When this occurs, my window manager shows that the program is running and has drawn an outline of where Emacs should be, but there are no contents. After the first occurrence, all new emacsclients will suffer the same fate and will not draw their contents. To Emacs return to a useful state, I restart the Emacs daemon. This means I lose the open buffers of my currently running Emacs. Unfortunately, as I can't reliably reproduce this on demand, it is difficult and time consuming to tests different versions of init.el. Emacs version: GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.16.2) of 2015-04-22 on buildhw-10.phx2.fedoraproject.org I have attached a debugger to the running Emacs after this has occurred. I see the following backtrace below. Any help towards debugging this issue would be greatly appreciated. Please let me know if there is a useful command I can run run to help diagnose the issue. (gdb) bt #0 0x00007f184dcd313c in __pselect (nfds=nfds@entry=15, readfds=readfds@entry=0x7fff0ba22460, writefds=writefds@entry=0x7fff0ba224e0, exceptfds=exceptfds@entry=0x0, timeout=, timeout@entry=0x7fff0ba22a80, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:77 #1 0x00000000005dbeb9 in xg_select (fds_lim=15, rfds=rfds@entry=0x7fff0ba22aa0, wfds=wfds@entry=0x7fff0ba22b20, efds=efds@entry=0x0, timeout=timeout@entry=0x7fff0ba22a80, sigmask=sigmask@entry=0x0) at ../../src/xgselect.c:114 #2 0x00000000005a2669 in wait_reading_process_output (time_limit=time_limit@entry=0, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=true, wait_for_cell=12327986, wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at ../../src/process.c:4606 #3 0x00000000004f3eb1 in read_decoded_event_from_main_queue (end_time=0x0, used_mouse_menu=0x7fff0ba232eb, kbp=) at ../../src/keyboard.c:3907 #4 0x00000000004f3eb1 in read_decoded_event_from_main_queue (used_mouse_menu=0x7fff0ba232eb, local_getcjmp=0x7fff0ba23040, end_time=0x0) at ../../src/keyboard.c:2247 #5 0x00000000004f3eb1 in read_decoded_event_from_main_queue (end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x7fff0ba23040, prev_event=prev_event@entry=12327986, used_mouse_menu=used_mouse_menu@entry=0x7fff0ba232eb) at ../../src/keyboard.c:2310 #6 0x00000000004f7984 in read_char (commandflag=1, map=map@entry=80441558, prev_event=12327986, used_mouse_menu=used_mouse_menu@entry=0x7fff0ba232eb, end_time=end_time@entry=0x0) at ../../src/keyboard.c:2896 #7 0x00000000004f8a48 in read_key_sequence (keybuf=keybuf@entry=0x7fff0ba233f0, prompt=12327986, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at ../../src/keyboard.c:9089 #8 0x00000000004fa84e in command_loop_1 () at ../../src/keyboard.c:1453 #9 0x000000000055fd47 in internal_condition_case (bfun=bfun@entry=0x4fa630 , handlers=, hfun=hfun@entry=0x4f1180 ) at ../../src/eval.c:1348 #10 0x00000000004ec602 in command_loop_2 (ignore=ignore@entry=12327986) at ../../src/keyboard.c:1178 #11 0x000000000055fc2b in internal_catch (tag=12375458, func=func@entry=0x4ec5e0 , arg=12327986) at ../../src/eval.c:1112 #12 0x00000000004f0d43 in recursive_edit_1 () at ../../src/keyboard.c:1157 #13 0x00000000004f0d43 in recursive_edit_1 () at ../../src/keyboard.c:778 #14 0x00000000004f1098 in Frecursive_edit () at ../../src/keyboard.c:849 #15 0x0000000000418537 in main (argc=, argv=0x7fff0ba23758) at ../../src/emacs.c:1642 (gdb) bt #0 0x00007f67c0942a0d in __libc_recv (fd=3, buf=buf@entry=0x7fffb54676b0, n=n@entry=8192, flags=flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29 #1 0x0000000000401ce0 in recv (__flags=0, __n=8192, __buf=0x7fffb54676b0, __fd=) at /usr/include/bits/socket2.h:44 #2 main (argc=3, argv=0x7fffb54697d8) at ../../lib-src/emacsclient.c:1742