Issue 1:
Here This is on Python 3.9, 3.8 passed.

C:\Python39\lib\site-packages\scipy\integrate\tests\test__quad_vec.py:108: in test_quad_vec_pool

...

C:\Python39\lib\multiprocessing\popen_spawn_win32.py:123: in terminate
_winapi.TerminateProcess(int(self._handle), TERMINATE)
E PermissionError: [WinError 5] Access is denied
self = <multiprocessing.popen_spawn_win32.Popen object at 0x137C0748>

It isn't clear if this is an upstream problem or misuse on scipy's part.

Issue 2:
This failure/permissions error is showing up in the wheels repo for a subset of Windows matrix entries, including backports for 1.7.2 and for master.

I'll put the traceback below, and links to sample PRs:

MacPython/scipy-wheels#135

MacPython/scipy-wheels#138

Can we put a skip marker on this test for Windows temporarily, at least on the maintenance branch, or is this looking real?

================================== FAILURES ===================================
_____________________________ test_quad_vec_pool ______________________________
[gw0] win32 -- Python 3.7.5 C:\Python37-x64\python.exe
C:\Python37-x64\lib\site-packages\scipy\integrate\tests\test__quad_vec.py:98: in test_quad_vec_pool
res, err = quad_vec(f, -np.inf, np.inf, norm='max', epsabs=1e-4, workers=4)
Pool = <function Pool at 0x000002479C210A68>
f = <function _lorenzian at 0x0000024787C0FDC8>
C:\Python37-x64\lib\site-packages\scipy\integrate\_quad_vec.py:252: in quad_vec
res = quad_vec(f2, -1, 1, **kwargs)
a = -inf
b = inf
cache_size = 100000000.0
epsabs = 0.0001
epsrel = 1e-08
f = <function _lorenzian at 0x0000024787C0FDC8>
f2 = <scipy.integrate._quad_vec.DoubleInfiniteFunc object at 0x0000024799FFCA48>
full_output = False
kwargs = {'cache_size': 100000000.0, 'epsabs': 0.0001, 'epsrel': 1e-08, 'full_output': False, ...}
limit = 10000
norm = 'max'
points = None
quadrature = None
sgn = 1
workers = 4
C:\Python37-x64\lib\site-packages\scipy\integrate\_quad_vec.py:391: in quad_vec
break
CONVERGED = 0
NOT_A_NUMBER = 3
NOT_CONVERGED = 1
ROUNDING_ERROR = 2
_quadrature = <function _quadrature_gk15 at 0x0000024787BDB678>
a = -1.0
b = 0.0
cache_count = 4166666.0
cache_size = 100000000.0
derr = -0.0001958558976507645
dint = -5.188183216375819e-11
dneval = 30
dround_err = 1.7439342490043163e-14
epsabs = 0.0001
epsrel = 1e-08
err = 1.2888960825934786e-10
err_sum = 0.00039171231086582484
f = <scipy.integrate._quad_vec.DoubleInfiniteFunc object at 0x0000024799FFCA48>
full_output = False
global_error = 5.155584007941142e-10
global_integral = 3.141592653589793
ier = 0
ig = 0.7853981633974483
initial_intervals = [(-1.0, 0.0), (0.0, 1.0)]
interval = (-0.000195856155429981, -1.0, 0.0)
interval_cache = LRUDict([((0.0, 0.5), 0.7853981633974485), ((0.5, 1.0), 0.7853981633974483), ((-1.0, -0.5), 0.7853981633974484), ((-0.5, 0.0), 0.7853981633974483)])
intervals = [(-1.2888960825934792e-10, -1.0, -0.5), (-1.2888960825934786e-10, -0.5, 0.0), (-1.2888960825934792e-10, 0.5, 1.0), (-1.2888957602994802e-10, 0.0, 0.5)]
j = 2
kwargs = {'cache_size': 100000000.0, 'epsabs': 0.0001, 'epsrel': 1e-08, 'full_output': False, ...}
limit = 10000
mapwrapper = <scipy._lib._util.MapWrapper object at 0x000002479C20C9C8>
min_intervals = 2
neg_old_err = -0.000195856155429981
neval = 90
norm = 'max'
norm_func = <built-in function abs>
norm_funcs = {None: <function _max_norm at 0x0000024787B5C0D8>, 'max': <function _max_norm at 0x0000024787B5C0D8>, '2': <function norm at 0x00000247FE803E58>}
old_int = 1.5707963268467784
p = 0.0
parallel_count = 128
points = (0,)
prev = 0.0
quadrature = 'gk15'
rnd = 1.743934249061916e-14
rounding_error = 6.975736996132465e-14
status_msg = {0: 'Target precision reached.', 1: 'Target precision not reached.', 2: 'Target precision could not be reached due to rounding error.', 3: 'Non-finite values encountered.'}
subint = ((-1.0, -0.5, 0.7853981633974484, 1.2888960825934792e-10), (-0.5, 0.0, 0.7853981633974483, 1.2888960825934786e-10))
to_process = [((0.00019585615543584383, 0.0, 1.0, 1.5707963268467782), <scipy.integrate._quad_vec.DoubleInfiniteFunc object at 0x00...nfiniteFunc object at 0x0000024799FFCA48>, <built-in function abs>, <function _quadrature_gk15 at 0x0000024787BDB678>)]
tol = 0.0001
workers = 4
x = (-0.5, 0.0, 0.7853981633974483, 1.2888960825934786e-10)
x1 = -0.5
x2 = 0.0
C:\Python37-x64\lib\site-packages\scipy\_lib\_util.py:466: in __exit__
self.pool.terminate()
exc_type = None
exc_value = None
self = <scipy._lib._util.MapWrapper object at 0x000002479C20C9C8>
traceback = None
C:\Python37-x64\lib\multiprocessing\pool.py:548: in terminate
self._terminate()
self = <multiprocessing.pool.Pool object at 0x000002479C20CBC8>
C:\Python37-x64\lib\multiprocessing\util.py:201: in __call__
res = self._callback(*self._args, **self._kwargs)
_finalizer_registry = {(None, 9): <Finalize object, callback=CloseHandle, args=(2044,)>, (None, 10): <Finalize object, callback=CloseHandle,...Finalize object, callback=CloseHandle, args=(2020,)>, (None, 12): <Finalize object, callback=CloseHandle, args=(508,)>}
getpid = <built-in function getpid>
self = <Finalize object, callback=_terminate_pool, args=(<_queue.SimpleQueue object at 0x000002479C1FB638>, <multiprocessing....emon 2636)>, <Thread(Thread-108, stopped daemon 3004)>, <Thread(Thread-109, stopped daemon 3664)>, {}), exitprority=15>
sub_debug = <function sub_debug at 0x00000247FF7A5DC8>
wr = None
C:\Python37-x64\lib\multiprocessing\pool.py:601: in _terminate_pool
p.terminate()
cache = {}
cls = <class 'multiprocessing.pool.Pool'>
inqueue = <multiprocessing.queues.SimpleQueue object at 0x000002479C20CB08>
outqueue = <multiprocessing.queues.SimpleQueue object at 0x000002479C2053C8>
p = <SpawnProcess(SpawnPoolWorker-8, stopped daemon)>
pool = [<SpawnProcess(SpawnPoolWorker-7, stopped[SIGTERM] daemon)>, <SpawnProcess(SpawnPoolWorker-8, stopped daemon)>, <SpawnProcess(SpawnPoolWorker-9, stopped daemon)>, <SpawnProcess(SpawnPoolWorker-10, stopped daemon)>]
result_handler = <Thread(Thread-109, stopped daemon 3664)>
task_handler = <Thread(Thread-108, stopped daemon 3004)>
taskqueue = <_queue.SimpleQueue object at 0x000002479C1FB638>
worker_handler = <Thread(Thread-107, stopped daemon 2636)>
C:\Python37-x64\lib\multiprocessing\process.py:124: in terminate
self._popen.terminate()
self = <SpawnProcess(SpawnPoolWorker-8, stopped daemon)>
C:\Python37-x64\lib\multiprocessing\popen_spawn_win32.py:119: in terminate
_winapi.TerminateProcess(int(self._handle), TERMINATE)
E PermissionError: [WinError 5] Access is denied
self = <multiprocessing.popen_spawn_win32.Popen object at 0x000002479C205748>