From wade@archeron.wavefire.com  Thu Aug  1 17:03:49 2002
Return-Path: <wade@archeron.wavefire.com>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E261E37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 Aug 2002 17:03:49 -0700 (PDT)
Received: from archeron.wavefire.com (archeron.wavefire.com [64.141.15.246])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8A17343E6A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 Aug 2002 17:03:49 -0700 (PDT)
	(envelope-from wade@archeron.wavefire.com)
Received: (from root@localhost)
	by archeron.wavefire.com (8.11.6/8.11.6) id g7204Bq00868;
	Thu, 1 Aug 2002 17:04:11 -0700 (PDT)
	(envelope-from wade)
Message-Id: <200208020004.g7204Bq00868@archeron.wavefire.com>
Date: Thu, 1 Aug 2002 17:04:11 -0700 (PDT)
From: Charlie & <root@archeron.wavefire.com>
Reply-To: Charlie & <root@archeron.wavefire.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: libc_r broken. syscall open fails.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41251
>Category:       kern
>Synopsis:       libc_r broken. syscall open fails.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    mini
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 01 17:10:01 PDT 2002
>Closed-Date:    Thu Aug 01 21:20:14 PDT 2002
>Last-Modified:  Thu Aug 01 21:20:14 PDT 2002
>Originator:     Wade Klaver
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
Wavefire Technologies Corporation
>Environment:
System: FreeBSD archeron.wavefire.com 4.6-STABLE FreeBSD 4.6-STABLE #2: Thu Aug 1 13:56:32 PDT 2002 root@archeron.wavefire.com:/usr/src/sys/compile/WORKSTATION i386


	

>Description:
Problem with libc_r.
Compiling using gcc with the -pthread switch yields the following error:

wade@archeron-~:gcc -pthread test.c 
/usr/lib/libc_r.so: undefined reference to `__sys_close'
wade@archeron-~:
	

I have not been able to repeat this problem on my next-newest build:
	FreeBSD ylw.noc.dbitech.bc.ca 4.6-STABLE FreeBSD 4.6-STABLE #0: Mon Jul 15 08:08:23 PDT 2002     root@ylw.noc.dbitech.bc.ca:/usr/src/sys/compile/WORKSTATION  i386

>How-To-Repeat:
	
>Fix:

I have verified this on 3 boxen all cvsup'd today.
Compile the following program with the -pthread switch:

  test.c
----------

main(){}

	

Do not compile re-entrant programs.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->	 robert 
Responsible-Changed-By: marcus 
Responsible-Changed-When: Thu Aug 1 19:18:21 PDT 2002 
Responsible-Changed-Why:  
Over to committer that touched uthread_dup2.c last.  I believe the problem 
can be resolved by changing line 74 of uthread_dup2.c to read: 

_thread_sys_close(ret); 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41251 
Responsible-Changed-From-To: robert->mini 
Responsible-Changed-By: mini 
Responsible-Changed-When: Thu Aug 1 20:57:12 PDT 2002 
Responsible-Changed-Why:  
I'm in the middle of this code right now; I'll fix this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41251 
State-Changed-From-To: open->closed 
State-Changed-By: mini 
State-Changed-When: Thu Aug 1 21:19:58 PDT 2002 
State-Changed-Why:  
Fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41251 
>Unformatted:
