From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 16424 invoked from network); 6 Apr 2000 16:59:26 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 6 Apr 2000 16:59:26 -0000 Received: from mailsrvc.hrz.uni-oldenburg.de (mailsrvc.hrz.uni-oldenburg.de [134.106.87.10]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA08998 for ; Thu, 6 Apr 2000 12:59:25 -0400 Received: from garp.physik.uni-oldenburg.de (garp.physik.uni-oldenburg.de [134.106.111.15]) by mailsrvc.hrz.uni-oldenburg.de (8.10.0/8.10.0/05.04.2000) with ESMTP id e36GxKn20866 for ; Thu, 6 Apr 2000 18:59:20 +0200 Received: from mizar.physik.uni-oldenburg.de (mizar [134.106.163.145]) by garp.physik.uni-oldenburg.de (8.9.3/8.9.3/29.03.1999) with ESMTP id SAA24205 for ; Thu, 6 Apr 2000 18:59:20 +0200 Received: (from jnix@localhost) by mizar.physik.uni-oldenburg.de (8.9.3/8.9.3/29.03.1999) id SAA01146 for axp-list@redhat.com; Thu, 6 Apr 2000 18:59:16 +0200 Date: Thu, 6 Apr 2000 18:59:16 +0200 From: Johannes Nix To: axp-list@redhat.com Subject: Stack size limits too low, XEmacs crashes Message-ID: <20000406185916.A943@medi.physik.uni-oldenburg.de> Mail-Followup-To: axp-list@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i 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