GNU bug report logs - #23499
24.5; emacs --daemon hangs randomly when emacsclient -c used repeatedly

Previous Next

Package: emacs;

Reported by: "Robert Lange" <rcl24 <at> drexel.edu>

Date: Mon, 9 May 2016 21:33:02 UTC

Severity: normal

Tags: help

Found in version 24.5

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23499 in the body.
You can then email your comments to 23499 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Mon, 09 May 2016 21:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Robert Lange" <rcl24 <at> drexel.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 09 May 2016 21:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Robert Lange" <rcl24 <at> drexel.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; emacs --daemon hangs randomly when emacsclient -c used
 repeatedly
Date: Mon, 09 May 2016 16:32:31 -0400
[Message part 1 (text/plain, inline)]
As stated in the title, I have been trying to use Emacs in daemon mode, however after a number of invocations of `emacsclient -c` the emacs daemon process hangs (not crashes) and I have to manually kill it.

I use Emacs (Lucid toolkit) on Debian Jessie at home and Ubuntu 14.04 at work. I experience the problem on both distributions using the distribution packages. I have compiled and debugged against the latest unmodified tarball of Emacs from GNU just to ensure that there were no distribution-specific patches causing the problem.

My problem is very similar to emacs bug #5802, except that bug was "fixed" by switching to use Emacs compiled with the Lucid toolkit, whereas my bug is still present even in Lucid.

To replicate:

Compile the latest GNU 24.5.1 source tarball using:

CFLAGS='-O0 -g3' ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type --with-x-toolkit=lucid
make
cd src/
gdb ./emacs
 (gdb) run -Q -nw -f server-start

In a separate terminal:

x=0; while emacsclient -c; do x=$(( $x + 1 )); done; echo "Created $x windows before crash."

Close each Emacs client window after it appears. Eventually (it seems to average about 5 tries) Emacs will hang with a partially-drawn window. No interaction with the UI is possible. At that point in another terminal I execute:

ps -ef | grep emacs
kill -TSTP <emacs pid>

Returning to the original terminal containing GDB, I now execute:

bt

And get this output:

-----

#0 require_socket (dpy=0xf98ba0) at ../../src/xcb_io.c:60
#1 0x00007ffff5fb8b0e in poll_for_event (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:251
#2 0x00007ffff5fb8cfc in poll_for_response (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:289
#3 0x00007ffff5fb9147 in _XReadEvents (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:424
#4 0x00007ffff5fa1751 in XIfEvent (dpy=0xf98ba0, event=event <at> entry=0x7fffffff83f0, predicate=predicate <at> entry=0x7ffff5fe7790 <_CheckCMEvent>, arg=arg <at> entry=0xf50340 "\200\365*\366\377\177")
 at ../../src/IfEvent.c:68
#5 0x00007ffff5fe7f24 in _XimXRead (im=0xf50340, recv_buf=0x7fffffff8dd0 "", buf_len=2048, ret_len=0x7fffffff851c) at ../../../../modules/im/ximcp/imTrX.c:476
#6 0x00007ffff5fe8b80 in _XimReadData (im=im <at> entry=0xf50340, len=len <at> entry=0x7fffffff857e, buf=buf <at> entry=0x7fffffff8dd0 "", buf_size=buf_size <at> entry=2048) at ../../../../modules/im/ximcp/imTransR.c:165
#7 0x00007ffff5fe8e71 in _XimRead (im=im <at> entry=0xf50340, len=len <at> entry=0x7fffffff85ce, buf=buf <at> entry=0x7fffffff8dd0 "", buf_size=buf_size <at> entry=2048, 
 predicate=predicate <at> entry=0x7ffff5fd6c80 <_XimDestroyICCheck>, arg=arg <at> entry=0x161a370 " \365*\366\377\177") at ../../../../modules/im/ximcp/imTransR.c:235
#8 0x00007ffff5fd70e8 in _XimProtoDestroyIC (xic=0x161a370) at ../../../../modules/im/ximcp/imDefIc.c:914
#9 0x00007ffff5fc58d2 in XDestroyIC (ic=0x161a370) at ../../../src/xlibi18n/ICWrap.c:265
#10 0x000000000054c6d6 in free_frame_xic (f=0x139e798) at xfns.c:2087
#11 0x00000000005455c5 in x_free_frame_resources (f=0x139e798) at xterm.c:9275
#12 0x0000000000545c11 in x_destroy_window (f=0x139e798) at xterm.c:9383
#13 0x000000000042826b in delete_frame (frame=..., force=...) at frame.c:1387
#14 0x0000000000541ff3 in x_connection_closed (dpy=0xf98ba0, error_message=0x7fffffff9940 "X protocol error: BadPixmap (invalid Pixmap parameter) on protocol request 55") at xterm.c:7635
#15 0x00000000005422b7 in x_error_quitter (display=0xf98ba0, event=0x7fffffff9af0) at xterm.c:7747
#16 0x0000000000542209 in x_error_handler (display=0xf98ba0, event=0x7fffffff9af0) at xterm.c:7717
#17 0x00007ffff5fbb54b in _XError (dpy=dpy <at> entry=0xf98ba0, rep=rep <at> entry=0xf76d70) at ../../src/XlibInt.c:1463
#18 0x00007ffff5fb85e7 in handle_error (dpy=0xf98ba0, err=0xf76d70, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
#19 0x00007ffff5fb8695 in handle_response (dpy=dpy <at> entry=0xf98ba0, response=0xf76d70, in_XReply=in_XReply <at> entry=1) at ../../src/xcb_io.c:325
#20 0x00007ffff5fb9578 in _XReply (dpy=dpy <at> entry=0xf98ba0, rep=rep <at> entry=0x7fffffff9cb0, extra=extra <at> entry=0, discard=discard <at> entry=0) at ../../src/xcb_io.c:627
#21 0x00007ffff5faf4cf in XQueryColor (dpy=0xf98ba0, cmap=32, def=0x7fffffff9d10) at ../../src/QuColor.c:49
#22 0x00007ffff6b8c50c in Xaw3dComputeTopShadowRGB () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#23 0x00007ffff6b8c600 in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#24 0x00007ffff6b8ca6a in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#25 0x00007ffff66f1afc in CallInitialize (class=0x7ffff6dae960 <threeDClassRec>, req_widget=req_widget <at> entry=0x7fffffff9f20, new_widget=new_widget <at> entry=0x1604c60, args=args <at> entry=0x7fffffffa3f0, 
 num_args=3) at ../../src/Create.c:226
#26 0x00007ffff66f1ac6 in CallInitialize (class=0x7ffff6dac1c0 <scrollbarClassRec>, req_widget=req_widget <at> entry=0x7fffffff9f20, new_widget=new_widget <at> entry=0x1604c60, args=args <at> entry=0x7fffffffa3f0, 
 num_args=num_args <at> entry=3) at ../../src/Create.c:221
#27 0x00007ffff66f2427 in xtCreate (name=name <at> entry=0x703028 "verticalScrollBar", class=class <at> entry=0x0, widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0x10506b0, 
 default_screen=0xfad8e0, args=args <at> entry=0x7fffffffa3f0, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0, parent_constraint_class=0x0, 
 post_proc=post_proc <at> entry=0x7ffff66f1b40 <widgetPostProc>) at ../../src/Create.c:416
#28 0x00007ffff66f2840 in _XtCreateWidget (name=name <at> entry=0x703028 "verticalScrollBar", widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0x10506b0, 
 args=args <at> entry=0x7fffffffa3f0, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0) at ../../src/Create.c:570
#29 0x00007ffff66f2b0e in XtCreateWidget (name=0x703028 "verticalScrollBar", widget_class=0x7ffff6dac1c0 <scrollbarClassRec>, parent=0x10506b0, args=0x7fffffffa3f0, num_args=3) at ../../src/Create.c:589
#30 0x000000000053c417 in x_create_toolkit_scroll_bar (f=0x139e798, bar=0xfa2560) at xterm.c:4768
#31 0x000000000053c937 in x_scroll_bar_create (w=0x139f810, top=686, left=1, width=16, height=19) at xterm.c:4960
#32 0x000000000053d167 in XTset_vertical_scroll_bar (w=0x139f810, portion=0, whole=0, position=0) at xterm.c:5205
#33 0x000000000046b064 in set_vertical_scroll_bar (w=0x139f810) at xdisp.c:15905
#34 0x000000000046fcfa in redisplay_window (window=..., just_this_one_p=false) at xdisp.c:16947
#35 0x00000000004644f2 in redisplay_window_0 (window=...) at xdisp.c:14373
#36 0x00000000006173df in internal_condition_case_1 (bfun=0x4644b0 <redisplay_window_0>, arg=..., handlers=..., hfun=0x46447f <redisplay_window_error>) at eval.c:1372
#37 0x000000000046445d in redisplay_windows (window=...) at xdisp.c:14353
#38 0x0000000000463204 in redisplay_internal () at xdisp.c:13949
#39 0x0000000000463db4 in redisplay_preserve_echo_area (from_where=12) at xdisp.c:14206
#40 0x0000000000674157 in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=..., wait_proc=0x0, just_wait_proc=0) at process.c:4821
#41 0x0000000000422d0c in sit_for (timeout=..., reading=true, display_option=1) at dispnew.c:5867
#42 0x0000000000576bff in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x7fffffffd7f5, end_time=0x0) at keyboard.c:2810
#43 0x00000000005858f4 in read_key_sequence (keybuf=0x7fffffffda20, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false)
 at keyboard.c:9089
#44 0x0000000000573161 in command_loop_1 () at keyboard.c:1453
#45 0x000000000061726e in internal_condition_case (bfun=0x572d8a <command_loop_1>, handlers=..., hfun=0x57253d <cmd_error>) at eval.c:1348
#46 0x0000000000572a28 in command_loop_2 (ignore=...) at keyboard.c:1178
#47 0x00000000006166f1 in internal_catch (tag=..., func=0x572a05 <command_loop_2>, arg=...) at eval.c:1112
#48 0x00000000005729dc in command_loop () at keyboard.c:1157
#49 0x0000000000572069 in recursive_edit_1 () at keyboard.c:778
#50 0x0000000000572239 in Frecursive_edit () at keyboard.c:849
#51 0x000000000057017b in main (argc=5, argv=0x7fffffffdde8) at emacs.c:1642

Lisp Backtrace:
"redisplay_internal (C function)" (0xd553f0)

-----

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2016-05-09 on vistar-rlange
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description: Ubuntu 14.04.4 LTS

