Web lists-archives.com

RE: emacs-X11 freezes with mouse cut and paste




>>> Alternatively, instead of running emacs under gdb, you could just run emacs as you normally do and then attach gdb when emacs freezes.  >>("gdb -p <PID>")  At that point, a backtrace of all threads would be useful.

>> It happened again.  Attached to PID as shown above.  (gdb) list gave same result as above.
>> (gdb) bt
>> #0  0x00000000773bafb1 in ntdll!DbgBreakPoint () from
>> /cygdrive/c/Windows/SYSTEM32/ntdll.dll
>> #1  0x0000000077462e08 in ntdll!DbgUiRemoteBreakin () from
>> /cygdrive/c/Windows/SYSTEM32/ntdll.dll
>> #2  0x00000000772659cd in KERNEL32!BaseThreadInitThunk () from
>> /cygdrive/c/Windows/system32/kernel32.dll
>> #3  0x000000007739a561 in ntdll!RtlUserThreadStart () from
>> /cygdrive/c/Windows/SYSTEM32/ntdll.dll
>> #4  0x0000000000000000 in ?? ()
>> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>>
>> Does this tell me the problem is not Cygwin?  Perhaps BLODA or bad hardware, maybe bad mouse?
>
>Not yet.  When you attach gdb to a process, it creates a new thread to be used by gdb.  What you're seeing above is the backtrace in that thread.  >You need to switch to the main thread before you can get a useful backtrace:
>
>(gdb) thread 1
>(gdb) bt
>Ken
Here it is:
(gdb) bt
#0  0x00000001004e4e57 in readable_events (flags=1) at /usr/src/debug/emacs-26.1-1/src/keyboard.c:3338
#1  0x00000001004e5a85 in get_input_pending (flags=flags@entry=1) at /usr/src/debug/emacs-26.1-1/src/keyboard.c:6824
#2  0x00000001004e5b3d in swallow_events (do_display=do_display@entry=false)
    at /usr/src/debug/emacs-26.1-1/src/keyboard.c:4264
#3  0x0000000100592e0e in wait_reading_process_output (time_limit=<optimized out>, nsecs=<optimized out>,
    read_kbd=read_kbd@entry=0, do_display=do_display@entry=false, wait_for_cell=4305482867,
    wait_proc=wait_proc@entry=0x0, just_wait_proc=just_wait_proc@entry=0)
    at /usr/src/debug/emacs-26.1-1/src/process.c:5547
#4  0x00000001004c5d19 in x_get_foreign_selection (selection_symbol=<optimized out>, target_type=9360, time_stamp=0,
    frame=25790477765) at /usr/src/debug/emacs-26.1-1/src/xselect.c:1201
#5  0x0000000100551ab0 in Ffuncall (nargs=<optimized out>, args=args@entry=0xffffaef8)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2769
#6  0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294947221, maxdepth=<optimized out>,
    args_template=args_template@entry=4106, nargs=<optimized out>, nargs@entry=2, args=<optimized out>,
    args@entry=0xffffb198) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#7  0x0000000100554187 in funcall_lambda (fun=4311658037, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0xffffb198)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#8  0x0000000100551a2b in Ffuncall (nargs=nargs@entry=3, args=0xffffb190) at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#9  0x0000000100553560 in Fapply (nargs=2, args=0xffffb2e0) at /usr/src/debug/emacs-26.1-1/src/eval.c:2389
