Bug 1569933

Summary: ValueError: signal number 32 out of range
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python3Assignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, cstratak, dmalcolm, mcyprian, mhroncok, pviktori, rkuska, shcherbina.iryna, tomspur, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python37-3.7.0-0.16.b3.fc29, python3-3.6.5-4.fc29, python35-3.5.5-2.fc29, python34-3.4.8-3.fc29, python33-3.3.7-7.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-24 11:08:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Miro Hrončok 2018-04-20 10:31:47 UTC
Description of problem:
When the following test run, they hang the build:

  test_multiprocessing_fork
  test_multiprocessing_forkserver
  test_multiprocessing_spawn

This happens with all the Pythons (at lest 3.x) on rawhide. 

The tests were disabled in python3:
https://src.fedoraproject.org/rpms/python3/pull-request/34

Steps to Reproduce:
1. Revert the above mentioned PR
2. Build in Koji (local mock untested yet)

Actual results: hangs at test_multiprocessing_fork
Expected results: builds


Additional info:
This is a problem for 3.3, 3.4, 3.5, 3.6, 3.7.

Talked about it upstream in https://bugs.python.org/issue31463

See mostly:

# python3.6 -m test.regrtest test_multiprocessing_fork test_subprocess
Run tests sequentially
0:00:00 load avg: 1.84 [1/2] test_multiprocessing_fork
/usr/lib64/python3.6/multiprocessing/semaphore_tracker.py:55: UserWarning: semaphore_tracker: process died unexpectedly, relaunching.  Some semaphores might leak.
  warnings.warn('semaphore_tracker: process died unexpectedly, '
Exception in thread Thread-20:
Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/multiprocessing/resource_sharer.py", line 139, in _serve
    signal.pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG))
  File "/usr/lib64/python3.6/signal.py", line 60, in pthread_sigmask
    sigs_set = _signal.pthread_sigmask(how, mask)
ValueError: signal number 32 out of range

(hangs)

^CProcess Process-178:
Traceback (most recent call last):
...
KeyboardInterrupt
Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_fork
  Before: <_weakrefset.WeakSet object at 0x7f1873917c88>
  After:  <_weakrefset.WeakSet object at 0x7f188516d978> 
Warning -- threading._dangling was modified by test_multiprocessing_fork
  Before: <_weakrefset.WeakSet object at 0x7f1873917d68>
  After:  <_weakrefset.WeakSet object at 0x7f1873917e48> 

Test suite interrupted by signal SIGINT.
2 tests omitted:
    test_multiprocessing_fork test_subprocess

Total duration: 51 sec
Tests result: INTERRUPTED

Comment 1 Miro Hrončok 2018-04-22 12:52:34 UTC
This apparently is not just a failing test, but multiprocesing entirely broken.

See the upstream issue https://bugs.python.org/issue33329 for details, fix is almost ready.

Comment 2 Miro Hrončok 2018-04-23 11:42:08 UTC
Should be OK in:

https://src.fedoraproject.org/rpms/python37/pull-request/18

Harris, could you please wait for the CI, merge (or fix issues) and backport to python3, python35, 34, 33?

This is needed in Fedora 29 only, but should not be harmfull in older Fedoras.

Thank you

Comment 3 Miro Hrončok 2018-04-23 16:20:05 UTC
python3: https://src.fedoraproject.org/rpms/python3/pull-request/35