Bug 89601 - Problems with threading when LD_ASSUME_KERNEL=2.4.20
Summary: Problems with threading when LD_ASSUME_KERNEL=2.4.20
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
(Show other bugs)
Version: 9
Hardware: i386 Linux
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-24 20:57 UTC by Terje Røsten
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-30 17:58:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
python test script to illustrate the problem (2.18 KB, text/plain)
2003-04-24 21:02 UTC, Terje Røsten
no flags Details

Description Terje Røsten 2003-04-24 20:57:18 UTC
A small pygtk2 app I wrote is broken in Red Hat 9, however works
when LD_ASSUME_KERNEL=2.4.19 is added.

I tracked the problem down to a piece of code I had taken from The
Python Cookbook, the recipe is located here:
( Capturing the output and error streams from a unix shell command )

I have written a stripped down test script to demonstrate the problem:

$ LD_ASSUME_KERNEL=2.4.20 python   test_script.py
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 408, in __bootstrap
  File "myselect.py", line 73, in run
    a = getCommandOutput(self.command)
  File "myselect.py", line 43, in getCommandOutput
    err = child.wait()
  File "/usr/lib/python2.2/popen2.py", line 87, in wait
    pid, sts = os.waitpid(self.pid, 0)
OSError: [Errno 10] No child processes

$ LD_ASSUME_KERNEL=2.4.19 python   test_script.py

$ rpm -q glibc python
$ uname -r    

Comment 1 Terje Røsten 2003-04-24 21:02:18 UTC
Created attachment 91284 [details]
python test script to illustrate the problem

Comment 2 Mihai Ibanescu 2003-04-29 18:50:59 UTC
Can you please get the latest kernel and glibc packages (issued as errata for
Red Hat 9) and check to see if the problem is still there?

Comment 3 Terje Røsten 2003-04-29 20:21:35 UTC
OK - thanks for the hint.

I have tried these combinations:

glibc        kernel             status
[On RH 9]
2.3.2-27.9   2.4.20-9           failed   2.4.20-1.1976      ok

[On RH Rawhide]
2.3.2-33.9   2.4.20-9           failed
2.3.2-33.9   2.4.20-1.1976      ok
2.3.2-33.9   2.5.66             failed
2.3.2-33.9   2.5.68-bk-current  failed
2.3.2-33.9   2.4.21-pre3-ac4    ok

Seems in fact to be a kernel issue!?

Comment 4 Mihai Ibanescu 2003-04-29 21:12:42 UTC
Looks like it. When you set LD_ASSUME_KERNEL you are using the old-style threads
as opposed to NPTL; I know there were some bugs related to NPTL that were fixed,
or about to be fixed.

Comment 5 Terje Røsten 2003-04-30 06:56:13 UTC
Yes, I known about the LD_ASSUME_KERNEL variable. When set to 2.4.20 or newer
NPTL is used.

From changelog in glibc.spec:

* Thu Feb 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-45

- update from CVS
- include also linuxthreads FLOATING_STACKS libs on i686 and athlon:
  later is NPTL

(I guess this information is still valid?)

I will test new glibc and/or kernel packages when they are released.

Comment 6 Terje Røsten 2003-08-29 15:09:15 UTC
I just tried the new Python-2.3 tarball from www.python.org and now it 
works with NPTL enabled. 
Versions are:
$ rpm -q glibc kernel
I built Python on the same system.

With python-2.2.2-26 it is no working.
So now I want python-2.3 in Red Hat Linux asap.

Comment 7 Mihai Ibanescu 2004-04-12 19:42:05 UTC
Fedora ships with python 2.3.3 now.
I'd be curious to know though if it still happens with the latest
kernel packages for Red Hat Linux 9.

Comment 8 Terje Røsten 2004-04-13 12:21:58 UTC
Yes, it does. Same problem with 2.4.20-30.9 kernel.

Comment 9 Mihai Ibanescu 2005-09-30 17:58:58 UTC
Since there are insufficient details provided in this report for us to
investigate the issue further, and we have not received the feedback we
requested, we will assume the problem was not reproduceable or has been fixed in
a later update for this product.

Note You need to log in before you can comment on or make changes to this bug.