[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#212697: marked as done (static linking with lpthread and system call causes crash)



Your message dated Fri, 05 Aug 2005 19:15:42 +0900
with message-id <[🔎] 81psssu1td.wl%gotom@debian.or.jp>
and subject line Close bugs tagged as woody
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; 25 Sep 2003 11:47:11 +0000
>From info@beemotechnologie.com Thu Sep 25 06:46:43 2003
Return-path: <info@beemotechnologie.com>
Received: from (linnov.marseille-innov.org) [212.234.120.11] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A2Ua2-000307-00; Thu, 25 Sep 2003 06:46:43 -0500
Received: from beemotechnologie.com (beemo-3.marseille-innov.org [212.234.120.37])
	by linnov.marseille-innov.org (8.11.6/8.9.3) with ESMTP id h8PBwmn10392
	for <submit@bugs.debian.org>; Thu, 25 Sep 2003 13:58:48 +0200
Message-ID: <3F72D5F4.9090907@beemotechnologie.com>
Date: Thu, 25 Sep 2003 13:48:04 +0200
From: Beemo Informations <info@beemotechnologie.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: submit@bugs.debian.org
Subject: static linking with lpthread and system call causes crash
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-2.2 required=4.0
	tests=BAYES_60,HAS_PACKAGE,RCVD_IN_NJABL,RCVD_IN_RELAYS_ORDB_ORG,
	      X_NJABL_OPEN_PROXY
	version=2.53-bugs.debian.org_2003_9_21
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_9_21 (1.174.2.15-2003-03-30-exp)

Package: libc6-dev
Version: 2.2.5-11.2

Description: a system function call within a pthread (when statically 
linked) ends the program but leaves the processus zombified
The same problem does not occur on unstable systems (with libc6 2.3.2-4)

Here is a test program that demonstrates the problem, it consists of a 
main function which calls ThreadFunction which itself calls system(const 
char*).

/* test.c */
#include <stdlib.h>
#include <pthread.h>
#include <stdio.h>

void* ThreadFunction(void* arg)
{
    printf("Thread Started\n");

    system("ls -l");

    printf("Thread Stopping\n");

    return NULL;
}

int main(int argc, char** argv)
{
    pthread_t thread;
    void* result;
   
    pthread_create(&thread, NULL, ThreadFunction, NULL);

    pthread_join(thread, &result);

    return 0;
}
/* END test.c

example of dynamic linking:
# gcc test.c -lpthread -o test
# ldd test
    libpthread.so.0 => /lib/lipthread.so (0x40017000)
    libc.so.6 => /lib/libc.so.6 (0x4002b000)
    /lib/ld-linux.so.2 => (0x40000000)
# ./test
    Thread Started
    ... (output of ls -l)
    Thread Stopping
// CORRECT BEHAVIOUR

example of static linkinkg:
# gcc test.c -static -lpthread -o test
# ldd test
    not a dynamic executable
# ./test
    Thread Started
# ps aux | grep test
    root   20027   0.0   0.1   2548   160 pts/1   S   13:26   ./test
    root   20028   0.0   0.1   2548   160 pts/1   S   13:26   ./test

// after launching ./test, Thread Started is printed out, but the 
command prompt shows up immediately and ps sees the processus still running.

if i do this on a machine running 2.3.2-4 or gentoo using  2.3.2 as 
well, the problem does not occur...
i used diiferent compilers with no noticeable change:
# dpkg -l gcc*
    ii gcc-2.95   2.95.4-7
    ii gcc-3.0   3.0.4-7

is this a bug?
is this backportable from the 2.3 series?

oh by the way, uname -a shows 2.4.18-586tsc but fails as well on 2.4.21 
(homemade) and 2.4.22 (gentoo).

Severity: unknown (annoying to me)


have a nice day,

Gabriel Biberian


---------------------------------------
Received: (at 212697-done) by bugs.debian.org; 5 Aug 2005 10:15:49 +0000
>From gotom@debian.or.jp Fri Aug 05 03:15:49 2005
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1E0zEy-0001Gb-00; Fri, 05 Aug 2005 03:15:49 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP id B0A5CDEB83;
	Fri,  5 Aug 2005 19:15:42 +0900 (JST)
Date: Fri, 05 Aug 2005 19:15:42 +0900
Message-ID: <[🔎] 81psssu1td.wl%gotom@debian.or.jp>
From: GOTO Masanori <gotom@debian.org>
To: 153263-done@bugs.debian.org, 121396-done@bugs.debian.org,
	142379-done@bugs.debian.org, 153762-done@bugs.debian.org,
	159411-done@bugs.debian.org, 165760-done@bugs.debian.org,
	169758-done@bugs.debian.org, 173486-done@bugs.debian.org,
	194339-done@bugs.debian.org, 196291-done@bugs.debian.org,
	248271-done@bugs.debian.org, 294903-done@bugs.debian.org,
	165921-done@bugs.debian.org, 205039-done@bugs.debian.org,
	294483-done@bugs.debian.org, 240608-done@bugs.debian.org,
	245029-done@bugs.debian.org, 295618-done@bugs.debian.org,
	156937-done@bugs.debian.org, 161515-done@bugs.debian.org,
	188843-done@bugs.debian.org, 212697-done@bugs.debian.org,
	247223-done@bugs.debian.org, 250055-done@bugs.debian.org,
	262162-done@bugs.debian.org, 290518-done@bugs.debian.org,
	188589-done@bugs.debian.org, 209095-done@bugs.debian.org,
	debian-glibc@lists.debian.org
Subject: Close bugs tagged as woody
User-Agent: Wanderlust/2.11.30 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 212697-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 18

These bugs are tagged as woody, because they're well-known problems
and for keeping open to come to light what the problem is.  However,
as you know, sarge was released.  Our stable version was moved from
woody to sarge.  It's high time to close old woody's bugs that are
still open.  Now I close these bugs.  If you have any objections to
close them, please reopen and let us know your trouble.

Regards,
-- gotom



Reply to: