Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Johannes Nix <jnix@medi.physik.uni-oldenburg.de>
To: axp-list@redhat.com
Subject: Stack size limits too low, XEmacs crashes
Date: Thu, 6 Apr 2000 18:59:16 +0200	[thread overview]
Message-ID: <20000406185916.A943@medi.physik.uni-oldenburg.de> (raw)

This is a problem which perhaps should be put in the 
AlphaLinux FAQ. Excuse if it perhaps was discussed already.

I observed that XEmacs crashed apparently doing certain
regexp matches. I got to extract a BibTeX record which 
crashes XEmacs safely.

A similar, perhaps the same problem has been observed
for XEmacs under OSF/1, which has only a 2MB stack. 
As one XEmacs maintainer commented: "Please check the
ulimits for your stacksize. There seems to be a trend 
on 64-bit OS to set it ridiculously low."

Although it is not confirmed completely, the problem
really seems to be a stack overflow, because if I increase
the stack limit XEmacs runs as always. (The standard stack
size limit for my distribution is 8MB.) The problem may be 
triggered by the use  of the alloca() function in the XEmacs 
regexp matching code.

Other people have observed similar problems under Alpha Linux
with different software.

The quick check is to become root, issue 

ulimit -s 32768

(or whatever value in kB), su to a user shell and start the
program in question again.

To get higher limits by default, it seems necessary to write them
in /etc/security/limits.conf, and also to set them with
the ulimit shell command in the startup scripts for the
daemons like sshd or atd. Stack limits are inherited by
the parent processes and so each parent daemon has to 
be restarted.

If my assumption matches the true cause for the problem, 
it would seem reasonable that distributors increase stack 
size limits for the alpha.

Would you agree about this ? Why might a program need more
stack when running on the alpha?


Johannes


             reply	other threads:[~2000-04-06 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-06 16:59 Johannes Nix [this message]
2000-04-08 18:59 ` Stack size limits too low, XEmacs crashes David Huggins-Daines
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox