Subject: Re: bug#50205: 27.2; crashes or hangs when opening a specific file using tramp

From: Mani Kancherla <[email-masked]>
Date: Fri, 17 Sep 2021 14:01:28 -0700

Hi Alan,

With "make bootstrap" I was able to compile and run. The very first time I
launched it in debugger, emacs crashed. Please see the stack trace below. A
subsequent attempt to launch did not crash and I can confirm that I do not
see the issue of emacs hanging when I open that file over tramp. This is
with tramp 2.5.2-pre and emacs 28.0.50.

Thanks,
Mani

lldb /Users/mkancherla/src/emacs/src/emacs
(lldb) target create "/Users/mkancherla/src/emacs/src/emacs"
Current executable set to '/Users/mkancherla/src/emacs/src/emacs' (x86_64).
(lldb) r
Process 60951 launched: '/Users/mkancherla/src/emacs/src/emacs' (x86_64)
2021-09-17 13:53:03.578154-0700 emacs[60951:8770749]
SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=60951
2021-09-17 13:53:03.578197-0700 emacs[60951:8770749]
SecTaskCopyDebugDescription: emacs[60951]/0#-1 LF=0
2021-09-17 13:53:04.169821-0700 emacs[60951:8770749]
SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=60951
2021-09-17 13:53:04.169934-0700 emacs[60951:8770749]
SecTaskCopyDebugDescription: emacs[60951]/0#-1 LF=0
2021-09-17 13:53:04.253258-0700 emacs[60951:8770749]
SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=60951
2021-09-17 13:53:04.253344-0700 emacs[60951:8770749]
SecTaskCopyDebugDescription: emacs[60951]/0#-1 LF=0
2021-09-17 13:53:04.253940-0700 emacs[60951:8770749]
SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=60951
2021-09-17 13:53:04.253980-0700 emacs[60951:8770749]
SecTaskCopyDebugDescription: emacs[60951]/0#-1 LF=0
objc[60951]: autorelease pool page 0x10192b000 corrupted
  magic     0x00000000 0x00000000 0x00000000 0x00000000
  should be 0xa1a1a1a1 0x4f545541 0x454c4552 0x21455341
  pthread   0xa2d8fe4c
  should be 0x100a63e00

Process 60951 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff2050a56e
libsystem_kernel.dylib`__abort_with_payload + 10
libsystem_kernel.dylib`__abort_with_payload:
->  0x7fff2050a56e <+10>: jae    0x7fff2050a578            ; <+20>
    0x7fff2050a570 <+12>: movq   %rax, %rdi
    0x7fff2050a573 <+15>: jmp    0x7fff204e8ad9            ;
cerror_nocancel
    0x7fff2050a578 <+20>: retq
Target 0: (emacs) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff2050a56e
libsystem_kernel.dylib`__abort_with_payload + 10
    frame #1: 0x00007fff2050bfbd
libsystem_kernel.dylib`abort_with_payload_wrapper_internal + 80
    frame #2: 0x00007fff2050bf6d libsystem_kernel.dylib`abort_with_reason +
19
    frame #3: 0x00007fff203db9e3 libobjc.A.dylib`_objc_fatalv(unsigned long
long, unsigned long long, char const*, __va_list_tag*) + 114
    frame #4: 0x00007fff203db971 libobjc.A.dylib`_objc_fatal(char const*,
...) + 135
    frame #5: 0x00007fff203da6fe libobjc.A.dylib`void
AutoreleasePoolPage::busted<void (*)(char const*, ...)>(void (*)(char
const*, ...)) const + 120
    frame #6: 0x00007fff203dc623
libobjc.A.dylib`AutoreleasePoolPage::busted_die() const + 9
    frame #7: 0x00007fff203bddb8 libobjc.A.dylib`objc_autoreleasePoolPop +
41
    frame #8: 0x00007fff26eefc6b
QuartzCore`CA::Context::commit_transaction(CA::Transaction*, double,
double*) + 791
    frame #9: 0x00007fff26d85b6f QuartzCore`CA::Transaction::commit() + 713
    frame #10: 0x00007fff233f0340 AppKit`-[NSMoveHelper _fireDisplayLink:]
+ 287
    frame #11: 0x00007fff23001184 AppKit`-[NSScreenDisplayLink _fire] + 180
    frame #12: 0x00007fff237960b4
AppKit`___NSRunLoopTimerCreateWithHandler_block_invoke + 34
    frame #13: 0x00007fff2062f279
CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ +
20
    frame #14: 0x00007fff2062ed6d CoreFoundation`__CFRunLoopDoTimer + 927
    frame #15: 0x00007fff2062e8ca CoreFoundation`__CFRunLoopDoTimers + 307
    frame #16: 0x00007fff206154a3 CoreFoundation`__CFRunLoopRun + 1988
    frame #17: 0x00007fff2061461c CoreFoundation`CFRunLoopRunSpecific + 563
    frame #18: 0x00007fff23144fc7 AppKit`-[NSMoveHelper _doAnimation] + 547
    frame #19: 0x00007fff234bd371 AppKit`-[NSResizeMoveHelper
