avocado icon indicating copy to clipboard operation
avocado copied to clipboard

avocado run failed with 'cannot pickle _thread.RLock object'

Open moonlightGithub opened this issue 3 years ago • 2 comments

(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

moonlightGithub avatar Aug 22 '21 04:08 moonlightGithub

Hi @moonlightGithub , can you please provide the script as well? Because, I cant reproduce this with /bin/false. Also, what is the version of avocado that you are using?

beraldoleal avatar Aug 23 '21 12:08 beraldoleal

Based on the user folder structure, this test was executed on macOS.

willianrampazzo avatar Nov 17 '21 18:11 willianrampazzo

$ uname -vr
21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000

$ cat /Users/philmd/avocado/job-results/job-2022-11-14T23.23-76e3eb4/job.log
2022-11-14 23:23:40,113 sysinfo  L0473 INFO | Profiler disabled
2022-11-14 23:23:40,116 sysinfo  L0282 DEBUG| Journalctl collection failed: [Errno 2] No such file or directory (journalctl --quiet --lines 1 --output json): 'journalctl'
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /sys/kernel/debug/sched_features (file does not exist)
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /proc/partitions (file does not exist)
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /proc/slabinfo (file does not exist)
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /proc/mounts (file does not exist)
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /proc/version (file does not exist)
2022-11-14 23:23:40,117 sysinfo  L0113 DEBUG| Not logging /proc/interrupts (file does not exist)
2022-11-14 23:23:41,814 sysinfo  L0113 DEBUG| Not logging /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (file does not exist)
2022-11-14 23:23:41,829 sysinfo  L0113 DEBUG| Not logging /proc/pci (file does not exist)
2022-11-14 23:23:41,829 sysinfo  L0113 DEBUG| Not logging /proc/modules (file does not exist)
2022-11-14 23:23:41,836 sysinfo  L0113 DEBUG| Not logging /proc/cmdline (file does not exist)
2022-11-14 23:23:41,836 sysinfo  L0113 DEBUG| Not logging /sys/devices/system/clocksource/clocksource0/current_clocksource (file does not exist)
2022-11-14 23:23:41,836 sysinfo  L0113 DEBUG| Not logging /proc/cpuinfo (file does not exist)
2022-11-14 23:23:41,845 sysinfo  L0113 DEBUG| Not logging /proc/meminfo (file does not exist)
2022-11-14 23:23:41,857 job      L0284 INFO | Command line: ./tests/venv/bin/avocado --show=app,console run -t os:zephyr tests/avocado
2022-11-14 23:23:41,857 job      L0285 INFO | 
2022-11-14 23:23:41,857 job      L0278 INFO | Avocado version: 88.1
2022-11-14 23:23:41,857 job      L0279 INFO | 
2022-11-14 23:23:41,857 job      L0257 INFO | Avocado config:
2022-11-14 23:23:41,857 job      L0258 INFO | 
2022-11-14 23:23:41,862 job      L0260 INFO | {'assets.fetch.ignore_errors': False,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.fetch.references': [],
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.list.days': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.list.overall_limit': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.list.size_filter': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.purge.days': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.purge.overall_limit': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.purge.size_filter': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.register.name': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.register.sha1_hash': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'assets.register.url': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'config': None,
2022-11-14 23:23:41,862 job      L0260 INFO |  'config.datadir': False,
2022-11-14 23:23:41,862 job      L0260 INFO |  'core.input_encoding': 'utf-8',
2022-11-14 23:23:41,862 job      L0260 INFO |  'core.paginator': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'core.show': {'console', 'app'},
2022-11-14 23:23:41,863 job      L0260 INFO |  'core.verbose': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'datadir.paths.base_dir': '/var/lib/avocado',
2022-11-14 23:23:41,863 job      L0260 INFO |  'datadir.paths.cache_dirs': ['/Users/philmd/avocado/data/cache'],
2022-11-14 23:23:41,863 job      L0260 INFO |  'datadir.paths.data_dir': '/var/lib/avocado/data',
2022-11-14 23:23:41,863 job      L0260 INFO |  'datadir.paths.logs_dir': '/Users/philmd/avocado/job-results',
2022-11-14 23:23:41,863 job      L0260 INFO |  'datadir.paths.test_dir': '/usr/share/doc/avocado/tests',
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.create_reports': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.filter': ['cmdline', 'time', 'variants', 'results', 'config', 'sysinfo'],
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.html': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.jobids': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.open_browser': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'diff.strip_id': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_arch': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_create': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_name': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_path': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_release': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_type': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'distro.distro_def_version': '',
2022-11-14 23:23:41,863 job      L0260 INFO |  'filter.by_tags.include_empty': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'filter.by_tags.include_empty_key': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'filter.by_tags.tags': ['os:zephyr'],
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.output.loglevel': 'DEBUG',
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.output.testlogs.logfiles': ['debug.log'],
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.output.testlogs.statuses': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.replay.source_job_id': 'latest',
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.json.enabled': True,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.json.output': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.tap.enabled': True,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.tap.include_logs': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.tap.output': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.xunit.enabled': True,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.xunit.job_name': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.xunit.max_test_log_chars': 100000,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.result.xunit.output': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.store_logging_stream': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'job.run.timeout': 0,
2022-11-14 23:23:41,863 job      L0260 INFO |  'jobs.get.output_files.destination': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'jobs.get.output_files.job_id': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'jobs.show.job_id': 'latest',
2022-11-14 23:23:41,863 job      L0260 INFO |  'json.variants.load': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.external_runner': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.external_runner_chdir': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.external_runner_testdir': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.loaders': ['file', '@DEFAULT'],
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.recipes.write_to_directory': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.references': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.resolver': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'list.write_to_json_file': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.max_parallel_tasks': 10,
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.shuffle': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.spawner': 'process',
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.status_server_buffer_size': 33554432,
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.status_server_listen': '127.0.0.1:8888',
2022-11-14 23:23:41,863 job      L0260 INFO |  'nrunner.status_server_uri': '127.0.0.1:8888',
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.cli.cmd.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.cli.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.disable': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.init.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.job.prepost.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.jobscripts.post': '/etc/avocado/scripts/job/post.d/',
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.jobscripts.pre': '/etc/avocado/scripts/job/pre.d/',
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.jobscripts.warn_non_existing_dir': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.jobscripts.warn_non_zero_status': True,
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.resolver.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.result.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.result_events.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.runnable.runner.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.runner.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.skip_broken_plugin_notification': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.spawner.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'plugins.varianter.order': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.dict_variants': [],
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.dry_run.enabled': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.dry_run.no_cleanup': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.execution_order': 'variants-per-test',
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.external_runner': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.external_runner_chdir': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.external_runner_testdir': None,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.failfast': False,
2022-11-14 23:23:41,863 job      L0260 INFO |  'run.ignore_missing_references': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.job_category': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.journal.enabled': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.keep_tmp': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.loaders': ['file', '@DEFAULT'],
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.log_test_data_directories': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.output_check': True,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.output_check_record': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.references': ['tests/avocado'],
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.replay.ignore': [],
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.replay.job_id': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.replay.resume': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.replay.test_status': [],
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.results.archive': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.results_dir': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.test_parameters': [],
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.test_runner': 'runner',
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.unique_job_id': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'run.wrapper.wrappers': [],
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.exectest.exitcodes.skip': [],
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.output.color': 'auto',
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.output.colored': True,
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.output.utf8': True,
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.timeout.after_interrupted': 60,
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.timeout.process_alive': 60,
2022-11-14 23:23:41,864 job      L0260 INFO |  'runner.timeout.process_died': 10,
2022-11-14 23:23:41,864 job      L0260 INFO |  'simpletests.status.failure_fields': ['status', 'stdout', 'stderr'],
2022-11-14 23:23:41,864 job      L0260 INFO |  'simpletests.status.skip_location': 'all',
2022-11-14 23:23:41,864 job      L0260 INFO |  'simpletests.status.skip_regex': '^SKIP$',
2022-11-14 23:23:41,864 job      L0260 INFO |  'simpletests.status.warn_location': 'all',
2022-11-14 23:23:41,864 job      L0260 INFO |  'simpletests.status.warn_regex': '^WARN$',
2022-11-14 23:23:41,864 job      L0260 INFO |  'spawner.podman.bin': '/usr/bin/podman',
2022-11-14 23:23:41,864 job      L0260 INFO |  'spawner.podman.image': 'fedora:31',
2022-11-14 23:23:41,864 job      L0260 INFO |  'subcommand': 'run',
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.commands_timeout': -1,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.enabled': True,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.installed_packages': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.locale': 'C',
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.optimize': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.per_test': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.profiler': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'sysinfo.collect.sysinfodir': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'task.timeout.running': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.contents': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.debug': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.inherit': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.json_variants_dump': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.summary': 0,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.tree': False,
2022-11-14 23:23:41,864 job      L0260 INFO |  'variants.variants': 1,
2022-11-14 23:23:41,864 job      L0260 INFO |  'vmimage.get.arch': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'vmimage.get.distro': None,
2022-11-14 23:23:41,864 job      L0260 INFO |  'vmimage.get.version': None}
2022-11-14 23:23:41,864 job      L0261 INFO | 
2022-11-14 23:23:41,864 job      L0264 INFO | Avocado Data Directories:
2022-11-14 23:23:41,864 job      L0265 INFO | 
2022-11-14 23:23:41,865 job      L0266 INFO | base     /Users/philmd/avocado
2022-11-14 23:23:41,866 job      L0267 INFO | tests    /Users/philmd/avocado/tests
2022-11-14 23:23:41,866 job      L0268 INFO | data     /Users/philmd/avocado/data
2022-11-14 23:23:41,866 job      L0269 INFO | logs     /Users/philmd/avocado/job-results/job-2022-11-14T23.23-76e3eb4
2022-11-14 23:23:41,866 job      L0270 INFO | 
2022-11-14 23:23:41,866 job      L0307 INFO | Temporary dir: /var/folders/yj/r7khncsj4d77k04ybz9lw4tm0000gn/T/avocado_j5gbuov8/avocado_job_z2xulz05
2022-11-14 23:23:41,866 job      L0308 INFO | 
2022-11-14 23:23:41,866 job      L0301 INFO | Job ID: 76e3eb4b1d09cf3887cdbcb727685fb64d56e396
2022-11-14 23:23:41,866 job      L0304 INFO | 
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /sys/kernel/debug/sched_features (file does not exist)
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /proc/partitions (file does not exist)
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /proc/slabinfo (file does not exist)
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /proc/mounts (file does not exist)
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /proc/version (file does not exist)
2022-11-14 23:23:41,882 sysinfo  L0113 DEBUG| Not logging /proc/interrupts (file does not exist)
2022-11-14 23:23:41,931 sysinfo  L0113 DEBUG| Not logging /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor (file does not exist)
2022-11-14 23:23:41,941 sysinfo  L0113 DEBUG| Not logging /proc/pci (file does not exist)
2022-11-14 23:23:41,942 sysinfo  L0113 DEBUG| Not logging /proc/modules (file does not exist)
2022-11-14 23:23:41,947 sysinfo  L0113 DEBUG| Not logging /proc/cmdline (file does not exist)
2022-11-14 23:23:41,947 sysinfo  L0113 DEBUG| Not logging /sys/devices/system/clocksource/clocksource0/current_clocksource (file does not exist)
2022-11-14 23:23:41,948 sysinfo  L0113 DEBUG| Not logging /proc/cpuinfo (file does not exist)
2022-11-14 23:23:41,955 sysinfo  L0113 DEBUG| Not logging /proc/meminfo (file does not exist)

philmd avatar Nov 14 '22 22:11 philmd

This seems to be an issue specific to the legacy runner. I can not reproduce when using the new runner (nrunner).

philmd avatar Nov 14 '22 23:11 philmd

I met the same issue while running QEMU (latest git) tests with make check-avocado on macOS 13.2 ARM64 with Python 3.11. Same place as well:

avocado/core/job.py", line 632, in run_tests
summary |= suite.run(self)

XVilka avatar Feb 24 '23 06:02 XVilka

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?

lmr avatar Feb 24 '23 13:02 lmr

Indeed I just installed avocado on a macOS machine and it is working fine with the latest runner.

Which means whatever make check-avocado is running has to be updated.

lmr avatar Feb 24 '23 13:02 lmr

$ avocado run /usr/bin/true
JOB ID     : 08826debd43a82cb07ce0f2a9c77f0dba55a47f4
JOB LOG    : /Users/lmr/avocado/job-results/job-2023-02-24T14.57-08826de/job.log
 (1/1) /usr/bin/true: STARTED
 (1/1) /usr/bin/true: PASS (0.30 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /Users/lmr/avocado/job-results/job-2023-02-24T14.57-08826de/results.html
JOB TIME   : 6.77 s
$ uname -a
Darwin bcd0742d20ed 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

lmr avatar Feb 24 '23 14:02 lmr

I met the same issue while running QEMU (latest git) tests with make check-avocado on macOS 13.2 ARM64 with Python 3.11. Same place as well:

avocado/core/job.py", line 632, in run_tests
summary |= suite.run(self)

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:

  • Change the avocado-framework==88.1 entry in tests/requirements.txt to avocado-framework=100.1 and run make check-clean, make check-avocado, OR
  • Run ./tests/venv/bin/pip3 install avocado-framework==100.1 and then run make check-avocado

I'd appreciate learning about the results. And again, thanks for reporting this.

clebergnu avatar Feb 24 '23 15:02 clebergnu

@clebergnu I did the clean way (1st option) and most avocado tests passed just fine:

(41/69) tests/avocado/machine_aspeed.py:AST2x00MachineSDK.test_arm_ast2500_evb_sdk: INTERRUPTED: timeout (240.01 s)
Interrupting job (failfast).
RESULTS    : PASS 27 | ERROR 0 | FAIL 0 | SKIP 12 | WARN 0 | INTERRUPT 1 | CANCEL 29
JOB TIME   : 270.04 s

XVilka avatar Feb 27 '23 02:02 XVilka

@clebergnu I did the clean way (1st option) and most avocado tests passed just fine:

Thanks for testing it, this is great news!

(41/69) tests/avocado/machine_aspeed.py:AST2x00MachineSDK.test_arm_ast2500_evb_sdk: INTERRUPTED: timeout (240.01 s)
Interrupting job (failfast).
RESULTS    : PASS 27 | ERROR 0 | FAIL 0 | SKIP 12 | WARN 0 | INTERRUPT 1 | CANCEL 29
JOB TIME   : 270.04 s

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.

clebergnu avatar Feb 27 '23 17:02 clebergnu

This is an issue only with the so-called "legacy" runner, which is no longer available. "nrunner", the current architecture, should not be susceptible to this. Feel free to reopen this issue if this reappears (but I honestly doubt it).

clebergnu avatar Feb 05 '24 12:02 clebergnu