classification
Title: 2.7: test_threading hangs on Solaris
Type: behavior Stage:
Components: Tests Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Throw away more radioactive locks that could be held across a fork in threading.py
View: 6643
Assigned To: Nosy List: Salman.Ahmed, andreask, gps, iandekit, neologix, rogerc, terry.reedy
Priority: normal Keywords:

Created on 2009-01-30 20:24 by andreask, last changed 2011-06-25 10:43 by neologix. This issue is now closed.

Files
File name Uploaded Description Edit
bug-test_threading-hpux-solaris.log andreask, 2009-01-30 20:24 Out of running test_threading on the affected machines
Messages (8)
msg80836 - (view) Author: Andreas Kupries (andreask) Date: 2009-01-30 20:24
On two machines I have seen test_threading hang in ...
HPUX 11.22 ia64,
Solaris 5.8 sparc

The attached file contains the output of running

./apy/bin/python2.5 ./apy/lib/python2.5/test/regrtest.py -v test_threading

on the problematic machines.

It is necessary to kill one of the subprocesses to force forward
progress. A partial output of 'ps -ef' on the HPUX machine is

andreask 26601 26552  0 12:13:50 pts/1     0:00 ./apy/bin/python2.5
./apy/lib/python2.5/test/regrtest.py -v tes
andreask 26657 26601  0 12:14:26 pts/1     0:00
/home/andreask/tmp/autotest/apy/bin/python2.5 -c if 1:^J
andreask 26658 26657  0 12:14:26 pts/1     0:00
/home/andreask/tmp/autotest/apy/bin/python2.5 -c if 1:^J

And I usually kill the bottom most process.
msg91734 - (view) Author: Roger Collins (rogerc) Date: 2009-08-19 15:44
I can confirm the same exact issue exists in python2.6 on:
Solaris 5.8 sparc

Killing the bottom process worked for me as well
msg91735 - (view) Author: Roger Collins (rogerc) Date: 2009-08-19 16:20
Platform: Solaris 5.8 sparc
Compiler: gcc version 4.2.4

make test reported back the following on the initial test:
test test_threading failed -- Traceback (most recent call last):
  File
"/tools/webapps/local/src/Python-2.6.2/Lib/test/test_threading.py", line
419, in test_3_join_in_forked_from_thread
    self._run_and_join(script)
  File
"/tools/webapps/local/src/Python-2.6.2/Lib/test/test_threading.py", line
355, in _run_and_join
    self.assertEqual(data, "end of main\nend of thread\n")
AssertionError: '' != 'end of main\nend of thread\n'

**********

Same type of issue further on in the testing:

test_1_join_on_shutdown (test.test_threading.ThreadJoinOnShutdown) ... ok
test_2_join_in_forked_process (test.test_threading.ThreadJoinOnShutdown)
... ok
test_3_join_in_forked_from_thread
(test.test_threading.ThreadJoinOnShutdown) ... 
<hangs here>

$ ps -ef | grep -i 'python'
 xuserx 24669 17424  0 11:36:01 pts/18   5:44 ./python -E -tt
./Lib/test/regrtest.py -l
 xuserx 27539 27528  0 12:00:29 pts/18   0:00
/tools/webapps/local/src/Python-2.6.2/python -c if 1:            import
sys, o
 xuserx 27528 24669  0 12:00:28 pts/18   0:00
/tools/webapps/local/src/Python-2.6.2/python -c if 1:            import
sys, o
 xuserx 27660 29318  0 12:07:16 pts/18   0:00 grep -i python
$ kill 27539
<test continues then reports:>
test_3_join_in_forked_from_thread
(test.test_threading.ThreadJoinOnShutdown) ... FAIL

======================================================================
FAIL: test_3_join_in_forked_from_thread
(test.test_threading.ThreadJoinOnShutdown)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/tools/webapps/local/src/Python-2.6.2/Lib/test/test_threading.py", line
419, in test_3_join_in_forked_from_thread
    self._run_and_join(script)
  File
"/tools/webapps/local/src/Python-2.6.2/Lib/test/test_threading.py", line
355, in _run_and_join
    self.assertEqual(data, "end of main\nend of thread\n")
AssertionError: '' != 'end of main\nend of thread\n'

I'll keep digging and see if I can find a solution, but know that while
I have extensive programming experience in other languages, I have none
in python (yet).
msg93030 - (view) Author: Ian Donaldson (iandekit) Date: 2009-09-23 07:23
FWIW it hangs on Solaris 9 also (sparc + x86)
msg112702 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-08-03 22:03
Still an issue in 2.7 or 3.1/2?
msg127050 - (view) Author: Salman Ahmed (Salman.Ahmed) Date: 2011-01-25 20:56
Yes, this problem persists on Solaris 9 (SPARC) even with Python 2.7.1.
The problematic processes are:

ssahmed@blade:[~]$ ps -ef|grep -i python
 ssahmed   480   418  0 15:30:25 pts/1    9:14 ./python -Wd -3 -E -tt ./Lib/test/regrtest.py -l
 ssahmed  3062   480  0 15:43:22 pts/1    0:00 /space/home/ssahmed/Python-2.7.1/python -c if 1:            import sys, os, ti
 ssahmed  3063  3062  0 15:43:22 pts/1    0:00 /space/home/ssahmed/Python-2.7.1/python -c if 1:            import sys, os, ti

I was able to workaround the problem by killing the bottom-most process in the list.
msg135617 - (view) Author: Charles-Fran├žois Natali (neologix) * (Python committer) Date: 2011-05-09 17:35
Hmm.
I think this was probably fixed by Gregory in issue #6643 (it's not in Python 2.7.1).
Could you try with Python 3.2, or a current snapshot?
msg139042 - (view) Author: Charles-Fran├žois Natali (neologix) * (Python committer) Date: 2011-06-25 10:43
I'm closing.
Feel free to re-open if this fails with 2.7 or 3.2.
History
Date User Action Args
2011-06-25 10:43:10neologixsetstatus: open -> closed
resolution: duplicate
superseder: Throw away more radioactive locks that could be held across a fork in threading.py
messages: + msg139042
2011-05-09 17:35:45neologixsetnosy: + neologix
messages: + msg135617
2011-03-30 20:40:57terry.reedysettitle: 2.5.4.3 and 2.6.2 / test_threading hangs on Solaris -> 2.7: test_threading hangs on Solaris
2011-01-25 20:56:48Salman.Ahmedsetnosy: + Salman.Ahmed
messages: + msg127050
2010-08-03 22:03:39terry.reedysetnosy: + terry.reedy
title: 2.5.4.3 and 2.6.2 / test_threading hangs -> 2.5.4.3 and 2.6.2 / test_threading hangs on Solaris
messages: + msg112702

versions: + Python 2.7, - Python 2.6, Python 2.5
2009-09-23 07:23:00iandekitsetnosy: + iandekit
messages: + msg93030
2009-08-19 16:42:30rogercsettitle: 2.5.4.3 / test_threading hangs -> 2.5.4.3 and 2.6.2 / test_threading hangs
2009-08-19 16:20:37rogercsetmessages: + msg91735
2009-08-19 15:44:15rogercsetnosy: + rogerc

messages: + msg91734
versions: + Python 2.6
2009-02-01 18:02:03pitrousetpriority: normal
nosy: + gps
type: behavior
2009-01-30 20:24:52andreaskcreate