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

Test failure #756

Open
madwort opened this issue Oct 10, 2024 · 0 comments
Open

Test failure #756

madwort opened this issue Oct 10, 2024 · 0 comments

Comments

@madwort
Copy link
Contributor

madwort commented Oct 10, 2024

may be intermittent, but putting here in case I get time to poke it one day

=================================== FAILURES ===================================
________________________ test_finalize_failed_oomkilled ________________________

docker_cleanup = None
job_definition = JobDefinition(id='test_finalize_failed_oomkilled', job_request_id='job-request-test_finalize_failed_oomkilled', study=...x_filesize=16777216, database_name=None, cpu_count=None, memory_limit='6M', level4_file_types=['.csv'], cancelled=None)
tmp_work_dir = PosixPath('/tmp/pytest-of-runner/pytest-0/test_finalize_failed_oomkilled0')

    @pytest.mark.needs_docker
    def test_finalize_failed_oomkilled(docker_cleanup, job_definition, tmp_work_dir):
        # Consume memory by writing to the tmpfs at /dev/shm
        # We write a lot more that our limit, to ensure the OOM killer kicks in
        # regardless of our tests host's vm.overcommit_memory settings.
        job_definition.args = ["sh", "-c", "head -c 1000m /dev/urandom >/dev/shm/foo"]
        job_definition.memory_limit = "6M"  # lowest allowable limit
    
        api = local.LocalDockerAPI()
    
        status = api.prepare(job_definition)
        status = api.execute(job_definition)
    
        wait_for_state(api, job_definition, ExecutorState.EXECUTED)
    
        status = api.finalize(job_definition)
        assert status.state == ExecutorState.FINALIZED
    
        # we don't need to wait
        assert api.get_status(job_definition).state == ExecutorState.FINALIZED
        assert job_definition.id in local.RESULTS
>       assert local.RESULTS[job_definition.id].exit_code == 137
E       AssertionError: assert 128 == 137
E        +  where 128 = JobResults(outputs={'.opensafely-timestamp': 'medium', '__init__.py': 'medium', 'analysis/__init__.py': 'medium', 'analysis/count_by_year.py': 'medium', 'analysis/count_lines.py': 'medium', 'analysis/dataset_definition.py': 'medium', 'analysis/dummy_action.py': 'medium', 'analysis/filter_by_sex.py': 'medium', 'analysis/study_definition.py': 'medium', 'codelists/.gitkeep': 'medium', 'output/.gitkeep': 'medium', 'project.yaml': 'medium', 'test-data/README': 'medium', 'test-data/databuilder-dummy-data.csv': 'medium', 'test-data/dummy-data.csv': 'medium'}, unmatched_patterns=[], unmatched_outputs=[], exit_code=128, image_id='sha256:bc01a3326866eedd68525a4d2d91d2cf86f9893db054601d6be524d5c9d03981', message=None, timestamp_ns=1728570324411008361, level4_excluded_files={}, action_version='unknown', action_revision='unknown', action_created='unknown', base_revision='unknown', base_created='unknown').exit_code

tests/test_local_executor.py:518: AssertionError
=========================== short test summary info ============================
FAILED tests/test_local_executor.py::test_finalize_failed_oomkilled - Asserti...
============= 1 failed, 328 passed, 3 xfailed in 218.59s (0:03:38) =============
error: Recipe `test` failed on line 104 with exit code 1

https://github.com/opensafely-core/job-runner/actions/runs/11276033950/job/31358867481

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