Your message dated Thu, 21 Oct 2004 11:45:35 +0900
with message-id <[EMAIL PROTECTED]>
and subject line Bug#191395: clone(...) makes defunct threads when linked with pthread
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 30 Apr 2003 09:43:07 +0000
>From [EMAIL PROTECTED] Wed Apr 30 04:43:04 2003
Return-path: <[EMAIL PROTECTED]>
Received: from mailhost.cs.auc.dk [130.225.194.6] (root)
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 19Ao7D-0001pQ-00; Wed, 30 Apr 2003 04:43:03 -0500
Received: from blade48.cs.auc.dk ([EMAIL PROTECTED] [130.225.194.133])
        by mailhost.cs.auc.dk (8.12.3/8.12.3) with ESMTP id h3U9gvVR015261
        for <[EMAIL PROTECTED]>; Wed, 30 Apr 2003 11:42:57 +0200 (MEST)
Date: Wed, 30 Apr 2003 11:42:57 +0200 (MEST)
From: Christian Thomsen <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: clone(...) makes defunct threads when linked with pthread
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 2.14
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-11.7 required=4.0
        tests=BAYES_01,HAS_PACKAGE,USER_AGENT_PINE
        autolearn=ham version=2.53-bugs.debian.org_2003_04_23
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_04_23 
(1.174.2.15-2003-03-30-exp)

Package: libc6-dev
Version: 2.2.5-11.2
Severity: normal



-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux splint 2.4.20 #2 Fri Apr 11 18:38:04 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=C


The problem is that if the c-program below is compiled with gcc 2.95.3:
gcc libc_bug.c -o test
then it makes 10 threads and they function allright!

But if I compile with:
gcc -lpthread libc_bug.c -o test
then the call to clone returns the pid of the child (no error but the
actual thread pid), and the thread is created but is defunct, and the
specified method is never called!!

Now the Really strange part if I compile with:

gcc /usr/lib/libpthread.a libc_bug.c -o test
then it works just fine???


The problem has also been identified on a system using libc-dev 2.2.5-11.5
running kernel 2.4.19

I have degenerated, and tried the below program on a RedHat machine
running kernel 2.4.18 , gcc 2.96 and libc6-dev 2.2.4-13
On this machine there are no problems when linking both dynamic and static
with pthreads......



 //program

#include <sched.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

#define STACK_SIZE      16384

int dummy(void *_arg) {
        int p = *(int*)_arg;
        fprintf(stderr,"Child has pid = %d \n", getpid());
        sleep(100);
        return 0;
}


int main(int argc, char *argv) {
        void *stack;
        int pid;
        int arg;
        int i;
        for (i=0; i<10; i++) {
                //make stack
                stack = malloc(STACK_SIZE);
                //stack grows down
                stack = (void*)((unsigned int)stack + STACK_SIZE);
                arg = i;
                pid = clone(dummy, stack, CLONE_FS | CLONE_FILES | CLONE_VM | 
CLONE_SIGHAND, (void*)&arg);
                fprintf(stderr,"Main created Thread with pid %d \n", pid);
                sleep(1);
        } // end forloop
        while(1) {
                sleep(10);
        }
        return 0;
}








/Christian Thomsen
/DAT 8
/Aalborg Universitet
/Denmark


---------------------------------------
Received: (at 191395-done) by bugs.debian.org; 21 Oct 2004 02:45:36 +0000
>From [EMAIL PROTECTED] Wed Oct 20 19:45:36 2004
Return-path: <[EMAIL PROTECTED]>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CKSxL-0002EG-00; Wed, 20 Oct 2004 19:45:36 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
        by webmasters.gr.jp (Postfix) with ESMTP
        id 0DBA6DECC8; Thu, 21 Oct 2004 11:45:35 +0900 (JST)
Date: Thu, 21 Oct 2004 11:45:35 +0900
Message-ID: <[EMAIL PROTECTED]>
From: GOTO Masanori <[EMAIL PROTECTED]>
To: Christian Thomsen <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: Bug#191395: clone(...) makes defunct threads when linked with pthread
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya)
 FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2
 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

At Wed, 30 Apr 2003 11:42:57 +0200 (MEST),
Christian Thomsen wrote:
> The problem is that if the c-program below is compiled with gcc 2.95.3:
> gcc libc_bug.c -o test
> then it makes 10 threads and they function allright!
> 
> But if I compile with:
> gcc -lpthread libc_bug.c -o test
> then the call to clone returns the pid of the child (no error but the
> actual thread pid), and the thread is created but is defunct, and the
> specified method is never called!!
> 
> Now the Really strange part if I compile with:
> 
> gcc /usr/lib/libpthread.a libc_bug.c -o test
> then it works just fine???
> 
> 
> The problem has also been identified on a system using libc-dev 2.2.5-11.5
> running kernel 2.4.19
> 
> I have degenerated, and tried the below program on a RedHat machine
> running kernel 2.4.18 , gcc 2.96 and libc6-dev 2.2.4-13
> On this machine there are no problems when linking both dynamic and static
> with pthreads......

I confirmed that this bug is fixed in the latest glibc + gcc
environment.  I close this bug.  However, if you think it does not fix
yet, please reopen it and tell me the behavior.

Regards,
-- gotom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to