From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30364: 26.0.91; thread crash on macos Date: Sun, 18 Feb 2018 20:25:56 +0200 Message-ID: <83vaeu9mtn.fsf@gnu.org> References: <87bmgs9y8y.fsf@users.sourceforge.net> <871shj7k0n.fsf@gmail.com> <83k1vbbhvv.fsf@gnu.org> <83inavbg3p.fsf@gnu.org> <83eflic32p.fsf@gnu.org> <83zi469rge.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1518978347 22832 195.159.176.226 (18 Feb 2018 18:25:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Feb 2018 18:25:47 +0000 (UTC) Cc: 30364@debbugs.gnu.org, alan@idiocy.org, npostavs@gmail.com, npostavs@users.sourceforge.net To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 18 19:25:35 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enTeB-0004XU-GW for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Feb 2018 19:25:11 +0100 Original-Received: from localhost ([::1]:46061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enTgD-0002ZL-IF for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Feb 2018 13:27:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enTg2-0002YC-7r for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 13:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enTfy-0000YL-56 for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 13:27:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enTfy-0000YF-2I for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 13:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1enTfx-0000pO-Ta for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 13:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Feb 2018 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30364 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30364-submit@debbugs.gnu.org id=B30364.15189783853125 (code B ref 30364); Sun, 18 Feb 2018 18:27:01 +0000 Original-Received: (at 30364) by debbugs.gnu.org; 18 Feb 2018 18:26:25 +0000 Original-Received: from localhost ([127.0.0.1]:50112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enTfN-0000oL-5h for submit@debbugs.gnu.org; Sun, 18 Feb 2018 13:26:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enTfL-0000o8-3y for 30364@debbugs.gnu.org; Sun, 18 Feb 2018 13:26:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enTfE-0000Ac-Qy for 30364@debbugs.gnu.org; Sun, 18 Feb 2018 13:26:17 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enTer-0008Qx-9L; Sun, 18 Feb 2018 13:25:53 -0500 Original-Received: from [176.228.60.248] (port=1396 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1enTep-0006EF-Bo; Sun, 18 Feb 2018 13:25:52 -0500 In-reply-to: (message from Aaron Jensen on Sun, 18 Feb 2018 09:15:11 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143427 Archived-At: > From: Aaron Jensen > Date: Sun, 18 Feb 2018 09:15:11 -0800 > Cc: Noam Postavsky , 30364@debbugs.gnu.org, > Noam Postavsky , Alan Third > > Thanks, I believe this is the full trace ("bt all" is all of the > threads and "crashing thread" is just the crashing thread): > > https://gist.github.com/aaronjensen/2c765cfd08556f570a5b78b4c5f8e866 Ah, okay. I see I've misinterpreted the reason for the crash: the thread that crashes is the one that does GC. And since GC is deeply recursive, and you have 120 - 26 + 1 = 95 other threads all waiting for the global lock, the first hypothesis I have is that the thread which GCs hits stack overflow, because the other 95 threads use up (or reserve) too much stack space. Can you or someone else who knows about Darwin figure out what are the limitations on stack space in multithreaded programs on macOS? > > For the first issue, you will have to evaluate expressions manually, > > unfortunately, as LLDB doesn't support canned command sequences that > > we define in src/.gdbinit for GDB. You will find some starting point > > here: > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30320#44 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30320#47 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30320#50 > > I couldn't figure out how to do this. Nothing I do puts "args" in > scope, so I'm not sure what I'm doing wrong. You need to make the frame which calls Ffuncall current first. Here's one such frame: frame #2434: 0x000000010029a29e emacs`Ffuncall + 222 You will see in the sources that Ffuncall's first argument is the args[] array. However, since the crash is in GC, it's not important to see the Lisp backtrace, as GC can be triggered by almost any Lisp code.