#10 0x0000000100551ab0 in Ffuncall (nargs=<optimized out>, args=args@entry=0xffffb2d8)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2769
#11 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294948333, maxdepth=<optimized out>,
    args_template=args_template@entry=514, nargs=<optimized out>, nargs@entry=2, args=<optimized out>,
    args@entry=0xffffb5f0) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#12 0x0000000100554187 in funcall_lambda (fun=4311084885, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0xffffb5f0)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#13 0x0000000100551a2b in Ffuncall (nargs=3, args=args@entry=0xffffb5e8) at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#14 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294949125, maxdepth=<optimized out>,
    args_template=args_template@entry=2050, nargs=<optimized out>, nargs@entry=2, args=<optimized out>,
    args@entry=0xffffb908) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#15 0x0000000100554187 in funcall_lambda (fun=4302454965, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0xffffb908)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#16 0x0000000100551a2b in Ffuncall (nargs=3, args=args@entry=0xffffb900) at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#17 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294949869, maxdepth=<optimized out>,
    args_template=args_template@entry=1030, nargs=<optimized out>, nargs@entry=1, args=<optimized out>,
    args@entry=0xffffbbf0) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#18 0x0000000100554187 in funcall_lambda (fun=4302453685, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xffffbbf0)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#19 0x0000000100551a2b in Ffuncall (nargs=2, args=args@entry=0xffffbbe8) at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#20 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294950549, maxdepth=<optimized out>,
    args_template=args_template@entry=2, nargs=<optimized out>, nargs@entry=0, args=<optimized out>,
    args@entry=0xffffbe98) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#21 0x0000000100554187 in funcall_lambda (fun=4302454245, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0xffffbe98)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#22 0x0000000100551a2b in Ffuncall (nargs=1, args=args@entry=0xffffbe90) at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#23 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294951421, maxdepth=<optimized out>,
    args_template=args_template@entry=1030, nargs=<optimized out>, nargs@entry=1, args=<optimized out>,
    args@entry=0xffffc200) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#24 0x0000000100554187 in funcall_lambda (fun=4302432069, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xffffc200)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#25 0x0000000100551a2b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xffffc1f8)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#26 0x000000010054e423 in Ffuncall_interactively (nargs=2, args=0xffffc1f8)
    at /usr/src/debug/emacs-26.1-1/src/callint.c:252
---Type <return> to continue, or q <return> to quit---
#27 0x0000000100551ab0 in Ffuncall (nargs=nargs@entry=10043408, args=0xffffc1f0,
    args@entry=0x100588100 <exec_byte_code+704>) at /usr/src/debug/emacs-26.1-1/src/eval.c:2769
#28 0x000000010054ed4f in Fcall_interactively (function=<optimized out>, record_flag=<optimized out>,
    keys=<optimized out>) at /usr/src/debug/emacs-26.1-1/src/callint.c:854
#29 0x0000000100551ab0 in Ffuncall (nargs=<optimized out>, args=args@entry=0xffffc448)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2769
#30 0x0000000100588100 in exec_byte_code (bytestr=<optimized out>, vector=4294952853, maxdepth=<optimized out>,
    args_template=args_template@entry=4102, nargs=<optimized out>, nargs@entry=1, args=<optimized out>,
    args@entry=0xffffc798) at /usr/src/debug/emacs-26.1-1/src/bytecode.c:629
#31 0x0000000100554187 in funcall_lambda (fun=4302011021, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xffffc798)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2970
#32 0x0000000100551a2b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xffffc790)
    at /usr/src/debug/emacs-26.1-1/src/eval.c:2783
#33 0x0000000100551b7f in call1 (fn=fn@entry=16080, arg1=<optimized out>) at /usr/src/debug/emacs-26.1-1/src/eval.c:2620
#34 0x00000001004ed24c in command_loop_1 () at /usr/src/debug/emacs-26.1-1/src/keyboard.c:1482
#35 0x0000000100550beb in internal_condition_case (bfun=bfun@entry=0x1004ecdf0 <command_loop_1>,
    handlers=handlers@entry=20928, hfun=hfun@entry=0x1004e3ca0 <cmd_error>) at /usr/src/debug/emacs-26.1-1/src/eval.c:1332
#36 0x00000001004de414 in command_loop_2 (ignore=<optimized out>) at /usr/src/debug/emacs-26.1-1/src/keyboard.c:1110
#37 0x0000000100550b5a in internal_catch (tag=tag@entry=50496, func=func@entry=0x1004de3f0 <command_loop_2>,
    arg=arg@entry=0) at /usr/src/debug/emacs-26.1-1/src/eval.c:1097
#38 0x00000001004de3a8 in command_loop () at /usr/src/debug/emacs-26.1-1/src/keyboard.c:1089
#39 0x00000001004e387d in recursive_edit_1 () at /usr/src/debug/emacs-26.1-1/src/keyboard.c:695
#40 0x00000001004e3bd4 in Frecursive_edit () at /usr/src/debug/emacs-26.1-1/src/keyboard.c:766
#41 0x00000001005e20d1 in main (argc=<optimized out>, argv=0xffffcc70) at /usr/src/debug/emacs-26.1-1/src/emacs.c:1717