This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [NetBSD] test_socket creates too many locks
Type: behavior Stage:
Components: Tests Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-11-02 14:16 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg305425 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-02 14:16
test_socket creates a lock in the constructor of ThreadSafeCleanupTestCase. But since unittest creates an instance of test class for every test method, it creates around 400 locks. This exceeds the limit of 200 locks in NetBSD 8 and causes a failure.

0:00:00 load avg: 0.00 [1/1] test_socket
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
Traceback (most recent call last):
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/runtest.py", line 176, in runtest_inner
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/test_socket.py", line 5801, in test_main
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/support/__init__.py", line 1934, in run_unittest
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/unittest/loader.py", line 503, in makeSuite
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/unittest/loader.py", line 92, in loadTestsFromTestCase
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/unittest/suite.py", line 24, in __init__
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/unittest/suite.py", line 57, in addTests
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/test_socket.py", line 544, in __init__
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/test_socket.py", line 144, in __init__
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/threading.py", line 86, in RLock
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
RuntimeError: can't allocate lock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/serhiy/py/cpython3.7/Lib/runpy.py", line 193, in _run_module_as_main
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/runpy.py", line 85, in _run_code
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/__main__.py", line 2, in <module>
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/main.py", line 585, in main
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/main.py", line 510, in main
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/main.py", line 536, in _main
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/main.py", line 458, in run_tests
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/main.py", line 379, in run_tests_sequential
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/runtest.py", line 140, in runtest
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/test/libregrtest/runtest.py", line 200, in runtest_inner
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/traceback.py", line 163, in format_exc
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/traceback.py", line 117, in format_exception
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/traceback.py", line 496, in __init__
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/traceback.py", line 357, in extract
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/traceback.py", line 281, in line
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/linecache.py", line 16, in getline
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/linecache.py", line 47, in getlines
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/linecache.py", line 136, in updatecache
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
  File "/home/serhiy/py/cpython3.7/Lib/tokenize.py", line 447, in open
sem_init: Unknown error: 4294967295
sem_init: Unknown error: 4294967295
RuntimeError: can't allocate read lock
msg305659 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-06 17:05
test_socket creates many locks on all platforms.
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76106
2017-11-06 17:05:57serhiy.storchakasetmessages: + msg305659
2017-11-06 17:00:45vstinnersettitle: test_socket creates too many locks -> [NetBSD] test_socket creates too many locks
2017-11-02 22:43:48ppperrysettitle: test_socket creates too much locks -> test_socket creates too many locks
2017-11-02 14:16:30serhiy.storchakacreate