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
Created attachment 91284 [details] python test script to illustrate the problem
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?
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!?
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.
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.
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.
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.
Yes, it does. Same problem with 2.4.20-30.9 kernel.
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.