Skip to content
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

MAINT: Verify fork logic for 3.12 #1455

Open
HaoZeke opened this issue Jan 5, 2025 · 1 comment
Open

MAINT: Verify fork logic for 3.12 #1455

HaoZeke opened this issue Jan 5, 2025 · 1 comment

Comments

@HaoZeke
Copy link
Member

HaoZeke commented Jan 5, 2025

Essentially from the flaky CI in #1445 reproduced here:

test/test_gh_pages.py: 64 warnings
test/test_publish.py: 144 warnings
test/test_run.py: 20 warnings
test/test_util.py: 8 warnings
  /opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=6217) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()
@HaoZeke
Copy link
Member Author

HaoZeke commented Jan 5, 2025

FWIW this is likely the cause of:

=================================== FAILURES ===================================
_______________________________ test_run_publish _______________________________
capfd = <_pytest.capture.CaptureFixture object at 0x7f389aa4e810>
basic_conf = ('/tmp/pytest-of-runner/pytest-0/test_run_publish0', '/home/runner/work/asv/asv/test', <asv.config.Config object at 0x7f389aa4fb60>, '/tmp/pytest-of-runner/pytest-0/test_run_publish0/asv-machine.json')
    @pytest.mark.skipif(
        HAS_PYPY or (not HAS_VIRTUALENV) or WIN,
        reason="Flaky on pypy and windows, needs virtualenv",
    )
    def test_run_publish(capfd, basic_conf):
        tmpdir, local, conf, machine_file = basic_conf
        tmpdir = util.long_path(tmpdir)
    
        conf.matrix = {
            "req": dict(conf.matrix),
            "env": {"SOME_TEST_VAR": ["1"]},
        }
    
        # Tests a typical complete run/publish workflow
>       ret = tools.run_asv_with_conf(conf, 'run', f"{util.git_default_branch()}", '--steps=2',
                                      '--quick', '--show-stderr', '--profile',
                                      '-a', 'warmup_time=0',
                                      '--durations=5',
                                      _machine_file=machine_file)
/home/runner/work/asv/asv/test/test_workflow.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/asv/asv/test/tools.py:175: in run_asv_with_conf
    return cls.run_from_conf_args(conf, args, **kwargs)
/home/runner/work/asv/asv/asv/commands/run.py:166: in run_from_conf_args
    return cls.run(
/home/runner/work/asv/asv/asv/commands/run.py:278: in run
    Setup.perform_setup(environments, parallel=parallel)
/home/runner/work/asv/asv/asv/commands/setup.py:82: in perform_setup
    list(map(_create, environments))
/home/runner/work/asv/asv/asv/commands/setup.py:14: in _create
    env.create()
/home/runner/work/asv/asv/asv/environment.py:754: in create
    self._setup()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <asv.plugins.virtualenv.Virtualenv object at 0x7f389aa9b980>
    def _setup(self):
        """
        Setup the environment on disk using virtualenv.
        Then, all of the requirements are installed into
        it using `pip install`.
        """
        env = dict(os.environ)
        env.update(self.build_env_vars)
    
        log.info(f"Creating virtualenv for {self.name}")
>       util.check_call([
            sys.executable,
            "-mvirtualenv",
            "--wheel=bundle",
            "--setuptools=bundle",
            "-p",
            self._executable,
            self._path], env=env)
E       asv.util.ProcessError: Command '/opt/hostedtoolcache/Python/3.12.8/x64/bin/python -mvirtualenv --wheel=bundle --setuptools=bundle -p /opt/hostedtoolcache/Python/3.12.8/x64/bin/python3.12 /tmp/pytest-of-runner/pytest-0/test_run_publish0/env/7719a3cfc6d3dbe18f7664590eb9b261' returned non-zero exit status 1
/home/runner/work/asv/asv/asv/plugins/virtualenv.py:133: ProcessError
----------------------------- Captured stdout call -----------------------------
[100.00%] ··· No `environment_type` specified in asv.conf.json. This will be required in the future.
[100.00%] ··· Creating environments
[100.00%] ···· Error running /opt/hostedtoolcache/Python/3.12.8/x64/bin/python -mvirtualenv --wheel=bundle --setuptools=bundle -p /opt/hostedtoolcache/Python/3.12.8/x64/bin/python3.12 /tmp/pytest-of-runner/pytest-0/test_run_publish0/env/7719a3cfc6d3dbe18f7664590eb9b261 (exit status 1)
               STDOUT -------->
               
               STDERR -------->
               /opt/hostedtoolcache/Python/3.12.8/x64/bin/python: No module named virtualenv
[100.00%] ···· Failure creating environment for virtualenv-py3.12-asv_dummy_test_package_1-asv_dummy_test_package_20.3.8-SOME_TEST_VAR1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant