unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Leinen <simon.leinen@gmail.com>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Pankaj Jangid <pankaj@codeisgreat.org>,
	Doug Davis <ddavis@ddavis.io>,
	herbert@gojira.at, Emacs developers <emacs-devel@gnu.org>
Subject: Re: [emacs-master] Frequent freezes on macOS
Date: Tue, 19 Jan 2021 21:27:29 +0100	[thread overview]
Message-ID: <CAAO6KgCi_C=xVX=Pz_9L153KiFqsBPZizo1kPc=3ft94a=2S8Q@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkQiWhA+cB=Z_hzvO+ZrN3qWKzG62FG8=Tzxxo+petVKcw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11048 bytes --]

I have been experiencing the same issue for the past few days.  Emacs
compiled (to a nextstep application) from master on MacOS occasionally
hangs while retrieving mail (headers) from an IMAP server in Gnus.  When
this happens, I can get out of the hang once by sending it a TERM signal
(kill $(pgrep Emacs)).  But if this happens a second time, this actually
kills Emacs.  Here's an all-threads backtrace after running it under the
debugger, waiting for Emacs to hang, and then interrupting the process in
the debugger:

(lldb) thread list
Process 68250 stopped
* thread #1: tid = 0x1b50e0, 0x00007fff70d9681e libsystem_kernel.dylib`read
+ 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #4: tid = 0x1b51a3, 0x00007fff70d9c3d6 libsystem_kernel.dylib`poll
+ 10, name = 'gmain'
  thread #8: tid = 0x1b51b1, 0x00007fff70d9e0fe
libsystem_kernel.dylib`__select + 10
  thread #11: tid = 0x1b51c4, 0x00007fff70d95dfa
libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
  thread #28: tid = 0x1b5a50, 0x00007fff70d974ce
libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #33: tid = 0x1b5a6d, 0x00007fff70d974ce
libsystem_kernel.dylib`__workq_kernreturn + 10
(lldb) thread backtrace all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff70d9681e libsystem_kernel.dylib`read + 10
    frame #1: 0x00000001000e1d5e Emacs`emacs_read [inlined]
emacs_intr_read(fd=25, buf=0x00007ffeefbfd1bf, nbyte=1,
interruptible=false) at sysdep.c:2486:16 [opt]
    frame #2: 0x00000001000e1d44 Emacs`emacs_read(fd=25,
buf=0x00007ffeefbfd1bf, nbyte=1) at sysdep.c:2500 [opt]
    frame #3: 0x00000001001a0f66 Emacs`child_signal_read(fd=<unavailable>,
data=<unavailable>) at process.c:7196:7 [opt]
    frame #4: 0x000000010019cd1e
Emacs`wait_reading_process_output(time_limit=<unavailable>,
nsecs=<unavailable>, read_kbd=<unavailable>, do_display=false,
wait_for_cell=0x0000000000000000, wait_proc=<unavailable>,
just_wait_proc=0) at process.c:5719:13 [opt]
    frame #5: 0x000000010019b5b9
Emacs`Faccept_process_output(process=0x0000000105ef1a95,
seconds=0x000000010584b187, millisec=<unavailable>,
just_this_one=<unavailable>) at process.c:4790:7 [opt]
    frame #6: 0x000000010014eea1
Emacs`funcall_subr(subr=0x0000000100271f28, numargs=2, args=<unavailable>)
at eval.c:2990:19 [opt]
    frame #7: 0x000000010014e491 Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:2909:11 [opt]
    frame #8: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x000000010ddb8cc4, vector=0x00000001064de805,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #9: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #10: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x00000001064de3d5, nargs=1,
arg_vector=0x00007ffeefbfd8e0) at eval.c:3181 [opt]
    frame #11: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #12: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x0000000158641c54, vector=0x0000000107a8091d,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #13: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #14: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x0000000107a80a55, nargs=1,
arg_vector=0x00007ffeefbfdb80) at eval.c:3181 [opt]
    frame #15: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #16: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x0000000158641b64, vector=0x000000010342e7dd,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #17: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #18: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x0000000107a8012d, nargs=1,
arg_vector=0x00007ffeefbfdd00) at eval.c:3181 [opt]
    frame #19: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #20: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x0000000158641aa4, vector=0x0000000107a8007d,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #21: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #22: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x0000000107a80105, nargs=1,
arg_vector=0x00007ffeefbfded0) at eval.c:3181 [opt]
    frame #23: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #24: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x000000015863f874, vector=0x0000000107a70e2d,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #25: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #26: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x0000000107a70e7d, nargs=2,
arg_vector=0x00007ffeefbfe070) at eval.c:3181 [opt]
    frame #27: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #28: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x0000000105219df4, vector=0x000000015903059d,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #29: 0x000000010014f2ba Emacs`funcall_lambda [inlined]
fetch_and_exec_byte_code(fun=<unavailable>, syms_left=0x0000000000000000,
nargs=0, args=0x0000000000000000) at eval.c:3031:10 [opt]
    frame #30: 0x000000010014f28e
Emacs`funcall_lambda(fun=0x00000001067fb845, nargs=1,
arg_vector=0x00007ffeefbfe7b0) at eval.c:3181 [opt]
    frame #31: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #32: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x0000000102f23484, vector=0x000000010380cf95,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=0,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #33: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #34: 0x0000000100147699
Emacs`Ffuncall_interactively(nargs=<unavailable>, args=<unavailable>) at
callint.c:253:32 [opt]
    frame #35: 0x000000010014e491 Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:2909:11 [opt]
    frame #36: 0x0000000100147b7d
Emacs`Fcall_interactively(function=0x00000000072787f0,
record_flag=0x0000000000000000, keys=0x00000001062b65c5) at
callint.c:346:36 [opt]
    frame #37: 0x000000010014eed1
Emacs`funcall_subr(subr=0x000000010026e9e8, numargs=3, args=<unavailable>)
at eval.c:2987:19 [opt]
    frame #38: 0x000000010014e491 Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:2909:11 [opt]
    frame #39: 0x00000001001937b2
Emacs`exec_byte_code(bytestr=0x00000001042672bc, vector=0x0000000104266add,
maxdepth=<unavailable>, args_template=<unavailable>, nargs=1,
args=<unavailable>) at bytecode.c:632:12 [opt]
    frame #40: 0x000000010014e42f Emacs`Ffuncall(nargs=<unavailable>,
args=<unavailable>) at eval.c:0:4 [opt]
    frame #41: 0x000000010014eb0c Emacs`call1(fn=<unavailable>,
arg1=<unavailable>) at eval.c:2769:10 [opt]
    frame #42: 0x00000001000c724e Emacs`command_loop_1 at
keyboard.c:1466:13 [opt]
    frame #43: 0x000000010014c8a7
Emacs`internal_condition_case(bfun=(Emacs`command_loop_1 at
keyboard.c:1239), handlers=0x0000000000000090, hfun=(Emacs`cmd_error at
keyboard.c:922)) at eval.c:1441:25 [opt]
    frame #44: 0x00000001000d6e70
Emacs`command_loop_2(ignore=<unavailable>) at keyboard.c:1094:11 [opt]
    frame #45: 0x000000010014c082
Emacs`internal_catch(tag=0x000000000000cae0, func=<unavailable>,
arg=<unavailable>) at eval.c:1185:25 [opt]
    frame #46: 0x0000000100212885 Emacs`command_loop.cold.1 + 69
    frame #47: 0x00000001000c60a3 Emacs`command_loop at keyboard.c:1070:5
[opt]
    frame #48: 0x00000001000c5fd3 Emacs`recursive_edit_1 at
keyboard.c:720:9 [opt]
    frame #49: 0x00000001000c622b Emacs`Frecursive_edit at keyboard.c:789:3
[opt]
    frame #50: 0x00000001000c4dbc Emacs`main(argc=<unavailable>,
argv=0x00007ffeefbff358) at emacs.c:2049:3 [opt]
    frame #51: 0x00007fff70c54cc9 libdyld.dylib`start + 1
    frame #52: 0x00007fff70c54cc9 libdyld.dylib`start + 1
  thread #4, name = 'gmain'
    frame #0: 0x00007fff70d9c3d6 libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000102011fc1 libglib-2.0.0.dylib`g_main_context_iterate
