Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.7: test_threading hangs on Solaris #49364

Closed
andreask mannequin opened this issue Jan 30, 2009 · 8 comments
Closed

2.7: test_threading hangs on Solaris #49364

andreask mannequin opened this issue Jan 30, 2009 · 8 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@andreask
Copy link
Mannequin

andreask mannequin commented Jan 30, 2009

BPO 5114
Nosy @terryjreedy
Superseder
  • bpo-6643: Throw away more radioactive locks that could be held across a fork in threading.py
  • Files
  • bug-test_threading-hpux-solaris.log: Out of running test_threading on the affected machines
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2011-06-25.10:43:10.696>
    created_at = <Date 2009-01-30.20:24:52.709>
    labels = ['type-bug', 'tests']
    title = '2.7:  test_threading hangs on Solaris'
    updated_at = <Date 2011-06-25.10:43:10.694>
    user = 'https://bugs.python.org/andreask'

    bugs.python.org fields:

    activity = <Date 2011-06-25.10:43:10.694>
    actor = 'neologix'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-06-25.10:43:10.696>
    closer = 'neologix'
    components = ['Tests']
    creation = <Date 2009-01-30.20:24:52.709>
    creator = 'andreask'
    dependencies = []
    files = ['12898']
    hgrepos = []
    issue_num = 5114
    keywords = []
    message_count = 8.0
    messages = ['80836', '91734', '91735', '93030', '112702', '127050', '135617', '139042']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'gps', 'andreask', 'rogerc', 'iandekit', 'neologix', 'Salman.Ahmed']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '6643'
    type = 'behavior'
    url = 'https://bugs.python.org/issue5114'
    versions = ['Python 2.7']

    @andreask
    Copy link
    Mannequin Author

    andreask mannequin commented Jan 30, 2009

    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.

    @andreask andreask mannequin added the tests Tests in the Lib/test dir label Jan 30, 2009
    @pitrou pitrou added the type-bug An unexpected behavior, bug, or error label Feb 1, 2009
    @rogerc
    Copy link
    Mannequin

    rogerc mannequin commented Aug 19, 2009

    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

    @rogerc
    Copy link
    Mannequin

    rogerc mannequin commented Aug 19, 2009

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

    @rogerc rogerc mannequin changed the title 2.5.4.3 / test_threading hangs 2.5.4.3 and 2.6.2 / test_threading hangs Aug 19, 2009
    @iandekit
    Copy link
    Mannequin

    iandekit mannequin commented Sep 23, 2009

    FWIW it hangs on Solaris 9 also (sparc + x86)

    @terryjreedy
    Copy link
    Member

    Still an issue in 2.7 or 3.1/2?

    @terryjreedy terryjreedy changed the 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 Aug 3, 2010
    @SalmanAhmed
    Copy link
    Mannequin

    SalmanAhmed mannequin commented Jan 25, 2011

    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.

    @terryjreedy terryjreedy changed the title 2.5.4.3 and 2.6.2 / test_threading hangs on Solaris 2.7: test_threading hangs on Solaris Mar 30, 2011
    @neologix
    Copy link
    Mannequin

    neologix mannequin commented May 9, 2011

    Hmm.
    I think this was probably fixed by Gregory in issue bpo-6643 (it's not in Python 2.7.1).
    Could you try with Python 3.2, or a current snapshot?

    @neologix
    Copy link
    Mannequin

    neologix mannequin commented Jun 25, 2011

    I'm closing.
    Feel free to re-open if this fails with 2.7 or 3.2.

    @neologix neologix mannequin closed this as completed Jun 25, 2011
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants