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
avocado run failed with 'cannot pickle _thread.RLock object' #4888
Comments
|
Hi @moonlightGithub , can you please provide the script as well? Because, I cant reproduce this with /bin/false. |
|
Based on the user folder structure, this test was executed on macOS. |
|
|
This seems to be an issue specific to the legacy runner. I can not reproduce when using the new runner (nrunner). |
|
I met the same issue while running QEMU (latest git) tests with |
|
I remember having sent a patch fixing that a while ago - the _thread.RLock is not serializable and when we send it over in the test state queue, it raises this issue. Maybe the check-avocado qemu target is executing some older version of avocado? |
|
Indeed I just installed avocado on a macOS machine and it is working fine with the latest runner. Which means whatever |
|
The legacy runner (the default on Avocado 88.1) doesn't work on macOS. Even though macOS is not a primary platform (very simplistic testing is done on CI), it should work with the newer Avocado runner (called nrunner) which is the default on newer versions. FYI, I'm working on validating all existing QEMU tests with newer Avocado. I'll send a patch series doing so once it's done. In the mean time, it'd be helpful if you could bump the version yourself and try to run the tests on macOS. You can either:
I'd appreciate learning about the results. And again, thanks for reporting this. |
|
@clebergnu I did the clean way (1st option) and most avocado tests passed just fine: |
Thanks for testing it, this is great news!
It's also good news that you've found the same behavior I had for those tests. I've been trying to pinpoint the reason for their failures and proceed to fix them, but so far I've not been able to. In this WIP, I've just disabled them, including the one you mentioned here. |
There has been many changes to Avocado since 88.1, and although stability is of value, there has been reports of misbehaving on some newer systems and Python interpreters. This also opens up the possibility of using new Avocado features. The actual changes since version 88.1 can be seen on URLs such as: https://avocado-framework.readthedocs.io/en/latest/releases/100_1.html And the like, all the way to 88.1. Reference: avocado-framework/avocado#4888 Signed-off-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
(venv) ➜ avocado avocado run ./tmp/fail.sh
JOB ID : 04ae0614ae55fc5b23847b5216875941df77fc98
JOB LOG : /Users/zhangchun.0930/avocado/job-results/job-2021-08-22T12.04-04ae061/job.log
Avocado crashed: TypeError: cannot pickle '_thread.RLock' object
Traceback (most recent call last):
File "/Users/zhangchun.0930/workspace/avocado/venv/lib/python3.9/site-packages/avocado/core/job.py", line 635, in run_tests
summary |= suite.run(self)
File "/Users/zhangchun.0930/workspace/avocado/venv/lib/python3.9/site-packages/avocado/core/suite.py", line 314, in run
return self.runner.run_suite(job, self)
File "/Users/zhangchun.0930/workspace/avocado/venv/lib/python3.9/site-packages/avocado/plugins/runner.py", line 391, in run_suite
if not self.run_test(job, test_factory, queue, summary,
File "/Users/zhangchun.0930/workspace/avocado/venv/lib/python3.9/site-packages/avocado/plugins/runner.py", line 170, in run_test
proc.start()
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/zhangchun.0930/.pyenv/versions/3.9.1/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_thread.RLock' object
The text was updated successfully, but these errors were encountered: