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

Am Di., 19. Jan. 2021 um 18:40 Uhr schrieb Doug Davis <ddavis@ddavis.io>:
>
> I've been able to reproduce the crash.
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Can you attach a debugger to Emacs when it freezes, and show the
> > C-level backtrace?
>
> Here's my novice debugger attempt (apologies if it's not helpful); first
> after compiling with -O3 -g3:
>
> ddavis@charm ~/software/repos/emacs (HEAD detached at 8f0ce42d3e) $ lldb src/emacs
> (lldb) target create "src/emacs"
> Current executable set to '/Users/ddavis/software/repos/emacs/src/emacs' (arm64).
> (lldb) run
> Process 28189 launched: '/Users/ddavis/software/repos/emacs/src/emacs' (arm64)
> 2021-01-19 11:30:20.006114-0500 emacs[28189:1400131] fopen failed for data file: errno = 2 (No such file or directory)
> 2021-01-19 11:30:20.006128-0500 emacs[28189:1400131] Errors found! Invalidating cache...
> Process 28189 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGTERM
>     frame #0: 0x000000018cc708d0 libsystem_kernel.dylib`read + 8
> libsystem_kernel.dylib`read:
> ->  0x18cc708d0 <+8>:  b.lo   0x18cc708f0               ; <+40>
>     0x18cc708d4 <+12>: pacibsp
>     0x18cc708d8 <+16>: stp    x29, x30, [sp, #-0x10]!
>     0x18cc708dc <+20>: mov    x29, sp
> Target 0: (emacs) stopped.
> (lldb) bt
> Process 28189 exited with status = 0 (0x00000000) Terminated due to signal 9
> warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGTERM
>   * frame #0: 0x000000018cc708d0 libsystem_kernel.dylib`read + 8
>     frame #1: 0x00000001000de1c8 emacs`emacs_read [inlined] emacs_intr_read(fd=17, buf=0x000000016fdfbb3f, nbyte=<no summary available>, interruptible=<no summary available>) at sysdep.c:2486:16 [opt]
>     frame #2: 0x00000001000de1b8 emacs`emacs_read(fd=<no summary available>, buf=<unavailable>, nbyte=<no summary available>) at sysdep.c:2500 [opt]
>
> and after compiling with -O0 -g3:
>
> ddavis@charm ~/software/repos/emacs (HEAD detached at 8f0ce42d3e) $ lldb src/emacs
> (lldb) target create "src/emacs"
> Current executable set to '/Users/ddavis/software/repos/emacs/src/emacs' (arm64).
> (lldb) run
> Process 60350 launched: '/Users/ddavis/software/repos/emacs/src/emacs' (arm64)
> Process 60350 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGTERM
>     frame #0: 0x000000018cc708d0 libsystem_kernel.dylib`read + 8
> libsystem_kernel.dylib`read:
> ->  0x18cc708d0 <+8>:  b.lo   0x18cc708f0               ; <+40>
>     0x18cc708d4 <+12>: pacibsp
>     0x18cc708d8 <+16>: stp    x29, x30, [sp, #-0x10]!
>     0x18cc708dc <+20>: mov    x29, sp
> Target 0: (emacs) stopped.
> (lldb) thread list
> Process 60350 stopped
> * thread #1: tid = 0x1764c3, 0x000000018cc708d0 libsystem_kernel.dylib`read + 8, queue = 'com.apple.main-thread', stop reason = signal SIGTERM
>   thread #4: tid = 0x1764f7, 0x000000018cc77e04 libsystem_kernel.dylib`poll + 8, name = 'gmain'
>   thread #5: tid = 0x176508, 0x000000018cc7a0e8 libsystem_kernel.dylib`__select + 8
>   thread #6: tid = 0x176520, 0x000000018cc6fce8 libsystem_kernel.dylib`mach_msg_trap + 8, name = 'com.apple.NSEventThread'
>   thread #36: tid = 0x178ca1, 0x000000018cc719c4 libsystem_kernel.dylib`__workq_kernreturn + 8
>   thread #38: tid = 0x1790f4, 0x000000018cc719c4 libsystem_kernel.dylib`__workq_kernreturn + 8
> (lldb) thread backtrace all
> Process 60350 exited with status = 0 (0x00000000) Terminated due to signal 9
> warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
> * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGTERM
>   * frame #0: 0x000000018cc708d0 libsystem_kernel.dylib`read + 8
>     frame #1: 0x0000000100170254 emacs`emacs_intr_read(fd=17, buf=<unavailable>, nbyte=<no summary available>, interruptible=<no summary available>) at sysdep.c:2486:16

This backtrace looks surprisingly short, and I'm wondering why the
arguments got optimized out even with -O0?
Any chance you could produce a longer backtrace?

I'm also trying to reproduce this, but haven't had any luck so far.

>   thread #4, name = 'gmain'
>     frame #0: 0xffffffffffffffff
>   thread #5
>     frame #0: 0xffffffffffffffff
>   thread #6, name = 'com.apple.NSEventThread'
>     frame #0: 0xffffffffffffffff
>   thread #36
>     frame #0: 0xffffffffffffffff
>   thread #38
>     frame #0: 0xffffffffffffffff
>



  reply	other threads:[~2021-01-19 18:09 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 [this message]
2021-01-19 20:27           ` Simon Leinen
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='CAArVCkQiWhA+cB=Z_hzvO+ZrN3qWKzG62FG8=Tzxxo+petVKcw@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=ddavis@ddavis.io \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=herbert@gojira.at \
    --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).