+ 433
    frame #2: 0x00000001020120c6
libglib-2.0.0.dylib`g_main_context_iteration + 102
    frame #3: 0x00000001020140e1 libglib-2.0.0.dylib`glib_worker_main + 33
    frame #4: 0x000000010203ec32 libglib-2.0.0.dylib`g_thread_proxy + 66
    frame #5: 0x00007fff70e59109 libsystem_pthread.dylib`_pthread_start +
148
    frame #6: 0x00007fff70e54b8b libsystem_pthread.dylib`thread_start + 15
  thread #8
    frame #0: 0x00007fff70d9e0fe libsystem_kernel.dylib`__select + 10
    frame #1: 0x00000001001da3ef Emacs`-[EmacsApp
fd_handler:](self=<unavailable>, _cmd=<unavailable>, unused=<unavailable>)
at nsterm.m:6156:20 [opt]
    frame #2: 0x00007fff392367b2 Foundation`__NSThread__start__ + 1064
    frame #3: 0x00007fff70e59109 libsystem_pthread.dylib`_pthread_start +
148
    frame #4: 0x00007fff70e54b8b libsystem_pthread.dylib`thread_start + 15
  thread #11, name = 'com.apple.NSEventThread'
    frame #0: 0x00007fff70d95dfa libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x00007fff70d96170 libsystem_kernel.dylib`mach_msg + 60
    frame #2: 0x00007fff36ba4ef5 CoreFoundation`__CFRunLoopServiceMachPort
+ 247
    frame #3: 0x00007fff36ba39c2 CoreFoundation`__CFRunLoopRun + 1319
    frame #4: 0x00007fff36ba2e3e CoreFoundation`CFRunLoopRunSpecific + 462
    frame #5: 0x00007fff33fb6954 AppKit`_NSEventThread + 132
    frame #6: 0x00007fff70e59109 libsystem_pthread.dylib`_pthread_start +
148
    frame #7: 0x00007fff70e54b8b libsystem_pthread.dylib`thread_start + 15
  thread #28
    frame #0: 0x00007fff70e54b68 libsystem_pthread.dylib`start_wqthread
  thread #33
    frame #0: 0x00007fff70d974ce libsystem_kernel.dylib`__workq_kernreturn
+ 10
    frame #1: 0x00007fff70e55aa1 libsystem_pthread.dylib`_pthread_wqthread
+ 390
    frame #2: 0x00007fff70e54b77 libsystem_pthread.dylib`start_wqthread + 15
(lldb)

emacs-repository-version is 8f4b3b812aab62a5a205bc2f8690c3b4c460ba09
-- 
Simon.

[-- Attachment #2: Type: text/html, Size: 12095 bytes --]

  reply	other threads:[~2021-01-19 20:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19  6:44 [emacs-master] Frequent freezes on macOS Pankaj Jangid
2021-01-19  9:28 ` Herbert J. Skuhra
2021-01-19 15:31   ` Pankaj Jangid
2021-01-19 15:39     ` Eli Zaretskii
2021-01-19 17:19       ` Doug Davis
2021-01-19 18:09         ` Philipp Stephani
2021-01-19 20:27           ` Simon Leinen [this message]
2021-01-19 20:41             ` Philipp Stephani
2021-01-20  8:59               ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAO6KgCi_C=xVX=Pz_9L153KiFqsBPZizo1kPc=3ft94a=2S8Q@mail.gmail.com' \
    --to=simon.leinen@gmail.com \
    --cc=ddavis@ddavis.io \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=herbert@gojira.at \
    --cc=p.stephani2@gmail.com \
    --cc=pankaj@codeisgreat.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).