bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30364: 26.0.91; thread crash on macos


From: Eli Zaretskii
Subject: bug#30364: 26.0.91; thread crash on macos
Date: Sun, 18 Feb 2018 22:15:57 +0200

> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sun, 18 Feb 2018 11:49:45 -0800
> Cc: Noam Postavsky <npostavs@gmail.com>, 30364@debbugs.gnu.org, 
>       Noam Postavsky <npostavs@users.sourceforge.net>, Alan Third 
> <alan@idiocy.org>
> 
> I was actually imagining that when a thread needed a GC it would
> request that the GC be done on the main thread (blocking while it
> waits). I have no idea how difficult that would be to implement.

Neither do I.

> > If threads get only 512KB of stack, it's a small wonder that they
> > crash in GC.  IME, you need at least 3MB to endure a full GC in Emacs.
> 
> I upped the required stack size to 5MB and it fixed the crash for me.
> I don't know what the right size should bed, I could go w/ the 3MB you
> call out here, but I went a little higher to be safe. See attached
> patch. I'm assuming that pthread_attr_setstacksize is available
> everywhere pthread is. I don't know if that's an ok assumption or not.

I think for 32-bit Emacs 3MB will do, but 64-bit build might need
more, like 4 or 5.  The MS-Windows build gives each thread the same
amount of stack as for the main program, which means 8MB.

I hope someone who is familiar with pthreads will chime in regarding
the portability issues.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]