From 11e075da438eb17b4a14a40a19b28e33ef0d36cb Mon Sep 17 00:00:00 2001 From: phoebusm Date: Tue, 26 Nov 2024 16:05:02 +0000 Subject: [PATCH 1/2] Change mp start method --- python/arcticdb/storage_fixtures/s3.py | 7 +++---- python/tests/integration/arcticdb/test_s3.py | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/python/arcticdb/storage_fixtures/s3.py b/python/arcticdb/storage_fixtures/s3.py index 8ff1a2c4c3..3176791efc 100644 --- a/python/arcticdb/storage_fixtures/s3.py +++ b/python/arcticdb/storage_fixtures/s3.py @@ -12,8 +12,6 @@ import os import re import sys -import trustme -import subprocess import platform from tempfile import mkdtemp @@ -339,7 +337,8 @@ def _start_server(self): self.client_cert_file = "" self.client_cert_dir = self.working_dir - self._p = multiprocessing.Process( + spawn_context = multiprocessing.get_context('spawn') + self._p = spawn_context.Process( target=self.run_server, args=( port, @@ -438,7 +437,7 @@ def cleanup_bucket(self, b: S3Bucket): class MotoNfsBackedS3StorageFixtureFactory(MotoS3StorageFixtureFactory): - def create_fixture(self, default_prefix=None, use_raw_prefix=False) -> NfsS3Bucket: + def create_fixture(self) -> NfsS3Bucket: bucket = f"test_bucket_{self._bucket_id}" self._s3_admin.create_bucket(Bucket=bucket) self._bucket_id += 1 diff --git a/python/tests/integration/arcticdb/test_s3.py b/python/tests/integration/arcticdb/test_s3.py index 22e5e44100..d33e4205ac 100644 --- a/python/tests/integration/arcticdb/test_s3.py +++ b/python/tests/integration/arcticdb/test_s3.py @@ -60,7 +60,6 @@ def test_s3_running_on_aws_fast_check(lib_name, s3_storage_factory, run_on_aws): assert lib_tool.inspect_env_variable("AWS_EC2_METADATA_DISABLED") == "true" -@pytest.mark.skip(reason="There is a flaky segfault in the test setup") def test_nfs_backed_s3_storage(lib_name, nfs_backed_s3_storage): # Given lib = nfs_backed_s3_storage.create_version_store_factory(lib_name)() @@ -94,7 +93,6 @@ def s3_storage_dots_in_path(request): yield g -@pytest.mark.skip(reason="There is a flaky segfault in the test setup") def test_read_path_with_dot(lib_name, s3_storage_dots_in_path): # Given factory = s3_storage_dots_in_path.create_version_store_factory(lib_name) From c1e92f5c13677a0b227590e1dbe36852d1b0b6c6 Mon Sep 17 00:00:00 2001 From: phoebusm Date: Mon, 2 Dec 2024 15:25:49 +0000 Subject: [PATCH 2/2] Add comment --- python/arcticdb/storage_fixtures/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/arcticdb/storage_fixtures/s3.py b/python/arcticdb/storage_fixtures/s3.py index 3176791efc..7e2e9060f9 100644 --- a/python/arcticdb/storage_fixtures/s3.py +++ b/python/arcticdb/storage_fixtures/s3.py @@ -337,7 +337,7 @@ def _start_server(self): self.client_cert_file = "" self.client_cert_dir = self.working_dir - spawn_context = multiprocessing.get_context('spawn') + spawn_context = multiprocessing.get_context("spawn") # In py3.7, multiprocess with forking will lead to seg fault in moto, possibly due to the handling of file descriptors self._p = spawn_context.Process( target=self.run_server, args=(