From owner-freebsd-bugs Tue Oct 16 1:20: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 06D3237B40C for ; Tue, 16 Oct 2001 01:20:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9G8K0668959; Tue, 16 Oct 2001 01:20:00 -0700 (PDT) (envelope-from gnats) Received: from www.kkcity.com.tw (www.kkcity.com.tw [210.59.230.230]) by hub.freebsd.org (Postfix) with ESMTP id 5725037B407 for ; Tue, 16 Oct 2001 01:17:46 -0700 (PDT) Received: by www.kkcity.com.tw (Postfix, from userid 1001) id 441C5B4654; Tue, 16 Oct 2001 16:16:51 +0800 (CST) Message-Id: <20011016081651.441C5B4654@www.kkcity.com.tw> Date: Tue, 16 Oct 2001 16:16:51 +0800 (CST) From: justin@skysoft.com.tw Reply-To: "justin@skysoft.com.tw" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/31310: pthread broken with KVA_PAGES=512 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31310 >Category: kern >Synopsis: pthread broken with KVA_PAGES=512 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 16 01:20:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Justin Chuang >Release: FreeBSD 4.4-STABLE i386 >Organization: SkySoft Inc. Taiwan >Environment: FreeBSD www.kkcity.com.tw 4.4-RC FreeBSD 4.4-RC #0: Tue Oct 2 14:18:22 CST 2001 root@www.kkcity.com.tw:/usr/src/sys/compile/KKCITY_KERNEL i386 This is not correct version on which the bug occurs, which is 4.4-STABLE #2, I can't boot into that kernel because it's a running server. >Description: KVA_PAGES in kernel config is set to 512, and I had 'make world' to update /usr/lib. When I run any program that use pthread (linked with libc_r), it prints: Fatal error 'Cannot allocate red zone for initial thread' at line ? in file /usr/src/lib/libc_r/uthread/uthread_init.c (errno = ?) Abort trap (core dumped) I didn't have this problem on 4.4-RC0 with ldscript.i386 and pmap.h patched as the following to enlarge kernel address space to 2G. Index: conf/ldscript.i386 =================================================================== RCS file: /home/ncvs/src/sys/conf/ldscript.i386,v retrieving revision 1.4 diff -u -r1.4 ldscript.i386 --- conf/ldscript.i386 2000/01/11 15:35:16 1.4 +++ conf/ldscript.i386 2001/04/02 16:07:18 @@ -6,7 +6,7 @@ SECTIONS { /* Read-only sections, merged into text segment: */ - . = 0xc0100000 + SIZEOF_HEADERS; + . = 0x80100000 + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } Index: i386/include/pmap.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/pmap.h,v retrieving revision 1.70 diff -u -r1.70 pmap.h --- i386/include/pmap.h 2000/11/30 01:53:02 1.70 +++ i386/include/pmap.h 2001/04/02 16:07:18 @@ -92,9 +92,9 @@ #endif #ifndef NKPDE #ifdef SMP -#define NKPDE 254 /* addressable number of page tables/pde's */ +#define NKPDE 510 /* addressable number of page tables/pde's */ #else -#define NKPDE 255 /* addressable number of page tables/pde's */ +#define NKPDE 511 /* addressable number of page tables/pde's */ #endif /* SMP */ #endif >How-To-Repeat: N/A >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message