Your message dated 09 Jan 2001 11:36:58 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#81343: libc thread code problem in Debian Linux 2.2.17, i686
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.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 5 Jan 2001 23:13:00 +0000
>From [EMAIL PROTECTED] Fri Jan 05 17:13:00 2001
Return-path: <[EMAIL PROTECTED]>
Received: from ncar.ucar.edu [192.52.106.6] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 14Eg2d-0005XI-00; Fri, 05 Jan 2001 17:12:59 -0600
Received: from fl-phx.ucar.EDU (fl-phx-1.ucar.edu [128.117.98.3])
        by ncar.UCAR.EDU (8.9.1a/) with ESMTP id QAA14761
        for <[EMAIL PROTECTED]>; Fri, 5 Jan 2001 16:12:59 -0700 (MST)
Received: from rap.rap.ucar.EDU (virga.rap.ucar.edu [128.117.192.15])
        by fl-phx.ucar.EDU (NCAR Local 3/10/98/) with ESMTP id QAA09699
        for <[EMAIL PROTECTED]>; Fri, 5 Jan 2001 16:12:58 -0700 (MST)
Date: Fri, 5 Jan 2001 16:12:58 -0700 (MST)
From: [EMAIL PROTECTED] (Gerry Wiener)
Message-Id: <[EMAIL PROTECTED]>
Received: by rap.rap.ucar.EDU (NCAR Local/ NCAR Mail Server 04/10/90)
        id QAA07827; Fri, 5 Jan 2001 16:12:58 -0700 (MST)
To: [EMAIL PROTECTED]
Subject: libc thread code problem in Debian Linux 2.2.17, i686
Delivered-To: [EMAIL PROTECTED]

Package: base

Linux amber 2.2.17 #1 SMP Thu Sep 7 11:35:24 MDT 2000 i686 unknown

I initially reported the bug below to the Python 2.0 bug list. The
author of Python responded by mentioning that he thinks it is a
problem with the libc thread code. I wanted to make sure the bug was
reported.

        Gerry Wiener    
        National Center for Atmospheric Research
        P.O. Box 3000
        Boulder, Co
        80307-3000

        Phone: (303)497-8417
        FAX:   (303)497-8401
        Email: [EMAIL PROTECTED]




Here's a trivial example along with Python driver code which exhibits
the problem. If the size of array m is decreased, the testsys code
runs correctly under os.system(). Note that testsys1 by itself runs
fine on the same system and also runs fine when executed by system()
within a C program. We worked around this problem by configuring Python
2.0 using  --with-threads=no before doing the build.


--------------------------
testsys.py
--------------------------

#!/usr/bin/env python

import os


print 'testing system'
ret = os.system("testsys")
print 'ret is ', ret


-----------------------
testsys.c 
-----------------------
#include <unistd.h>
#include <stdio.h>

main(int argc, char **argv)
{
  int i;
  int m[1000000];

  for (i=0; i<10; i++)
    {
      sleep(1);
      printf("hello there\n");
    }

}

------------------------------
Output of testsys.py
------------------------------

testing system
ret is  11


-------------------------------------------------------

Date: 2000-Dec-06 11:37
By: gvanrossum

Comment:
Yup. The same problem happens under Linux, too. The C program crashes with a SIGSEGV, 
apparently because it doesn't have enough stack space.

Here's how I decode the s.system() return value:

if ret&0xff:
    print "Killed by signal", ret&0x7f,
    if ret&0x80:
        print "-- core dumped",
    print
else:
    print "Exit status", ret>>8

This prints "Killed by signal 11 -- core dumped" for me.

The bug must be in the libc thread code, which apparently limits the
stack size but doesn't reset the limit in a child process. Here's a
work-around:

ret = os.system("ulimit -s 8192; ./testsys")

I'm closing the bug report, since there's nothing that *Python* can do to avoid this 
problem.


---------------------------------------
Received: (at 81343-done) by bugs.debian.org; 9 Jan 2001 16:36:50 +0000
>From [EMAIL PROTECTED] Tue Jan 09 10:36:49 2001
Return-path: <[EMAIL PROTECTED]>
Received: from (arroz.fake) [64.22.101.122] (postfix)
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 14G1lR-000770-00; Tue, 09 Jan 2001 10:36:49 -0600
Received: from arroz.fake (localhost [127.0.0.1])
        by arroz.fake (Postfix) with ESMTP
        id BAE5293804; Tue,  9 Jan 2001 11:36:58 -0500 (EST)
Sender: [EMAIL PROTECTED]
To: Ben Collins <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], Gerry Wiener <[EMAIL PROTECTED]>
Subject: Re: Bug#81343: libc thread code problem in Debian Linux 2.2.17, i686
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
From: Adam Di Carlo <[EMAIL PROTECTED]>
Date: 09 Jan 2001 11:36:58 -0500
In-Reply-To: Ben Collins's message of "Fri, 5 Jan 2001 20:57:03 -0500"
Message-ID: <[EMAIL PROTECTED]>
Lines: 10
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: [EMAIL PROTECTED]

Ben Collins <[EMAIL PROTECTED]> writes:

> I then went back and tested with a glibc 2.1.3 system (sparc and i386)
> and saw your error results. So, the problem is resolved with the latest
> glibc 2.2.

Ok, closing the bug then.

-- 
.....Adam Di [EMAIL PROTECTED]<URL:http://www.onShore.com/>


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

Reply via email to