Bug 89601

Summary: Problems with threading when LD_ASSUME_KERNEL=2.4.20
Product: [Retired] Red Hat Linux Reporter: Terje Røsten <terje.rosten>
Component: pythonAssignee: Mihai Ibanescu <mihai.ibanescu>
Status: CLOSED CANTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 17:58:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
python test script to illustrate the problem none

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:
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 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.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 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> 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 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
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 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.