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: Re: Need help debugging Emacs: emacsclient will not draw its contents sometimes Date: Tue, 8 Sep 2015 11:58:35 -0700 Message-ID: References: <83fv2o7rtp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1441738728 11806 80.91.229.3 (8 Sep 2015 18:58:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 18:58:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 20:58:47 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 1ZZO6N-0004O1-K1 for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 20:58:43 +0200 Original-Received: from localhost ([::1]:36705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZO6N-0005cs-Dz for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 14:58:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZO6J-0005cU-Kx for emacs-devel@gnu.org; Tue, 08 Sep 2015 14:58:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZO6I-0003tv-9p for emacs-devel@gnu.org; Tue, 08 Sep 2015 14:58:39 -0400 Original-Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:33475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZO6G-0003tO-7r; Tue, 08 Sep 2015 14:58:36 -0400 Original-Received: by qgev79 with SMTP id v79so90901469qge.0; Tue, 08 Sep 2015 11:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5sKnGf9eTlKWucDq+pcdY3kH39EWUn4CN+dmEMfAenI=; b=C3bUjv9T0nTr6FoK9OUz1j4gI198L00h+9ko59y9ABFj/5zv+NUVTFJ6ErmhjGZ0aH cWTwmH/0EziZsZPCVu9XQnZrk3/fC/oUxwdeFO4mnoEurCy2dTYjNO0O85rrMwrrQBxo ewMFM6uBv58OlRo1Nug/UAMdwmCeGZsSEzSMEhrZSpoCcZ/43DRssJytjrISFQtsSBW4 LqVAneXABRft6KzzekzachOK4cIdZmbesX/BP9l965QMMrWFi9y5ChPPGDp2FV6mS1ez 6euw1c/6REkiQ/3l40St/sg5D+8gohhteiRQ9Ke46tKQmi3OceRLja4xTK7rKRp6UOCE 9M2Q== X-Received: by 10.140.231.208 with SMTP id b199mr40587590qhc.87.1441738715759; Tue, 08 Sep 2015 11:58:35 -0700 (PDT) Original-Received: by 10.55.100.135 with HTTP; Tue, 8 Sep 2015 11:58:35 -0700 (PDT) In-Reply-To: <83fv2o7rtp.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::22c 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:189731 Archived-At: On Tue, Sep 8, 2015 at 10:18 AM, Eli Zaretskii wrote: > The backtrace shows that Emacs is idle, waiting for input, which is > normal. Try typing "finish" repeatedly to step out of the functions > shown in the backtrace, until some of them doesn't return. Then tell > here which one didn't. Thanks! I have tried this. The results are below. The client process hung on the first "finish" while the server process took a few more commands but eventually hung in command_loop_1(). Any thoughts on this? Cheers, Jon Client: (gdb) bt #0 0x00000030d8b03a0d in __libc_recv (fd=3, buf=buf@entry=0x7ffd1328bf60, 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=0x7ffd1328bf60, __fd=) at /usr/include/bits/socket2.h:44 #2 main (argc=3, argv=0x7ffd1328e088) at ../../lib-src/emacsclient.c:1742 (gdb) finish Run till exit from #0 0x00000030d8b03a0d in __libc_recv (fd=3, buf=buf@entry=0x7ffd1328bf60, n=n@entry=8192, flags=flags@entry=0) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29 Server: (gdb) bt #0 0x00000030d8af913c in __pselect (nfds=nfds@entry=17, readfds=readfds@entry=0x7ffdd014e210, writefds=writefds@entry=0x7ffdd014e290, exceptfds=exceptfds@entry=0x0, timeout=, timeout@entry=0x7ffdd014e830, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:77 #1 0x00000000005dbeb9 in xg_select (fds_lim=17, rfds=rfds@entry=0x7ffdd014e850, wfds=wfds@entry=0x7ffdd014e8d0, efds=efds@entry=0x0, timeout=timeout@entry=0x7ffdd014e830, 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=0x7ffdd014f09b, kbp=) at ../../src/keyboard.c:3907 #4 0x00000000004f3eb1 in read_decoded_event_from_main_queue (used_mouse_menu=0x7ffdd014f09b, local_getcjmp=0x7ffdd014edf0, 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=0x7ffdd014edf0, prev_event=prev_event@entry=12327986, used_mouse_menu=used_mouse_menu@entry=0x7ffdd014f09b) at ../../src/keyboard.c:2310 #6 0x00000000004f7984 in read_char (commandflag=1, map=map@entry=63963270, prev_event=12327986, used_mouse_menu=used_mouse_menu@entry=0x7ffdd014f09b, end_time=end_time@entry=0x0) at ../../src/keyboard.c:2896 #7 0x00000000004f8a48 in read_key_sequence (keybuf=keybuf@entry=0x7ffdd014f1a0, 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=0x7ffdd014f508) at ../../src/emacs.c:1642 (gdb) finish Run till exit from #0 0x00000030d8af913c in __pselect (nfds=nfds@entry=17, readfds=readfds@entry=0x7ffdd014e210, writefds=writefds@entry=0x7ffdd014e290, exceptfds=exceptfds@entry=0x0, timeout=, timeout@entry=0x7ffdd014e830, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:77 xg_select (fds_lim=17, rfds=rfds@entry=0x7ffdd014e850, wfds=wfds@entry=0x7ffdd014e8d0, efds=efds@entry=0x0, timeout=timeout@entry=0x7ffdd014e830, sigmask=sigmask@entry=0x0) at ../../src/xgselect.c:117 117 if (nfds < 0) Value returned is $1 = 0 (gdb) finish Run till exit from #0 xg_select (fds_lim=17, rfds=rfds@entry=0x7ffdd014e850, wfds=wfds@entry=0x7ffdd014e8d0, efds=efds@entry=0x0, timeout=timeout@entry=0x7ffdd014e830, sigmask=sigmask@entry=0x0) at ../../src/xgselect.c:117 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:4620 4620 if (nfds == 0) Value returned is $2 = 0 (gdb) finish Run till exit from #0 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:4620 0x00000000004f3eb1 in kbd_buffer_get_event (end_time=0x0, used_mouse_menu=0x7ffdd014f09b, kbp=) at ../../src/keyboard.c:3907 3907 wait_reading_process_output (0, 0, -1, do_display, Qnil, NULL, 0); Value returned is $3 = true (gdb) finish Run till exit from #0 0x00000000004f3eb1 in kbd_buffer_get_event (end_time=0x0, used_mouse_menu=0x7ffdd014f09b, kbp=) at ../../src/keyboard.c:3907 2247 c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); (gdb) finish Run till exit from #0 read_event_from_main_queue (used_mouse_menu=0x7ffdd014f09b, local_getcjmp=0x7ffdd014edf0, end_time=0x0) at ../../src/keyboard.c:2247 2320 struct frame *frame = XFRAME (selected_frame); (gdb) finish Run till exit from #0 read_decoded_event_from_main_queue (end_time=end_time@entry=0x0, local_getcjmp=local_getcjmp@entry=0x7ffdd014edf0, prev_event=prev_event@entry=12327986, used_mouse_menu=used_mouse_menu@entry=0x7ffdd014f09b) at ../../src/keyboard.c:2320 read_char (commandflag=1, map=map@entry=63963270, prev_event=12327986, used_mouse_menu=used_mouse_menu@entry=0x7ffdd014f09b, end_time=end_time@entry=0x0) at ../../src/keyboard.c:2898 2898 if (NILP(c) && end_time && Value returned is $4 = 75183542 (gdb) finish Run till exit from #0 read_char (commandflag=1, map=map@entry=63963270, prev_event=12327986, used_mouse_menu=used_mouse_menu@entry=0x7ffdd014f09b, end_time=end_time@entry=0x0) at ../../src/keyboard.c:2898 0x00000000004f8a48 in read_key_sequence (keybuf=keybuf@entry=0x7ffdd014f1a0, 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 9089 key = read_char (prevent_redisplay ? -2 : NILP (prompt), Value returned is $5 = 75183542 (gdb) finish Run till exit from #0 0x00000000004f8a48 in read_key_sequence (keybuf=keybuf@entry=0x7ffdd014f1a0, 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 0x00000000004fa84e in command_loop_1 () at ../../src/keyboard.c:1453 1453 i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0], Value returned is $6 = 1 (gdb) finish Run till exit from #0 0x00000000004fa84e in command_loop_1 () at ../../src/keyboard.c:1453