animateResizeToFrame:] + 411
    frame #20: 0x00007fff23074cc6 AppKit`-[NSWindow
setFrame:display:animate:] + 854
    frame #21: 0x0000000100357625 emacs`-[EmacsWindow
setFrame:display:animate:](self=0x0000000100d79340,
_cmd="setFrame:display:animate:", windowFrame=(origin = (x = 0, y = 827),
size = (width = 595, height = 588)), displayViews=YES,
performAnimation=YES) at nsterm.m:8836:3
    frame #22: 0x00007fff2365a91f AppKit`-[NSThemeFrame
_layerBackedAnimateToolbarWithReason:showToolbarPostWindowFrame:] + 1236
    frame #23: 0x00007fff22f43c1a AppKit`-[NSThemeFrame
_growWindowReshapeContentAndToolbarView:withOldToolbarFrameSize:animate:] +
1873
    frame #24: 0x00007fff22f43396 AppKit`-[NSThemeFrame
_reshapeContentAndToolbarView:withOldToolbarFrameSize:resizeWindow:animate:]
+ 615
    frame #25: 0x00007fff22f1e162 AppKit`-[NSThemeFrame
_showHideToolbar:resizeWindow:animate:] + 346
    frame #26: 0x00007fff22f0cd69 AppKit`-[NSWindow _showToolbar:animate:]
+ 214
    frame #27: 0x00007fff22f0cc7f AppKit`-[NSToolbar _show:animate:] + 35
    frame #28: 0x0000000100375fec emacs`-[EmacsToolbar
setVisible:](self=0x0000000100d8de90, _cmd="setVisible:", shown=YES) at
nsmenu.m:1274:3
    frame #29: 0x000000010035b714
emacs`ns_update_begin(f=0x000000010181be30) at nsterm.m:1030:7
    frame #30: 0x0000000100144a6d emacs`update_begin(f=0x000000010181be30)
at terminal.c:84:5
    frame #31: 0x00000001000065f5 emacs`redraw_frame(f=0x000000010181be30)
at dispnew.c:3110:3
    frame #32: 0x0000000100089c4c emacs`clear_garbaged_frames at
xdisp.c:12270:3
    frame #33: 0x000000010004f52a
emacs`echo_area_display(update_frame_p=true) at xdisp.c:12322:3
    frame #34: 0x000000010004f086
emacs`message3_nolog(m=0x0000000100def584) at xdisp.c:11288:7
    frame #35: 0x000000010004eda6 emacs`message3(m=0x0000000100def584) at
xdisp.c:11218:5
    frame #36: 0x0000000100243a23 emacs`Fmessage(nargs=2,
args=0x00007ffeefbfc8d0) at editfns.c:2876:7
    frame #37: 0x000000010025fc5b
emacs`funcall_subr(subr=0x0000000100400258, numargs=2,
args=0x00007ffeefbfc8d0) at eval.c:3106:12
    frame #38: 0x000000010025eb35 emacs`Ffuncall(nargs=3,
args=0x00007ffeefbfc8c8) at eval.c:3051:11
    frame #39: 0x00000001002cb1b3
emacs`exec_byte_code(bytestr=0x00000001026a20b4, vector=0x00000001026a1fad,
maxdepth=0x000000000000001e, args_template=0x0000000000000002, nargs=0,
args=0x00007ffeefbfd008) at bytecode.c:632:12
    frame #40: 0x0000000100263720
emacs`fetch_and_exec_byte_code(fun=0x00000001026a1f85,
syms_left=0x0000000000000002, nargs=0, args=0x00007ffeefbfd008) at
eval.c:3175:10
    frame #41: 0x000000010026010f
emacs`funcall_lambda(fun=0x00000001026a1f85, nargs=0,
arg_vector=0x00007ffeefbfd008) at eval.c:3256:11
    frame #42: 0x000000010025eb90 emacs`Ffuncall(nargs=1,
args=0x00007ffeefbfd000) at eval.c:3055:11
    frame #43: 0x00000001002cb1b3
emacs`exec_byte_code(bytestr=0x00000001026a2164, vector=0x000000010269f12d,
maxdepth=0x0000000000000066, args_template=0x0000000000000406, nargs=1,
args=0x00007ffeefbfdbd8) at bytecode.c:632:12
    frame #44: 0x0000000100263720
emacs`fetch_and_exec_byte_code(fun=0x000000010269f0fd,
syms_left=0x0000000000000406, nargs=1, args=0x00007ffeefbfdbd0) at
eval.c:3175:10
    frame #45: 0x000000010026010f
