Subject: bug#18112: 24.4.50; emacs --daemon infinite loop in find_interval

From: Eli Zaretskii <[email-masked]>
Date: Sat, 26 Jul 2014 09:42:25 +0300

> From: Mark Oteiza <[email-masked]>
> Date: Fri, 25 Jul 2014 19:08:43 -0400
> 
> 1. emacs --daemon -Q
> 2. Start tmux in a term emulator and invoke `emacsclient -t` in
>    the tmux window
> 3. Do `C-x 3` in the client
> 4. Split horizontally the tmux window into two panes: <prefix> "
> 5. Open a new emacsclient in the new pane, exit the client (^X^C),
>    and close the new tmux pane (^D)
> 6. Interact with the first client.
> 
> Attaching with gdb the first time:
> 
> find_interval (tree=0xed9198, position=732) at intervals.c:681
> 681     in intervals.c
> (gdb) s
> 683     in intervals.c
> (gdb) s
> 701     in intervals.c
> (gdb) s
> 681     in intervals.c
> (gdb) s
> 683     in intervals.c
> (gdb) s
> 701     in intervals.c
> 
> Otherwise, setting a breakpoint at find_interval and continuing,
> `position` changes value but I always end up back at find_interval.

Thanks.

Please use the procedure in etc/DEBUG to find out where it loops.  The
procedure calls for using the "finish" command until some frame
doesn't return, then stepping with "next" through that frame to see
where and why it loops.