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

Bug#81343: marked as done (libc thread code problem in Debian Linux 2.2.17, i686)

Your message dated 09 Jan 2001 11:36:58 -0500
with message-id <oa66jolm1h.fsf@arroz.fake>
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 wiener@rap.ucar.edu Fri Jan 05 17:13:00 2001
Return-path: <wiener@rap.ucar.edu>
Received: from ncar.ucar.edu [] 
	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 [])
        by ncar.UCAR.EDU (8.9.1a/) with ESMTP id QAA14761
        for <submit@bugs.debian.org>; Fri, 5 Jan 2001 16:12:59 -0700 (MST)
Received: from rap.rap.ucar.EDU (virga.rap.ucar.edu [])
        by fl-phx.ucar.EDU (NCAR Local 3/10/98/) with ESMTP id QAA09699
        for <submit@bugs.debian.org>; Fri, 5 Jan 2001 16:12:58 -0700 (MST)
Date: Fri, 5 Jan 2001 16:12:58 -0700 (MST)
From: wiener@rap.ucar.EDU (Gerry Wiener)
Message-Id: <200101052312.QAA07827@rap.rap.ucar.EDU>
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: submit@bugs.debian.org
Subject: libc thread code problem in Debian Linux 2.2.17, i686
Delivered-To: submit@bugs.debian.org

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

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

	Phone: (303)497-8417
	FAX:   (303)497-8401
	Email: gerry@ucar.edu

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.


#!/usr/bin/env python

import os

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

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

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

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


Output of testsys.py

testing system
ret is  11


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

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 "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

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 adam@onshore.com Tue Jan 09 10:36:49 2001
Return-path: <adam@onshore.com>
Received: from (arroz.fake) [] (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 [])
	by arroz.fake (Postfix) with ESMTP
	id BAE5293804; Tue,  9 Jan 2001 11:36:58 -0500 (EST)
Sender: apharris@burrito.onshore.com
To: Ben Collins <bcollins@debian.org>
Cc: 81343-done@bugs.debian.org, Gerry Wiener <wiener@rap.ucar.EDU>
Subject: Re: Bug#81343: libc thread code problem in Debian Linux 2.2.17, i686
References: <200101052312.QAA07827@rap.rap.ucar.EDU>
From: Adam Di Carlo <adam@onshore.com>
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: <oa66jolm1h.fsf@arroz.fake>
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: 81343-done@bugs.debian.org

Ben Collins <bcollins@debian.org> 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 Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>

Reply to: