Bug 89601 - Problems with threading when LD_ASSUME_KERNEL=2.4.20
Problems with threading when LD_ASSUME_KERNEL=2.4.20
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-24 16:57 EDT by Terje Røsten
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-30 13:58:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 17:02 EDT, Terje Røsten
no flags Details

  None (edit)
Description Terje Røsten 2003-04-24 16:57:18 EDT
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:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52296
( 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
    self.run()
  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
glibc-2.3.2-27.9
python-2.2.2-26
$ uname -r    
2.4.20-9
Comment 1 Terje Røsten 2003-04-24 17:02:18 EDT
Created attachment 91284 [details]
python test script to illustrate the problem
Comment 2 Mihai Ibanescu 2003-04-29 14:50:59 EDT
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 16:21:35 EDT
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.3.2.27.9   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 17:12:42 EDT
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 02:56:13 EDT
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:
  LD_ASSUME_KERNEL=2.2.5 to LD_ASSUME_KERNEL=2.4.0 is non-FLOATING_STACKS lt,
  LD_ASSUME_KERNEL=2.4.1 to LD_ASSUME_KERNEL=2.4.19 is FLOATING_STACKS lt,
  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 11:09:15 EDT
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
glibc-2.3.2-27.9
kernel-2.4.20-20.9
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 15:42:05 EDT
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 08:21:58 EDT
Yes, it does. Same problem with 2.4.20-30.9 kernel.
Comment 9 Mihai Ibanescu 2005-09-30 13:58:58 EDT
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.