* Stack size limits too low, XEmacs crashes
@ 2000-04-06 16:59 Johannes Nix
2000-04-08 18:59 ` David Huggins-Daines
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Nix @ 2000-04-06 16:59 UTC (permalink / raw)
To: axp-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Stack size limits too low, XEmacs crashes
2000-04-06 16:59 Stack size limits too low, XEmacs crashes Johannes Nix
@ 2000-04-08 18:59 ` David Huggins-Daines
0 siblings, 0 replies; 2+ messages in thread
From: David Huggins-Daines @ 2000-04-08 18:59 UTC (permalink / raw)
To: axp-list
Johannes Nix <jnix@medi.physik.uni-oldenburg.de> writes:
> 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 you really want to set them systemwide, the best thing to do is to
create an /etc/initscript which sets them (see `man 5 initscript').
Then anything started by init (i.e. everything) will inherit whatever
limits or environment variables you set there.
/etc/security/limits.conf is useful for setting non-systemwide limits,
such as if you wanted to have different limits for different users or
groups.
> If my assumption matches the true cause for the problem,
> it would seem reasonable that distributors increase stack
> size limits for the alpha.
Hm, interesting. I don't know where the default limits are set,
perhaps in the bash configuration process?
> Would you agree about this ? Why might a program need more
> stack when running on the alpha?
Well, pointers are 8 bytes wide, and a lot of pointers tend to live on
the stack. I think the stack frame format on the Alpha is a bit more
complex than on other architectures, too.
--
David Huggins-Daines, Senior Linux Consultant, Linuxcare, Inc.
613.562.1239 desk, 613.223.0225 mobile
dhd@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-08 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-06 16:59 Stack size limits too low, XEmacs crashes Johannes Nix
2000-04-08 18:59 ` David Huggins-Daines
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox