From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2259 invoked by alias); 16 Dec 2003 20:02:30 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 2243 invoked from network); 16 Dec 2003 20:02:30 -0000 Received: from unknown (HELO palrel10.hp.com) (156.153.255.245) by sources.redhat.com with SMTP; 16 Dec 2003 20:02:30 -0000 Received: from hplms2.hpl.hp.com (hplms2.hpl.hp.com [15.0.152.33]) by palrel10.hp.com (Postfix) with ESMTP id 295F11C010A9 for ; Tue, 16 Dec 2003 12:02:30 -0800 (PST) Received: from napali.hpl.hp.com (napali.hpl.hp.com [15.4.89.123]) by hplms2.hpl.hp.com (8.12.10/8.12.10/HPL-PA Hub) with ESMTP id hBGK2TrN011035 for ; Tue, 16 Dec 2003 12:02:29 -0800 (PST) Received: from napali.hpl.hp.com (napali [127.0.0.1]) by napali.hpl.hp.com (8.12.9/8.12.9/Debian-5) with ESMTP id hBGK2TVR003190 for ; Tue, 16 Dec 2003 12:02:29 -0800 Received: (from davidm@localhost) by napali.hpl.hp.com (8.12.9/8.12.9/Debian-5) id hBGK2TGM003186; Tue, 16 Dec 2003 12:02:29 -0800 Date: Tue, 16 Dec 2003 20:02:00 -0000 From: David Mosberger Message-Id: <200312162002.hBGK2TGM003186@napali.hpl.hp.com> To: libc-hacker@sources.redhat.com Subject: Emacs dired problem triggered by NPTL-enabled glibc X-URL: http://www.hpl.hp.com/personal/David_Mosberger/ Reply-To: davidm@hpl.hp.com X-SW-Source: 2003-12/txt/msg00067.txt.bz2 On Debian/testing, I noticed that I can no longer load a directory via dired. The root-cause of the problem appears to be that Emacs uses setrlimit() to set RLIMIT_STACK. This limit won't be page-size-aligned in general. As a result, whenever Emacs ends up spawning a subprocess for an executable that uses NPTL, the subprocess fails with an error like this: init.c:259: __pthread_initialize_minimal_internal: Assertion `__default_stacksize % __sysconf (_SC_PAGESIZE) == 0' failed. __default_stacksize is initialized like this: #ifdef NEED_SEPARATE_REGISTER_STACK __default_stacksize = MAX (limit.rlim_cur / 2, PTHREAD_STACK_MIN); #else __default_stacksize = MAX (limit.rlim_cur, PTHREAD_STACK_MIN); #endif An easy workaround is to start Emacs with LD_ASSUME_KERNEL=2.4.18. As far as I know, there is no requirement that the RLIMIT_STACK limit must be an integer-multiple of the page size (and certainly it doesn't have an integer-multiple of _twice_ the page-size), so it would seem to me that this is a bug in glibc? --david