unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Need help debugging Emacs: emacsclient will not draw its contents sometimes
@ 2015-09-08 13:00 Jon Dufresne
  2015-09-08 13:28 ` Tassilo Horn
  2015-09-08 17:18 ` Eli Zaretskii
  0 siblings, 2 replies; 26+ messages in thread
From: Jon Dufresne @ 2015-09-08 13:00 UTC (permalink / raw)
  To: emacs-devel

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=<optimized out>,
    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=<synthetic
pointer>) 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 <command_loop_1>, handlers=<optimized out>,
hfun=hfun@entry=0x4f1180 <cmd_error>) 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 <command_loop_2>, 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=<optimized out>,
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=<optimized out>) at
/usr/include/bits/socket2.h:44
#2  main (argc=3, argv=0x7fffb54697d8) at ../../lib-src/emacsclient.c:1742



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-02-20 11:24 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08 13:00 Need help debugging Emacs: emacsclient will not draw its contents sometimes Jon Dufresne
2015-09-08 13:28 ` Tassilo Horn
2015-09-08 17:18 ` Eli Zaretskii
2015-09-08 18:58   ` Jon Dufresne
2015-09-08 19:16     ` Eli Zaretskii
2015-09-09 22:29       ` Jon Dufresne
2015-09-10 15:26         ` Eli Zaretskii
2015-09-10 18:20           ` Jon Dufresne
2015-09-10 18:46             ` Eli Zaretskii
2015-09-10 18:52               ` Jon Dufresne
2015-09-11  7:26                 ` Eli Zaretskii
2015-09-11 16:47                   ` Jon Dufresne
2015-09-14 10:09                     ` Eli Zaretskii
2015-09-23  0:51                       ` Jon Dufresne
2015-09-23  6:45                         ` Eli Zaretskii
2015-09-27 22:21                           ` Mike Kupfer
2015-09-28  6:39                             ` Eli Zaretskii
2016-02-16  1:07                             ` Mike Kupfer
2016-02-16 16:26                               ` Eli Zaretskii
2016-02-16 16:38                                 ` Kaushal Modi
2016-02-16 16:44                                   ` Eli Zaretskii
2016-02-16 17:06                                     ` Kaushal Modi
2016-02-17  2:05                                 ` Mike Kupfer
2016-02-17 20:02                                   ` Eli Zaretskii
2016-02-18  5:01                                     ` Mike Kupfer
2016-02-20 11:24                                       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).