emacs`funcall_lambda(fun=0x000000010269f0fd, nargs=1,
arg_vector=0x00007ffeefbfdbd0) at eval.c:3256:11
    frame #46: 0x000000010025eb90 emacs`Ffuncall(nargs=2,
args=0x00007ffeefbfdbc8) at eval.c:3055:11
    frame #47: 0x00000001002cb1b3
emacs`exec_byte_code(bytestr=0x00000001026a5f04, vector=0x000000010269de05,
maxdepth=0x000000000000003a, args_template=0x0000000000000002, nargs=0,
args=0x00007ffeefbfe878) at bytecode.c:632:12
    frame #48: 0x0000000100263720
emacs`fetch_and_exec_byte_code(fun=0x000000010269ddd5,
syms_left=0x0000000000000002, nargs=0, args=0x00007ffeefbfe878) at
eval.c:3175:10
    frame #49: 0x000000010026010f
emacs`funcall_lambda(fun=0x000000010269ddd5, nargs=0,
arg_vector=0x00007ffeefbfe878) at eval.c:3256:11
    frame #50: 0x000000010025eb90 emacs`Ffuncall(nargs=1,
args=0x00007ffeefbfe870) at eval.c:3055:11
    frame #51: 0x00000001002cb1b3
emacs`exec_byte_code(bytestr=0x00000001026a6cfc, vector=0x000000010269d9c5,
maxdepth=0x0000000000000026, args_template=0x0000000000000002, nargs=0,
args=0x00007ffeefbff100) at bytecode.c:632:12
    frame #52: 0x0000000100263720
emacs`fetch_and_exec_byte_code(fun=0x000000010269d995,
syms_left=0x0000000000000002, nargs=0, args=0x00007ffeefbff100) at
eval.c:3175:10
    frame #53: 0x000000010026010f
emacs`funcall_lambda(fun=0x000000010269d995, nargs=0,
arg_vector=0x00007ffeefbff100) at eval.c:3256:11
    frame #54: 0x000000010025b167
emacs`apply_lambda(fun=0x000000010269d995, args=0x0000000000000000,
count=4) at eval.c:3200:9
    frame #55: 0x00000001002538dd emacs`eval_sub(form=0x0000000102a35083)
at eval.c:2573:12
    frame #56: 0x0000000100259991 emacs`Feval(form=0x0000000102a35083,
lexical=0x0000000000000000) at eval.c:2355:28
    frame #57: 0x0000000100176b9d emacs`top_level_2 at keyboard.c:1131:10
    frame #58: 0x0000000100257e8f
emacs`internal_condition_case(bfun=(emacs`top_level_2 at keyboard.c:1130),
handlers=0x0000000000000090, hfun=(emacs`cmd_error at keyboard.c:925)) at
eval.c:1478:25
    frame #59: 0x0000000100176b14
emacs`top_level_1(ignore=0x0000000000000000) at keyboard.c:1139:5
    frame #60: 0x0000000100257564
emacs`internal_catch(tag=0x000000000000d560, func=(emacs`top_level_1 at
keyboard.c:1136), arg=0x0000000000000000) at eval.c:1198:25
    frame #61: 0x000000010015eab1 emacs`command_loop at keyboard.c:1099:2
    frame #62: 0x000000010015e940 emacs`recursive_edit_1 at
keyboard.c:720:9
    frame #63: 0x000000010015eca9 emacs`Frecursive_edit at keyboard.c:792:3
    frame #64: 0x000000010015c0aa emacs`main(argc=1,
argv=0x00007ffeefbff878) at emacs.c:2310:3
    frame #65: 0x00007fff20538f3d libdyld.dylib`start + 1
    frame #66: 0x00007fff20538f3d libdyld.dylib`start +

On Tue, Sep 14, 2021 at 11:53 PM Alan Third <[email-masked]> wrote:

> On Tue, Sep 14, 2021 at 05:55:11PM -0700, Mani Kancherla wrote:
> > Hi Alan,
> >
> > I switched to emacs master branch, updated to top of tree and tried
> > compiling, but I am getting some errors.
> >
> > #./configure --with-ns --with-gnutls=ifavailable CFLAGS="-O0 -g3"
> > #make
> > .....
> >   ELC      emacs-lisp/eieio.elc
> > desired fingerprint:
> > 8b7026588f98cb70e851ab6ac87fe77659a38fab52a43323651c0da510d006fd
> > found fingerprint:
> > 34743d99e3ddcdb920608717b7a128d4f3ff4736a5edd127bdcca3dfe8da5649
> > emacs: could not load dump file
> > "/Users/mkancherla/src/emacs/src/emacs.pdmp": not built for this Emacs
> > executable
>
> Try running "make bootstrap".
> --
> Alan Third
>