avocado run case encouter mutiprocess error



 avocado run  ./2009F.robot:"BSSOSS-7013"
JOB ID     : c1b929e4e2226ddf72beaa2f83fd8ac6747d08c2
JOB LOG    : /Users/aa77y2g/avocado/job-results/job-2021-11-21T09.37-c1b929e/job.log

Avocado crashed: AttributeError: 'str' object has no attribute 'Lock'
Traceback (most recent call last):

  File "/opt/anaconda320/anaconda3/envs/py38/lib/python3.8/site-packages/avocado/core/job.py", line 635, in run_tests
    summary |= suite.run(self)

  File "/opt/anaconda320/anaconda3/envs/py38/lib/python3.8/site-packages/avocado/core/suite.py", line 314, in run
    return self.runner.run_suite(job, self)

  File "/opt/anaconda320/anaconda3/envs/py38/lib/python3.8/site-packages/avocado/plugins/runner.py", line 355, in run_suite
    queue = multiprocessing.SimpleQueue()

  File "/opt/anaconda320/anaconda3/envs/py38/lib/python3.8/multiprocessing/context.py", line 114, in SimpleQueue
    return SimpleQueue(ctx=self.get_context())

  File "/opt/anaconda320/anaconda3/envs/py38/lib/python3.8/multiprocessing/queues.py", line 336, in __init__
    self._rlock = ctx.Lock()

AttributeError: 'str' object has no attribute 'Lock'

Please include the traceback info and command line used on your bug report
Report bugs visiting https://github.com/avocado-framework/avocado/issues/new

vi /opt/anaconda320/anaconda3/envs/py38/lib/python3.8/multiprocessing/context.py

使mac os上默认的创建的方式走的 fork分支

    #if sys.platform == 'darwin':
    if sys.platform == 'Darwin':
        # bpo-33725: running arbitrary code after fork() is no longer reliable
        # on macOS since macOS 10.14 (Mojave). Use spawn by default instead.
        _default_context = DefaultContext(_concrete_contexts['spawn'])
    else:
        _default_context = DefaultContext(_concrete_contexts['fork'])

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