Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 16:16:51 +0800 (CST)
From:      justin@skysoft.com.tw
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/31310: pthread broken with KVA_PAGES=512
Message-ID:  <20011016081651.441C5B4654@www.kkcity.com.tw>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016081651.441C5B4654>