On 2022/03/18 10:46, Peter N. M. Hansteen wrote:
> Hi,
> 
> After a few years of grumbling over Thunderbird crashing several times a day
> and needing to rebuild indexes for mailboxes, I finally found a login.conf
> setting that helped. With stacksize-cur=32M for staff, Thunderbird has now
> not crashed for the last 2 days and I declare a win.
> 
> Diff for the pkg README follows.
> 
> All the best,
> Peter N. M. Hansteen
> 
> cvs server: Diffing .
> Index: README
> ===================================================================
> RCS file: /cvs/ports/mail/mozilla-thunderbird/pkg/README,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 README
> --- README    11 Mar 2022 19:34:42 -0000      1.2
> +++ README    18 Mar 2022 09:37:05 -0000
> @@ -34,6 +34,29 @@ package.
>  https://support.mozilla.org/en-US/kb/openpgp-thunderbird-howto-and-faq is
> the
>  reference documentation for this feature.
> 
> +Bump sizes in login.conf to avoid out of memory crashes
> +=======================================================
> +
> +Users with large mail boxes have reported crashes with out of memory
> conditions,
> +typically "Failed to allocate NNNNN bytes" messages. Bumping allocation
> limits
> +for the user class used (typically 'staff') can help avoid those problems.
> +
> +A typical login.conf entry would read
> +
> +staff:\
> +     :datasize-cur=8192M:\
> +     :datasize-max=infinity:\
> +     :maxproc-max=512:\
> +     :maxproc-cur=256:\
> +     :stacksize-cur=32M:\
> +     :ignorenologin:\
> +     :requirehome@:\
> +     :tc=default:
> +
> +where in particular setting stacksize-cur to a larger than default value
> seems
> +critical to avoid annoying out of memory crashes.

Can you try some smaller values and see what's really needed?

32MB is huge for a stack. We already have a couple of classes which
default to 8MB stack - do things work for you with that instead?

How much memory (datasize) is actually used? "/bin/time -l thunderbird"
will show "maximum resident set size" after exit.

With other ports and the new /etc/login.conf.d support we are trying
to remove reasons for people to touch this file. It would be better
if the defaults could be changed if more is needed, but 8G/32M seem
a bit high for a default, and I can use thunderbird with reasonably
large, though not huge, mailboxes (16K messages or so) with the
current defaults.

Reply via email to