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 21:04:58 +0200 Message-ID: <83r2pi9l0l.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> <83vaeu9mtn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1518980661 1754 195.159.176.226 (18 Feb 2018 19:04:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Feb 2018 19:04:21 +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 20:04:16 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 1enUFv-00088K-9A for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Feb 2018 20:04:11 +0100 Original-Received: from localhost ([::1]:46184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enUHv-0003SF-HI for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Feb 2018 14:06:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enUHo-0003Rh-T0 for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 14:06:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enUHi-0003sn-An for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 14:06:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enUHi-0003sW-3S for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 14:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1enUHh-0001lw-Ok for bug-gnu-emacs@gnu.org; Sun, 18 Feb 2018 14:06: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 19:06: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.15189807236763 (code B ref 30364); Sun, 18 Feb 2018 19:06:01 +0000 Original-Received: (at 30364) by debbugs.gnu.org; 18 Feb 2018 19:05:23 +0000 Original-Received: from localhost ([127.0.0.1]:50147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enUH5-0001l0-5I for submit@debbugs.gnu.org; Sun, 18 Feb 2018 14:05:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enUH2-0001kn-84 for 30364@debbugs.gnu.org; Sun, 18 Feb 2018 14:05:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enUGw-0002wo-2y for 30364@debbugs.gnu.org; Sun, 18 Feb 2018 14:05:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enUGb-0002q8-7d; Sun, 18 Feb 2018 14:04:53 -0500 Original-Received: from [176.228.60.248] (port=1448 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1enUGa-0002SK-ME; Sun, 18 Feb 2018 14:04:53 -0500 In-reply-to: (message from Aaron Jensen on Sun, 18 Feb 2018 10:38:46 -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:143432 Archived-At: > From: Aaron Jensen > Date: Sun, 18 Feb 2018 10:38:46 -0800 > Cc: Noam Postavsky , 30364@debbugs.gnu.org, > Noam Postavsky , Alan Third > > On Sun, Feb 18, 2018 at 10:25 AM, Eli Zaretskii wrote: > > 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. > > FWIW, this happens even if I only have 1 thread active. The benchmark > 100 is just for me to more easily repro it. > > Here's a trace from doing one thread at a time: > > https://gist.github.com/aaronjensen/cb91f0c7f63a28335a9cea3c88037d59 What do you mean by "one thread at a time"? How was your program changed for this run? > > Can you or someone else who knows about Darwin figure out what are the > > limitations on stack space in multithreaded programs on macOS? > > I can probably look into it at some point if you think it is still > relevant given above. It crashes in a deeply recursive GC, so it might be relevant. Can you figure out which object is being marked and causes the exception? > (lldb) frame select 2449 > frame #2449: 0x000000010029a4b7 emacs`Ffuncall + 759 > emacs`Ffuncall: > 0x10029a4b7 <+759>: movq %rax, -0x38(%rbp) > 0x10029a4bb <+763>: jmp 0x10029a528 ; <+872> > 0x10029a4c0 <+768>: movl $0xc1, %edi > 0x10029a4c5 <+773>: movq -0x28(%rbp), %rax > (lldb) p args > error: use of undeclared identifier 'args' > > I'm not seeing sources, so I probably need to figure out how to load symbols. Yes, it looks like you don't have enough of the debug info in the executable.