Subject: Re: bug#30182: Update

From: Noam Postavsky <[email-masked]>
Date: Fri, 02 Feb 2018 09:14:36 -0500

Eli Zaretskii <[email-masked]> writes:

>> The behavior differs slightly from those seen earlier because the
>> timer list contains only three timers when it tries to add another
>> one.  Still the conjecture that we try to add a timer while checking
>> timers has been proven.
>
> I'd love to see a C-level backtrace from that situation, because I'm
> not really sure what exactly happens and how.

This is reproducible from

    emacs -Q -L .../w3m -l w3m -f w3m

where .../w3m is a checkout of https://github.com/ecbrown/emacs-w3m.
Backtrace attached.  Martin's patch of #143 applied and breakpoint
set with:

    break Fsignal if (((intptr_t)Qerror) == ((intptr_t)error_symbol))

(the breakpoint needs to be set only after w3m has started up though)

The relevant bit seems to be here:

#59 0x0000000000445356 in safe_call1 (fn=XIL(0x90c0), arg=XIL(0x1600c35)) at ../../src/xdisp.c:2629
#60 0x00000000004a2643 in note_mode_line_or_margin_highlight (window=XIL(0x1600c35), x=29, y=26, 
    area=ON_MODE_LINE) at ../../src/xdisp.c:30842
#61 0x00000000004a33db in note_mouse_highlight (f=0x15ffc30 <bss_sbrk_buffer+8319632>, x=263, y=435)
    at ../../src/xdisp.c:31155
#62 0x0000000000540aee in note_mouse_movement (frame=0x15ffc30 <bss_sbrk_buffer+8319632>, 
    event=0x7fffffffd540) at ../../src/xterm.c:4956
#63 0x0000000000546d8f in handle_one_xevent (dpyinfo=0x2f2ac70, event=0x7fffffffd540, 
    finish=0xd9615c <current_finish>, hold_quit=0x7fffffffd7d0) at ../../src/xterm.c:8632
#64 0x0000000000544623 in event_handler_gdk (gxev=0x7fffffffd540, ev=0x2e7dc60, data=0x0)
    at ../../src/xterm.c:7574
#65 0x00002aaaabd0ae21 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#66 0x00002aaaabd0b0d9 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#67 0x00002aaaabcd53f9 in gdk_display_get_event () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#68 0x00002aaaabd0ae92 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#69 0x00002aaaad38d7f7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#70 0x00002aaaad38da60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#71 0x00002aaaad38db0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#72 0x00002aaaab5badf5 in gtk_main_iteration () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#73 0x0000000000547d70 in XTread_socket (terminal=0x155de40 <bss_sbrk_buffer+7656608>, 
    hold_quit=0x7fffffffd7d0) at ../../src/xterm.c:9131
#74 0x000000000059a3b2 in gobble_input () at ../../src/keyboard.c:6892
#75 0x000000000059a88c in handle_async_input () at ../../src/keyboard.c:7129
#76 0x000000000059a8ab in process_pending_signals () at ../../src/keyboard.c:7143
#77 0x0000000000644d8f in maybe_quit () at ../../src/eval.c:1545
#78 0x000000000064d653 in Flength (sequence=XIL(0)) at ../../src/fns.c:119
#79 0x000000000064ea6b in concat (nargs=1, args=0x7fffffffda78, target_type=Lisp_Cons, 
    last_special=false) at ../../src/fns.c:582
#80 0x000000000064e86b in Fcopy_sequence (arg=XIL(0x3ba84d3)) at ../../src/fns.c:514
#81 0x0000000000594d66 in timer_check () at ../../src/keyboard.c:4382