Configured using:
 `configure --enable-checking=yes,glyphs --enable-check-lisp-object-type
 --with-x-toolkit=lucid 'CFLAGS=-O0 -g3''

Important settings:
 value of $LC_COLLATE: C
 value of $LC_TIME: en_DK.UTF-8
 value of $LANG: en_US.UTF-8
 value of $XMODIFIERS: @im=ibus
 locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
 tooltip-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 tool-bar-mode: t
 menu-bar-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 line-number-mode: t
 transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)

Memory information:
((conses 16 73075 4517)
 (symbols 48 17654 0)
 (miscs 40 41 114)
 (strings 32 9912 3852)
 (string-bytes 1 266512)
 (vectors 16 9616)
 (vector-slots 8 388153 15866)
 (floats 8 68 135)
 (intervals 56 205 4)
 (buffers 960 12)
 (heap 1024 18602 895))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Mon, 09 May 2016 22:37:01 GMT) Full text and rfc822 format available.

Message #8 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: "Robert Lange" <rcl24 <at> drexel.edu>
To: 23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5; emacs --daemon hangs randomly when
 emacsclient -c used repeatedly
Date: Mon, 09 May 2016 18:23:56 -0400
[Message part 1 (text/plain, inline)]
After further experimentation, this bug occurs only if the emacs process that launched the daemon is non-graphical (e.g., `emacs --daemon` or `emacs -nw -f server-start`) and the emacsclient is graphical (e.g., `emacsclient -c`).

If the emacs server process is graphical (e.g., `emacs -f server-start`) this bug does not manifest.

If the emacsclient is non-graphical (e.g., `emacsclient -t`) this bug does not manifest.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Mon, 09 May 2016 23:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: "Robert Lange" <rcl24 <at> drexel.edu>
To: "Robert Lange" <rcl24 <at> drexel.edu>,23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5; emacs --daemon hangs randomly when
 emacsclient -c used repeatedly
Date: Mon, 09 May 2016 19:01:56 -0400
[Message part 1 (text/plain, inline)]
New experiment (still using vanilla GNU Emacs 24.5.1 with Lucid in GDB) appears to show that the problem is the scroll bar.

Long story short, if I set `scroll-bar-mode` to `nil` in my emacs config, I can happily create and destroy emacsclient all day long without upsetting the daemon.

See below for the details:

gdb ./emacs
 (gdb) run -Q -nw -f server-start

In another terminal:

emacsclient -c -n

`-n` makes the terminal return as soon as emacsclient is launched, so we have to manually close and relaunch. After 5-10 tries it will hang, but now the stacktrace we get is slightly different:

-----

#0 0x00007ffff5fb8b68 in widen (narrow=1988, wide=<synthetic pointer>) at ../../src/xcb_io.c:224
#1 poll_for_event (dpy=dpy <at> entry=0x105f2f0) at ../../src/xcb_io.c:264
#2 0x00007ffff5fb8cfc in poll_for_response (dpy=dpy <at> entry=0x105f2f0) at ../../src/xcb_io.c:289
#3 0x00007ffff5fb9147 in _XReadEvents (dpy=dpy <at> entry=0x105f2f0) at ../../src/xcb_io.c:424
#4 0x00007ffff5fa1751 in XIfEvent (dpy=0x105f2f0, event=event <at> entry=0x7fffffff1a80, predicate=predicate <at> entry=0x7ffff5fe7790 <_CheckCMEvent>, arg=arg <at> entry=0xd85d30 "\200\365*\366\377\177")
 at ../../src/IfEvent.c:68
#5 0x00007ffff5fe7f24 in _XimXRead (im=0xd85d30, recv_buf=0x7fffffff2460 "", buf_len=2048, ret_len=0x7fffffff1bac) at ../../../../modules/im/ximcp/imTrX.c:476
#6 0x00007ffff5fe8b80 in _XimReadData (im=im <at> entry=0xd85d30, len=len <at> entry=0x7fffffff1c0e, buf=buf <at> entry=0x7fffffff2460 "", buf_size=buf_size <at> entry=2048) at ../../../../modules/im/ximcp/imTransR.c:165
#7 0x00007ffff5fe8e71 in _XimRead (im=im <at> entry=0xd85d30, len=len <at> entry=0x7fffffff1c5e, buf=buf <at> entry=0x7fffffff2460 "", buf_size=buf_size <at> entry=2048, 
 predicate=predicate <at> entry=0x7ffff5fd6c80 <_XimDestroyICCheck>, arg=arg <at> entry=0xf6a360 " \365*\366\377\177") at ../../../../modules/im/ximcp/imTransR.c:235
#8 0x00007ffff5fd70e8 in _XimProtoDestroyIC (xic=0xf6a360) at ../../../../modules/im/ximcp/imDefIc.c:914
#9 0x00007ffff5fc58d2 in XDestroyIC (ic=0xf6a360) at ../../../src/xlibi18n/ICWrap.c:265
#10 0x000000000054c6d6 in free_frame_xic (f=0x134b118) at xfns.c:2087
#11 0x00000000005455c5 in x_free_frame_resources (f=0x134b118) at xterm.c:9275
#12 0x0000000000545c11 in x_destroy_window (f=0x134b118) at xterm.c:9383
#13 0x000000000042826b in delete_frame (frame=..., force=...) at frame.c:1387
#14 0x0000000000541ff3 in x_connection_closed (dpy=0x105f2f0, error_message=0x7fffffff2fd0 "X protocol error: BadPixmap (invalid Pixmap parameter) on protocol request 55") at xterm.c:7635
#15 0x00000000005422b7 in x_error_quitter (display=0x105f2f0, event=0x7fffffff3180) at xterm.c:7747
#16 0x0000000000542209 in x_error_handler (display=0x105f2f0, event=0x7fffffff3180) at xterm.c:7717
#17 0x00007ffff5fbb54b in _XError (dpy=dpy <at> entry=0x105f2f0, rep=rep <at> entry=0xf83650) at ../../src/XlibInt.c:1463
#18 0x00007ffff5fb85e7 in handle_error (dpy=0x105f2f0, err=0xf83650, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
#19 0x00007ffff5fb8695 in handle_response (dpy=dpy <at> entry=0x105f2f0, response=0xf83650, in_XReply=in_XReply <at> entry=1) at ../../src/xcb_io.c:325
#20 0x00007ffff5fb9578 in _XReply (dpy=dpy <at> entry=0x105f2f0, rep=rep <at> entry=0x7fffffff3340, extra=extra <at> entry=0, discard=discard <at> entry=0) at ../../src/xcb_io.c:627
#21 0x00007ffff5faf4cf in XQueryColor (dpy=0x105f2f0, cmap=32, def=0x7fffffff33a0) at ../../src/QuColor.c:49
#22 0x00007ffff6b8c50c in Xaw3dComputeTopShadowRGB () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#23 0x00007ffff6b8c600 in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#24 0x00007ffff6b8ca6a in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#25 0x00007ffff66f1afc in CallInitialize (class=0x7ffff6dae960 <threeDClassRec>, req_widget=req_widget <at> entry=0x7fffffff35b0, new_widget=new_widget <at> entry=0x1614b40, args=args <at> entry=0x7fffffff3a80, 
 num_args=3) at ../../src/Create.c:226
#26 0x00007ffff66f1ac6 in CallInitialize (class=0x7ffff6dac1c0 <scrollbarClassRec>, req_widget=req_widget <at> entry=0x7fffffff35b0, new_widget=new_widget <at> entry=0x1614b40, args=args <at> entry=0x7fffffff3a80, 
 num_args=num_args <at> entry=3) at ../../src/Create.c:221
#27 0x00007ffff66f2427 in xtCreate (name=name <at> entry=0x703028 "verticalScrollBar", class=class <at> entry=0x0, widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0x16166f0, 
 default_screen=0x15105b0, args=args <at> entry=0x7fffffff3a80, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0, parent_constraint_class=0x0, 
 post_proc=post_proc <at> entry=0x7ffff66f1b40 <widgetPostProc>) at ../../src/Create.c:416
#28 0x00007ffff66f2840 in _XtCreateWidget (name=name <at> entry=0x703028 "verticalScrollBar", widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0x16166f0, 
 args=args <at> entry=0x7fffffff3a80, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0) at ../../src/Create.c:570
#29 0x00007ffff66f2b0e in XtCreateWidget (name=0x703028 "verticalScrollBar", widget_class=0x7ffff6dac1c0 <scrollbarClassRec>, parent=0x16166f0, args=0x7fffffff3a80, num_args=3) at ../../src/Create.c:589
#30 0x000000000053c417 in x_create_toolkit_scroll_bar (f=0x134b118, bar=0x1338328) at xterm.c:4768
#31 0x000000000053c937 in x_scroll_bar_create (w=0x134c2e0, top=686, left=1, width=16, height=19) at xterm.c:4960
#32 0x000000000053d167 in XTset_vertical_scroll_bar (w=0x134c2e0, portion=0, whole=0, position=0) at xterm.c:5205
#33 0x000000000046b064 in set_vertical_scroll_bar (w=0x134c2e0) at xdisp.c:15905
#34 0x000000000046fcfa in redisplay_window (window=..., just_this_one_p=false) at xdisp.c:16947
#35 0x00000000004644f2 in redisplay_window_0 (window=...) at xdisp.c:14373
#36 0x00000000006173df in internal_condition_case_1 (bfun=0x4644b0 <redisplay_window_0>, arg=..., handlers=..., hfun=0x46447f <redisplay_window_error>) at eval.c:1372
#37 0x000000000046445d in redisplay_windows (window=...) at xdisp.c:14353
#38 0x0000000000463204 in redisplay_internal () at xdisp.c:13949
#39 0x0000000000463db4 in redisplay_preserve_echo_area (from_where=13) at xdisp.c:14206
#40 0x000000000066b46d in Fdelete_process (process=...) at process.c:877
#41 0x000000000061ac4a in Ffuncall (nargs=2, args=0x7fffffff6880) at eval.c:2811
#42 0x0000000000666389 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=1, args=0x7fffffff7010) at bytecode.c:916
#43 0x000000000061b47a in funcall_lambda (fun=..., nargs=1, arg_vector=0x7fffffff7008) at eval.c:2978
#44 0x000000000061ae25 in Ffuncall (nargs=2, args=0x7fffffff7000) at eval.c:2860
#45 0x0000000000666389 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffff7748) at bytecode.c:916
#46 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffff7748) at eval.c:2978
#47 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffff7740) at eval.c:2860
#48 0x0000000000619438 in eval_sub (form=...) at eval.c:2154
#49 0x000000000061710f in internal_lisp_condition_case (var=..., bodyform=..., handlers=...) at eval.c:1317
#50 0x0000000000667498 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffff8128) at bytecode.c:1162
#51 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffff8128) at eval.c:2978
#52 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffff8120) at eval.c:2860
#53 0x0000000000619438 in eval_sub (form=...) at eval.c:2154
#54 0x000000000061710f in internal_lisp_condition_case (var=..., bodyform=..., handlers=...) at eval.c:1317
#55 0x0000000000667498 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=7, args=0x7fffffff8b68) at bytecode.c:1162
#56 0x000000000061b47a in funcall_lambda (fun=..., nargs=7, arg_vector=0x7fffffff8b30) at eval.c:2978
#57 0x000000000061ae25 in Ffuncall (nargs=8, args=0x7fffffff8b28) at eval.c:2860
#58 0x0000000000666389 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffff9290) at bytecode.c:916
#59 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffff9290) at eval.c:2978
#60 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffff9288) at eval.c:2860
#61 0x0000000000666389 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffff99b8) at bytecode.c:916
#62 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffff99b8) at eval.c:2978
#63 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffff99b0) at eval.c:2860
#64 0x0000000000619438 in eval_sub (form=...) at eval.c:2154
#65 0x000000000061710f in internal_lisp_condition_case (var=..., bodyform=..., handlers=...) at eval.c:1317
#66 0x0000000000667498 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=1, args=0x7fffffffa3f8) at bytecode.c:1162
#67 0x000000000061b47a in funcall_lambda (fun=..., nargs=1, arg_vector=0x7fffffffa3f0) at eval.c:2978
#68 0x000000000061ae25 in Ffuncall (nargs=2, args=0x7fffffffa3e8) at eval.c:2860
#69 0x0000000000666389 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffffab98) at bytecode.c:916
#70 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffffab98) at eval.c:2978
#71 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffffab90) at eval.c:2860
#72 0x0000000000619438 in eval_sub (form=...) at eval.c:2154
#73 0x000000000061710f in internal_lisp_condition_case (var=..., bodyform=..., handlers=...) at eval.c:1317
#74 0x0000000000667498 in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=0, args=0x7fffffffb558) at bytecode.c:1162
#75 0x000000000061b47a in funcall_lambda (fun=..., nargs=0, arg_vector=0x7fffffffb558) at eval.c:2978
#76 0x000000000061ae25 in Ffuncall (nargs=1, args=0x7fffffffb550) at eval.c:2860
#77 0x0000000000619438 in eval_sub (form=...) at eval.c:2154
#78 0x00000000006166f1 in internal_catch (tag=..., func=0x618e0c <eval_sub>, arg=...) at eval.c:1112
#79 0x00000000006670dc in exec_byte_code (bytestr=..., vector=..., maxdepth=..., args_template=..., nargs=2, args=0x7fffffffbe88) at bytecode.c:1097
#80 0x000000000061b47a in funcall_lambda (fun=..., nargs=2, arg_vector=0x7fffffffbe78) at eval.c:2978
#81 0x000000000061ae25 in Ffuncall (nargs=3, args=0x7fffffffbe70) at eval.c:2860
#82 0x0000000000619ed8 in Fapply (nargs=2, args=0x7fffffffbf60) at eval.c:2350
#83 0x000000000061a508 in apply1 (fn=..., arg=...) at eval.c:2584
#84 0x0000000000674852 in read_process_output_call (fun_and_args=...) at process.c:4967
#85 0x00000000006173df in internal_condition_case_1 (bfun=0x6747c8 <read_process_output_call>, arg=..., handlers=..., hfun=0x674854 <read_process_output_error_handler>) at eval.c:1372
#86 0x0000000000674efd in read_and_dispose_of_process_output (p=0x1348370, 
 chars=0x7fffffffc080 "-env XDG_VTNR=7 -env XDG_SESSION_ID=c2 -env XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/rlange -env SELINUX_INIT=YES -env CLUTTER_IM_MODULE=xim -env SESSION=ubuntu -env GPG_AGENT_INFO=/run/user/1000/ke"..., nbytes=3947, coding=0xf5a810) at process.c:5180
#87 0x0000000000674bd9 in read_process_output (proc=..., channel=3947) at process.c:5089
#88 0x0000000000674106 in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=..., wait_proc=0x0, just_wait_proc=0) at process.c:4811
#89 0x0000000000422d0c in sit_for (timeout=..., reading=true, display_option=1) at dispnew.c:5867
#90 0x0000000000576bff in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x7fffffffd7f5, end_time=0x0) at keyboard.c:2810
#91 0x00000000005858f4 in read_key_sequence (keybuf=0x7fffffffda20, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false)
 at keyboard.c:9089
#92 0x0000000000573161 in command_loop_1 () at keyboard.c:1453
#93 0x000000000061726e in internal_condition_case (bfun=0x572d8a <command_loop_1>, handlers=..., hfun=0x57253d <cmd_error>) at eval.c:1348
#94 0x0000000000572a28 in command_loop_2 (ignore=...) at keyboard.c:1178
#95 0x00000000006166f1 in internal_catch (tag=..., func=0x572a05 <command_loop_2>, arg=...) at eval.c:1112
#96 0x00000000005729dc in command_loop () at keyboard.c:1157
#97 0x0000000000572069 in recursive_edit_1 () at keyboard.c:778
#98 0x0000000000572239 in Frecursive_edit () at keyboard.c:849
#99 0x000000000057017b in main (argc=5, argv=0x7fffffffdde8) at emacs.c:1642

Lisp Backtrace:
"redisplay_internal (C function)" (0xd553f0)
"delete-process" (0xffff6888)
"server-delete-client" (0xffff7008)
0x13524d8 PVEC_COMPILED
"funcall" (0xffff7740)
0x13544f8 PVEC_COMPILED
"funcall" (0xffff8120)
"server-execute" (0xffff8b30)
0x1341258 PVEC_COMPILED
0x134b470 PVEC_COMPILED
"funcall" (0xffff99b0)
"server-execute-continuation" (0xffffa3f0)
0x134a3f0 PVEC_COMPILED
"funcall" (0xffffab90)
0x13492e0 PVEC_COMPILED
"funcall" (0xffffb550)
"server-process-filter" (0xffffbe78)

-----
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Tue, 10 May 2016 02:40:01 GMT) Full text and rfc822 format available.

Message #14 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Robert Lange" <rcl24 <at> drexel.edu>
Cc: 23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5;
 emacs --daemon hangs randomly when emacsclient -c used repeatedly
Date: Tue, 10 May 2016 05:39:10 +0300
> From: "Robert Lange" <rcl24 <at> drexel.edu>
> Date: Mon, 09 May 2016 16:32:31 -0400
> 
> #0 require_socket (dpy=0xf98ba0) at ../../src/xcb_io.c:60
> #1 0x00007ffff5fb8b0e in poll_for_event (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:251
> #2 0x00007ffff5fb8cfc in poll_for_response (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:289
> #3 0x00007ffff5fb9147 in _XReadEvents (dpy=dpy <at> entry=0xf98ba0) at ../../src/xcb_io.c:424
> #4 0x00007ffff5fa1751 in XIfEvent (dpy=0xf98ba0, event=event <at> entry=0x7fffffff83f0, predicate=predicate <at> entry=0x7ffff5fe7790 <_CheckCMEvent>, arg=arg <at> entry=0xf50340 "\200\365*\366\377\177")
>  at ../../src/IfEvent.c:68
> #5 0x00007ffff5fe7f24 in _XimXRead (im=0xf50340, recv_buf=0x7fffffff8dd0 "", buf_len=2048, ret_len=0x7fffffff851c) at ../../../../modules/im/ximcp/imTrX.c:476
> #6 0x00007ffff5fe8b80 in _XimReadData (im=im <at> entry=0xf50340, len=len <at> entry=0x7fffffff857e, buf=buf <at> entry=0x7fffffff8dd0 "", buf_size=buf_size <at> entry=2048) at ../../../../modules/im/ximcp/imTransR.c:165
> #7 0x00007ffff5fe8e71 in _XimRead (im=im <at> entry=0xf50340, len=len <at> entry=0x7fffffff85ce, buf=buf <at> entry=0x7fffffff8dd0 "", buf_size=buf_size <at> entry=2048, 
>  predicate=predicate <at> entry=0x7ffff5fd6c80 <_XimDestroyICCheck>, arg=arg <at> entry=0x161a370 " \365*\366\377\177") at ../../../../modules/im/ximcp/imTransR.c:235
> #8 0x00007ffff5fd70e8 in _XimProtoDestroyIC (xic=0x161a370) at ../../../../modules/im/ximcp/imDefIc.c:914
> #9 0x00007ffff5fc58d2 in XDestroyIC (ic=0x161a370) at ../../../src/xlibi18n/ICWrap.c:265
> #10 0x000000000054c6d6 in free_frame_xic (f=0x139e798) at xfns.c:2087
> #11 0x00000000005455c5 in x_free_frame_resources (f=0x139e798) at xterm.c:9275
> #12 0x0000000000545c11 in x_destroy_window (f=0x139e798) at xterm.c:9383
> #13 0x000000000042826b in delete_frame (frame=..., force=...) at frame.c:1387
> #14 0x0000000000541ff3 in x_connection_closed (dpy=0xf98ba0, error_message=0x7fffffff9940 "X protocol error: BadPixmap (invalid Pixmap parameter) on protocol request 55") at xterm.c:7635
> #15 0x00000000005422b7 in x_error_quitter (display=0xf98ba0, event=0x7fffffff9af0) at xterm.c:7747
> #16 0x0000000000542209 in x_error_handler (display=0xf98ba0, event=0x7fffffff9af0) at xterm.c:7717
> #17 0x00007ffff5fbb54b in _XError (dpy=dpy <at> entry=0xf98ba0, rep=rep <at> entry=0xf76d70) at ../../src/XlibInt.c:1463
> #18 0x00007ffff5fb85e7 in handle_error (dpy=0xf98ba0, err=0xf76d70, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
> #19 0x00007ffff5fb8695 in handle_response (dpy=dpy <at> entry=0xf98ba0, response=0xf76d70, in_XReply=in_XReply <at> entry=1) at ../../src/xcb_io.c:325
> #20 0x00007ffff5fb9578 in _XReply (dpy=dpy <at> entry=0xf98ba0, rep=rep <at> entry=0x7fffffff9cb0, extra=extra <at> entry=0, discard=discard <at> entry=0) at ../../src/xcb_io.c:627
> #21 0x00007ffff5faf4cf in XQueryColor (dpy=0xf98ba0, cmap=32, def=0x7fffffff9d10) at ../../src/QuColor.c:49
> #22 0x00007ffff6b8c50c in Xaw3dComputeTopShadowRGB () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6

This is some kind of X error.  Please run the daemon in X synchronous
mode (etc/DEBUG tells how to do that), and repeat the experiment.
Then the X error should be triggered immediately by whatever operation
errors out, and we will see a more helpful backtrace.  In that case,
please tell what the value of X error is.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Tue, 10 May 2016 16:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: "Robert Lange" <rcl24 <at> drexel.edu>
To: 23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5; emacs --daemon hangs randomly when
 emacsclient -c used repeatedly
Date: Tue, 10 May 2016 12:40:36 -0400
[Message part 1 (text/plain, inline)]
Same setup as before.

(gdb) break x_error_quitter
(gdb) run -Q -nw -xrm "emacs.synchronous: true" -f server-start

Breakpoint 3, x_error_quitter (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7732
7732 {
(gdb) bt
#0 x_error_quitter (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7732
#1 0x0000000000542209 in x_error_handler (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7717
#2 0x00007ffff5fbb54b in _XError (dpy=dpy <at> entry=0xfd7720, rep=rep <at> entry=0xf97e30) at ../../src/XlibInt.c:1463
#3 0x00007ffff5fb85e7 in handle_error (dpy=0xfd7720, err=0xf97e30, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
#4 0x00007ffff5fb8695 in handle_response (dpy=dpy <at> entry=0xfd7720, response=0xf97e30, in_XReply=in_XReply <at> entry=1) at ../../src/xcb_io.c:325
#5 0x00007ffff5fb9578 in _XReply (dpy=dpy <at> entry=0xfd7720, rep=rep <at> entry=0x7fffffff9c80, extra=extra <at> entry=0, discard=discard <at> entry=0) at ../../src/xcb_io.c:627
#6 0x00007ffff5faf4cf in XQueryColor (dpy=0xfd7720, cmap=32, def=0x7fffffff9ce0) at ../../src/QuColor.c:49
#7 0x00007ffff6b8c50c in Xaw3dComputeTopShadowRGB () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#8 0x00007ffff6b8c600 in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#9 0x00007ffff6b8ca6a in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
#10 0x00007ffff66f1afc in CallInitialize (class=0x7ffff6dae960 <threeDClassRec>, req_widget=req_widget <at> entry=0x7fffffff9ef0, new_widget=new_widget <at> entry=0x1655210, args=args <at> entry=0x7fffffffa3c0, 
 num_args=3) at ../../src/Create.c:226
#11 0x00007ffff66f1ac6 in CallInitialize (class=0x7ffff6dac1c0 <scrollbarClassRec>, req_widget=req_widget <at> entry=0x7fffffff9ef0, new_widget=new_widget <at> entry=0x1655210, args=args <at> entry=0x7fffffffa3c0, 
 num_args=num_args <at> entry=3) at ../../src/Create.c:221
#12 0x00007ffff66f2427 in xtCreate (name=name <at> entry=0x703028 "verticalScrollBar", class=class <at> entry=0x0, widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0xff6940, 
 default_screen=0xfb5cb0, args=args <at> entry=0x7fffffffa3c0, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0, parent_constraint_class=0x0, 
 post_proc=post_proc <at> entry=0x7ffff66f1b40 <widgetPostProc>) at ../../src/Create.c:416
#13 0x00007ffff66f2840 in _XtCreateWidget (name=name <at> entry=0x703028 "verticalScrollBar", widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0xff6940, 
 args=args <at> entry=0x7fffffffa3c0, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0) at ../../src/Create.c:570
#14 0x00007ffff66f2b0e in XtCreateWidget (name=0x703028 "verticalScrollBar", widget_class=0x7ffff6dac1c0 <scrollbarClassRec>, parent=0xff6940, args=0x7fffffffa3c0, num_args=3) at ../../src/Create.c:589
#15 0x000000000053c417 in x_create_toolkit_scroll_bar (f=0xffed38, bar=0x134e3b8) at xterm.c:4768
#16 0x000000000053c937 in x_scroll_bar_create (w=0x13b0940, top=686, left=1, width=16, height=19) at xterm.c:4960
#17 0x000000000053d167 in XTset_vertical_scroll_bar (w=0x13b0940, portion=0, whole=0, position=0) at xterm.c:5205
#18 0x000000000046b064 in set_vertical_scroll_bar (w=0x13b0940) at xdisp.c:15905
#19 0x000000000046fcfa in redisplay_window (window=..., just_this_one_p=false) at xdisp.c:16947
#20 0x00000000004644f2 in redisplay_window_0 (window=...) at xdisp.c:14373
#21 0x00000000006173df in internal_condition_case_1 (bfun=0x4644b0 <redisplay_window_0>, arg=..., handlers=..., hfun=0x46447f <redisplay_window_error>) at eval.c:1372
#22 0x000000000046445d in redisplay_windows (window=...) at xdisp.c:14353
#23 0x0000000000463204 in redisplay_internal () at xdisp.c:13949
#24 0x0000000000463db4 in redisplay_preserve_echo_area (from_where=12) at xdisp.c:14206
#25 0x0000000000674157 in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=..., wait_proc=0x0, just_wait_proc=0) at process.c:4821
#26 0x0000000000422d0c in sit_for (timeout=..., reading=true, display_option=1) at dispnew.c:5867
#27 0x0000000000576bff in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x7fffffffd7c5, end_time=0x0) at keyboard.c:2810
#28 0x00000000005858f4 in read_key_sequence (keybuf=0x7fffffffd9f0, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false)
 at keyboard.c:9089
#29 0x0000000000573161 in command_loop_1 () at keyboard.c:1453
#30 0x000000000061726e in internal_condition_case (bfun=0x572d8a <command_loop_1>, handlers=..., hfun=0x57253d <cmd_error>) at eval.c:1348
#31 0x0000000000572a28 in command_loop_2 (ignore=...) at keyboard.c:1178
#32 0x00000000006166f1 in internal_catch (tag=..., func=0x572a05 <command_loop_2>, arg=...) at eval.c:1112
#33 0x00000000005729dc in command_loop () at keyboard.c:1157
#34 0x0000000000572069 in recursive_edit_1 () at keyboard.c:778
#35 0x0000000000572239 in Frecursive_edit () at keyboard.c:849
#36 0x000000000057017b in main (argc=7, argv=0x7fffffffddb8) at emacs.c:1642

Lisp Backtrace:
"redisplay_internal (C function)" (0xd553f0)

(gdb) print event
$1 = (XErrorEvent *) 0x7fffffff9ac0

(gdb) print *event
$2 = {
 type = 0, 
 display = 0xfd7720, 
 resourceid = 0, 
 serial = 1942, 
 error_code = 4 '\004', 
 request_code = 55 '7', 
 minor_code = 0 '\000'
}
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Tue, 10 May 2016 17:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Robert Lange" <rcl24 <at> drexel.edu>
Cc: 23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5;
 emacs --daemon hangs randomly when emacsclient -c used repeatedly
Date: Tue, 10 May 2016 19:59:46 +0300
> From: "Robert Lange" <rcl24 <at> drexel.edu>
> Date: Tue, 10 May 2016 12:40:36 -0400
> 
> (gdb) break x_error_quitter
> (gdb) run -Q -nw -xrm "emacs.synchronous: true" -f server-start
> 
> Breakpoint 3, x_error_quitter (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7732
> 7732 {
> (gdb) bt
> #0 x_error_quitter (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7732
> #1 0x0000000000542209 in x_error_handler (display=0xfd7720, event=0x7fffffff9ac0) at xterm.c:7717
> #2 0x00007ffff5fbb54b in _XError (dpy=dpy <at> entry=0xfd7720, rep=rep <at> entry=0xf97e30) at ../../src/XlibInt.c:1463
> #3 0x00007ffff5fb85e7 in handle_error (dpy=0xfd7720, err=0xf97e30, in_XReply=<optimized out>) at ../../src/xcb_io.c:213
> #4 0x00007ffff5fb8695 in handle_response (dpy=dpy <at> entry=0xfd7720, response=0xf97e30, in_XReply=in_XReply <at> entry=1) at ../../src/xcb_io.c:325
> #5 0x00007ffff5fb9578 in _XReply (dpy=dpy <at> entry=0xfd7720, rep=rep <at> entry=0x7fffffff9c80, extra=extra <at> entry=0, discard=discard <at> entry=0) at ../../src/xcb_io.c:627
> #6 0x00007ffff5faf4cf in XQueryColor (dpy=0xfd7720, cmap=32, def=0x7fffffff9ce0) at ../../src/QuColor.c:49
> #7 0x00007ffff6b8c50c in Xaw3dComputeTopShadowRGB () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
> #8 0x00007ffff6b8c600 in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
> #9 0x00007ffff6b8ca6a in ?? () from /usr/lib/x86_64-linux-gnu/libXaw3d.so.6
> #10 0x00007ffff66f1afc in CallInitialize (class=0x7ffff6dae960 <threeDClassRec>, req_widget=req_widget <at> entry=0x7fffffff9ef0, new_widget=new_widget <at> entry=0x1655210, args=args <at> entry=0x7fffffffa3c0, 
>  num_args=3) at ../../src/Create.c:226
> #11 0x00007ffff66f1ac6 in CallInitialize (class=0x7ffff6dac1c0 <scrollbarClassRec>, req_widget=req_widget <at> entry=0x7fffffff9ef0, new_widget=new_widget <at> entry=0x1655210, args=args <at> entry=0x7fffffffa3c0, 
>  num_args=num_args <at> entry=3) at ../../src/Create.c:221
> #12 0x00007ffff66f2427 in xtCreate (name=name <at> entry=0x703028 "verticalScrollBar", class=class <at> entry=0x0, widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0xff6940, 
>  default_screen=0xfb5cb0, args=args <at> entry=0x7fffffffa3c0, num_args=num_args <at> entry=3, typed_args=typed_args <at> entry=0x0, num_typed_args=num_typed_args <at> entry=0, parent_constraint_class=0x0, 
>  post_proc=post_proc <at> entry=0x7ffff66f1b40 <widgetPostProc>) at ../../src/Create.c:416
> #13 0x00007ffff66f2840 in _XtCreateWidget (name=name <at> entry=0x703028 "verticalScrollBar", widget_class=widget_class <at> entry=0x7ffff6dac1c0 <scrollbarClassRec>, parent=parent <at> entry=0xff6940, 

So now we know that the error is caused by creation of the vertical
scrollbar.

> (gdb) print event
> $1 = (XErrorEvent *) 0x7fffffff9ac0
> 
> (gdb) print *event
> $2 = {
>  type = 0, 
>  display = 0xfd7720, 
>  resourceid = 0, 
>  serial = 1942, 
>  error_code = 4 '\004', 
>  request_code = 55 '7', 
>  minor_code = 0 '\000'
> }

Error code 4 is BadPixmap, according to my references.  I hope some X
expert will chime in and tell why this happens.  (I actually don't
understand why we try to create the scroll bar when the frame is
iconified.)

Thanks.




Added tag(s) help; removed tag(s) moreinfo. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 08 Dec 2016 01:38:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23499; Package emacs. (Sun, 03 Sep 2017 10:16:02 GMT) Full text and rfc822 format available.

Message #25 received at 23499 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Lange <rcl24 <at> drexel.edu>, 23499 <at> debbugs.gnu.org
Subject: Re: bug#23499: 24.5; emacs --daemon hangs randomly when emacsclient
 -c used repeatedly
Date: Sun, 03 Sep 2017 12:15:30 +0200
> To replicate:
>
> Compile the latest GNU 24.5.1 source tarball using:
>
> CFLAGS='-O0 -g3' ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type --with-x-toolkit=lucid
> make
> cd src/
> gdb ./emacs
>   (gdb) run -Q -nw -f server-start
>
> In a separate terminal:
>
> x=0; while emacsclient -c; do x=$(( $x + 1 )); done; echo "Created $x windows before crash."
>
> Close each Emacs client window after it appears. Eventually (it seems to average about 5 tries) Emacs will hang with a partially-drawn window. No interaction with the UI is possible. At that point in another terminal I execute:

I checked in a fix for this in current master which should eventually
become Emacs 26.1.  Could you try it?

Thanks, martin




bug marked as fixed in version 26.1, send any further explanations to 23499 <at> debbugs.gnu.org and "Robert Lange" <rcl24 <at> drexel.edu> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 05 Sep 2017 20:06:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Oct 2017 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.