Skip to content

feat(bug-finding): warn users if resource config conflicts with machi…#159

Open
tkqdldk wants to merge 3 commits intoossf:mainfrom
tkqdldk:feat/resource-config-warn
Open

feat(bug-finding): warn users if resource config conflicts with machi…#159
tkqdldk wants to merge 3 commits intoossf:mainfrom
tkqdldk:feat/resource-config-warn

Conversation

@tkqdldk
Copy link
Copy Markdown

@tkqdldk tkqdldk commented Mar 28, 2026

Closes #49

Description

Adds resources check and a warning when the compose file resource configurations (max CPU and total memory) exceed machine resources. The check runs in "Validate Configuration for Running" phase, before Docker attempts to start containers.

The function emits a warning but does not stop the execution.

Changes

  • Added get_host_total_memory() in utils.py
  • Added _validate_machine_resources() in crs_compose.py
  • Added validation task in __validate_before_run
  • Added changelog entry

Validation

All existing tests pass.

P.S. : Can't assign a reviewer directly, cc @azchin for review

@azchin azchin self-requested a review March 30, 2026 14:38
Copy link
Copy Markdown
Collaborator

@azchin azchin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for the late response! I have a few requests detailed below. We also use a few linters and formatters in our CI workflow, so I recommend running them manually before pushing.

except(OSError):
pass

memeinfo = Path("/proc/meminfo")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meminfo typo (caught by ruff)

machine_cpu_count = os.cpu_count()
machine_memory = get_host_memory()

if machine_cpu_count is None or machine_memory == 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(C1) Let's get machine_memory to return None on failure

except subprocess.CalledProcessError as e:
raise RuntimeError(f"Error removing {path} with Docker: {e}")

def get_host_memory() -> int:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return val as int | None, see (C1)

for line in meminfo.read_text().splitlines():
if line.startswith("MemTotal:"):
return int(line.split()[1])*1024
return 0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return None see (C1)

except ValueError as e:
log_warning(f"Failed to parse memory for {name}: {e}")

cpu_check = max_cpus_required <= machine_cpu_count
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an off-by-one, since os.cpu_count() returns number of CPUs but cpuset is indexed by zero, so we'd get range of 0-3 on 4-core machine. max([0, 1, 2, 3]) == 3 < 4

max_cpus_required < machine_cpu_count would be the correct check. But please check/test for this edge case dynamically.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right ^^'... I will also add dynamic testing.

…ne resources

Signed-off-by: tkqdldk <samia.20.bouchaal@gmail.com>
@tkqdldk tkqdldk force-pushed the feat/resource-config-warn branch from c274218 to 867fac0 Compare April 1, 2026 10:46
tkqdldk added 2 commits April 1, 2026 13:40
… memory output

Signed-off-by: tkqdldk <samia.20.bouchaal@gmail.com>
Signed-off-by: tkqdldk <samia.20.bouchaal@gmail.com>
@tkqdldk tkqdldk force-pushed the feat/resource-config-warn branch from 867fac0 to c55125d Compare April 1, 2026 11:49
@tkqdldk tkqdldk requested a review from azchin April 1, 2026 15:06
@azchin
Copy link
Copy Markdown
Collaborator

azchin commented Apr 2, 2026

Hm I'm not seeing the error messages implemented in your PR in my output. The build does indeed abort, but that's because of Docker's error handling and happens after docker compose gets run.

I can take a deeper look at what we're missing after the weekend, if needed.

% uv run oss-crs build-target --compose-file example/crs-libfuzzer/compose.yaml --fuzz-proj-path ~/post/CRSBench/benchmarks/sanity-mock-c-delta-01
╭─────────────────────────────────────────── Init CRS: crs-libfuzzer ────────────────────────────────────────────╮
│          Task         Status                                                                                   │
│   ✓      Git Fetch    Success                                                                                  │
│   ✓      Git Reset    Success                                                                                  │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── CRS Compose Build Target ───────────────────────────────────────────╮
│          Task                                                           Status                                 │
│   ✗      crs-libfuzzer                                                  Failed                                 │
│            └─ build                                                     Failed                                 │
│              └─ Prepare docker compose file                             Success                                │
│              └─ Prepare docker images defined in docker compose file    Success                                │
│              └─ Build target by executing the docker compose            Failed                                 │
│              └─ Check outputs                                           Pending                                │
│              └─ 🧹 Cleanup Docker Compose                               Success                                │
│ ╭─────────────────────────────────────────── Error: crs-libfuzzer ───────────────────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ 📝 Docker compose output:                                                                                  │ │
│ │ ---                                                                                                        │ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ ---                                                                                                        │ │
│ │ 📝 Docker compose file contents:                                                                           │ │
│ │ ---                                                                                                        │ │
│ │ services:                                                                                                  │ │
│ │   target_builder:                                                                                          │ │
│ │     privileged: true                                                                                       │ │
│ │     shm_size: 2g                                                                                           │ │
│ │     environment:                                                                                           │ │
│ │       - HELPER=True                                                                                        │ │
│ │       - RUN_FUZZER_MODE=interactive                                                                        │ │
│ │       - FUZZING_ENGINE=libfuzzer                                                                           │ │
│ │       - SANITIZER=address                                                                                  │ │
│ │       - ARCHITECTURE=x86_64                                                                                │ │
│ │       - PROJECT_NAME=sanity-mock-c-delta-01                                                                │ │
│ │       - FUZZING_LANGUAGE=c                                                                                 │ │
│ │       - OSS_CRS_RUN_ENV_TYPE=local                                                                         │ │
│ │       - OSS_CRS_BUILD_ID=1775158626g9                                                                      │ │
│ │       - OSS_CRS_BUILD_OUT_DIR=/OSS_CRS_BUILD_OUT_DIR                                                       │ │
│ │       - OSS_CRS_TARGET=sanity-mock-c-delta-01                                                              │ │
│ │       - OSS_CRS_PROJ_PATH=/OSS_CRS_PROJ_PATH                                                               │ │
│ │       - OSS_CRS_TARGET_PROJ_DIR=/OSS_CRS_PROJ_PATH                                                         │ │
│ │       - OSS_CRS_REPO_PATH=/src/mock-c                                                                      │ │
│ │     build:                                                                                                 │ │
│ │       context: /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer        │ │
│ │       dockerfile:                                                                                          │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer/oss-crs/dockerfiles/b │ │
│ │ uilder.Dockerfile                                                                                          │ │
│ │       args:                                                                                                │ │
│ │         - target_base_image=sanity-mock-c-delta-01:4c6d77cdc8f0                                            │ │
│ │         - crs_version=1.0.0                                                                                │ │
│ │       additional_contexts:                                                                                 │ │
│ │         libcrs: /home/andrew/post/oss-crs-tkqdldk/libCRS                                                   │ │
│ │     cpuset: "4-129"                                                                                        │ │
│ │     mem_limit: "16G"                                                                                       │ │
│ │     volumes:                                                                                               │ │
│ │       -                                                                                                    │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/43e5a06b0d32/address/builds/1775158626g9/cr │ │
│ │ s/crs-libfuzzer/sanity-mock-c-delta-01_4c6d77cdc8f0/BUILD_OUT_DIR:/OSS_CRS_BUILD_OUT_DIR                   │ │
│ │ ---                                                                                                        │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─────────────────────────────────────────────── Error: build ───────────────────────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ 📝 Docker compose output:                                                                                  │ │
│ │ ---                                                                                                        │ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ ---                                                                                                        │ │
│ │ 📝 Docker compose file contents:                                                                           │ │
│ │ ---                                                                                                        │ │
│ │ services:                                                                                                  │ │
│ │   target_builder:                                                                                          │ │
│ │     privileged: true                                                                                       │ │
│ │     shm_size: 2g                                                                                           │ │
│ │     environment:                                                                                           │ │
│ │       - HELPER=True                                                                                        │ │
│ │       - RUN_FUZZER_MODE=interactive                                                                        │ │
│ │       - FUZZING_ENGINE=libfuzzer                                                                           │ │
│ │       - SANITIZER=address                                                                                  │ │
│ │       - ARCHITECTURE=x86_64                                                                                │ │
│ │       - PROJECT_NAME=sanity-mock-c-delta-01                                                                │ │
│ │       - FUZZING_LANGUAGE=c                                                                                 │ │
│ │       - OSS_CRS_RUN_ENV_TYPE=local                                                                         │ │
│ │       - OSS_CRS_BUILD_ID=1775158626g9                                                                      │ │
│ │       - OSS_CRS_BUILD_OUT_DIR=/OSS_CRS_BUILD_OUT_DIR                                                       │ │
│ │       - OSS_CRS_TARGET=sanity-mock-c-delta-01                                                              │ │
│ │       - OSS_CRS_PROJ_PATH=/OSS_CRS_PROJ_PATH                                                               │ │
│ │       - OSS_CRS_TARGET_PROJ_DIR=/OSS_CRS_PROJ_PATH                                                         │ │
│ │       - OSS_CRS_REPO_PATH=/src/mock-c                                                                      │ │
│ │     build:                                                                                                 │ │
│ │       context: /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer        │ │
│ │       dockerfile:                                                                                          │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer/oss-crs/dockerfiles/b │ │
│ │ uilder.Dockerfile                                                                                          │ │
│ │       args:                                                                                                │ │
│ │         - target_base_image=sanity-mock-c-delta-01:4c6d77cdc8f0                                            │ │
│ │         - crs_version=1.0.0                                                                                │ │
│ │       additional_contexts:                                                                                 │ │
│ │         libcrs: /home/andrew/post/oss-crs-tkqdldk/libCRS                                                   │ │
│ │     cpuset: "4-129"                                                                                        │ │
│ │     mem_limit: "16G"                                                                                       │ │
│ │     volumes:                                                                                               │ │
│ │       -                                                                                                    │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/43e5a06b0d32/address/builds/1775158626g9/cr │ │
│ │ s/crs-libfuzzer/sanity-mock-c-delta-01_4c6d77cdc8f0/BUILD_OUT_DIR:/OSS_CRS_BUILD_OUT_DIR                   │ │
│ │ ---                                                                                                        │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─────────────────────────── Error: Build target by executing the docker compose ────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

@tkqdldk
Copy link
Copy Markdown
Author

tkqdldk commented Apr 8, 2026

Hm I'm not seeing the error messages implemented in your PR in my output. The build does indeed abort, but that's because of Docker's error handling and happens after docker compose gets run.

I can take a deeper look at what we're missing after the weekend, if needed.

% uv run oss-crs build-target --compose-file example/crs-libfuzzer/compose.yaml --fuzz-proj-path ~/post/CRSBench/benchmarks/sanity-mock-c-delta-01
╭─────────────────────────────────────────── Init CRS: crs-libfuzzer ────────────────────────────────────────────╮
│          Task         Status                                                                                   │
│   ✓      Git Fetch    Success                                                                                  │
│   ✓      Git Reset    Success                                                                                  │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── CRS Compose Build Target ───────────────────────────────────────────╮
│          Task                                                           Status                                 │
│   ✗      crs-libfuzzer                                                  Failed                                 │
│            └─ build                                                     Failed                                 │
│              └─ Prepare docker compose file                             Success                                │
│              └─ Prepare docker images defined in docker compose file    Success                                │
│              └─ Build target by executing the docker compose            Failed                                 │
│              └─ Check outputs                                           Pending                                │
│              └─ 🧹 Cleanup Docker Compose                               Success                                │
│ ╭─────────────────────────────────────────── Error: crs-libfuzzer ───────────────────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ 📝 Docker compose output:                                                                                  │ │
│ │ ---                                                                                                        │ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ ---                                                                                                        │ │
│ │ 📝 Docker compose file contents:                                                                           │ │
│ │ ---                                                                                                        │ │
│ │ services:                                                                                                  │ │
│ │   target_builder:                                                                                          │ │
│ │     privileged: true                                                                                       │ │
│ │     shm_size: 2g                                                                                           │ │
│ │     environment:                                                                                           │ │
│ │       - HELPER=True                                                                                        │ │
│ │       - RUN_FUZZER_MODE=interactive                                                                        │ │
│ │       - FUZZING_ENGINE=libfuzzer                                                                           │ │
│ │       - SANITIZER=address                                                                                  │ │
│ │       - ARCHITECTURE=x86_64                                                                                │ │
│ │       - PROJECT_NAME=sanity-mock-c-delta-01                                                                │ │
│ │       - FUZZING_LANGUAGE=c                                                                                 │ │
│ │       - OSS_CRS_RUN_ENV_TYPE=local                                                                         │ │
│ │       - OSS_CRS_BUILD_ID=1775158626g9                                                                      │ │
│ │       - OSS_CRS_BUILD_OUT_DIR=/OSS_CRS_BUILD_OUT_DIR                                                       │ │
│ │       - OSS_CRS_TARGET=sanity-mock-c-delta-01                                                              │ │
│ │       - OSS_CRS_PROJ_PATH=/OSS_CRS_PROJ_PATH                                                               │ │
│ │       - OSS_CRS_TARGET_PROJ_DIR=/OSS_CRS_PROJ_PATH                                                         │ │
│ │       - OSS_CRS_REPO_PATH=/src/mock-c                                                                      │ │
│ │     build:                                                                                                 │ │
│ │       context: /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer        │ │
│ │       dockerfile:                                                                                          │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer/oss-crs/dockerfiles/b │ │
│ │ uilder.Dockerfile                                                                                          │ │
│ │       args:                                                                                                │ │
│ │         - target_base_image=sanity-mock-c-delta-01:4c6d77cdc8f0                                            │ │
│ │         - crs_version=1.0.0                                                                                │ │
│ │       additional_contexts:                                                                                 │ │
│ │         libcrs: /home/andrew/post/oss-crs-tkqdldk/libCRS                                                   │ │
│ │     cpuset: "4-129"                                                                                        │ │
│ │     mem_limit: "16G"                                                                                       │ │
│ │     volumes:                                                                                               │ │
│ │       -                                                                                                    │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/43e5a06b0d32/address/builds/1775158626g9/cr │ │
│ │ s/crs-libfuzzer/sanity-mock-c-delta-01_4c6d77cdc8f0/BUILD_OUT_DIR:/OSS_CRS_BUILD_OUT_DIR                   │ │
│ │ ---                                                                                                        │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─────────────────────────────────────────────── Error: build ───────────────────────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ 📝 Docker compose output:                                                                                  │ │
│ │ ---                                                                                                        │ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ │ ---                                                                                                        │ │
│ │ 📝 Docker compose file contents:                                                                           │ │
│ │ ---                                                                                                        │ │
│ │ services:                                                                                                  │ │
│ │   target_builder:                                                                                          │ │
│ │     privileged: true                                                                                       │ │
│ │     shm_size: 2g                                                                                           │ │
│ │     environment:                                                                                           │ │
│ │       - HELPER=True                                                                                        │ │
│ │       - RUN_FUZZER_MODE=interactive                                                                        │ │
│ │       - FUZZING_ENGINE=libfuzzer                                                                           │ │
│ │       - SANITIZER=address                                                                                  │ │
│ │       - ARCHITECTURE=x86_64                                                                                │ │
│ │       - PROJECT_NAME=sanity-mock-c-delta-01                                                                │ │
│ │       - FUZZING_LANGUAGE=c                                                                                 │ │
│ │       - OSS_CRS_RUN_ENV_TYPE=local                                                                         │ │
│ │       - OSS_CRS_BUILD_ID=1775158626g9                                                                      │ │
│ │       - OSS_CRS_BUILD_OUT_DIR=/OSS_CRS_BUILD_OUT_DIR                                                       │ │
│ │       - OSS_CRS_TARGET=sanity-mock-c-delta-01                                                              │ │
│ │       - OSS_CRS_PROJ_PATH=/OSS_CRS_PROJ_PATH                                                               │ │
│ │       - OSS_CRS_TARGET_PROJ_DIR=/OSS_CRS_PROJ_PATH                                                         │ │
│ │       - OSS_CRS_REPO_PATH=/src/mock-c                                                                      │ │
│ │     build:                                                                                                 │ │
│ │       context: /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer        │ │
│ │       dockerfile:                                                                                          │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/crs_src/crs-libfuzzer/oss-crs/dockerfiles/b │ │
│ │ uilder.Dockerfile                                                                                          │ │
│ │       args:                                                                                                │ │
│ │         - target_base_image=sanity-mock-c-delta-01:4c6d77cdc8f0                                            │ │
│ │         - crs_version=1.0.0                                                                                │ │
│ │       additional_contexts:                                                                                 │ │
│ │         libcrs: /home/andrew/post/oss-crs-tkqdldk/libCRS                                                   │ │
│ │     cpuset: "4-129"                                                                                        │ │
│ │     mem_limit: "16G"                                                                                       │ │
│ │     volumes:                                                                                               │ │
│ │       -                                                                                                    │ │
│ │ /home/andrew/post/oss-crs-tkqdldk/.oss-crs-workdir/crs_compose/43e5a06b0d32/address/builds/1775158626g9/cr │ │
│ │ s/crs-libfuzzer/sanity-mock-c-delta-01_4c6d77cdc8f0/BUILD_OUT_DIR:/OSS_CRS_BUILD_OUT_DIR                   │ │
│ │ ---                                                                                                        │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─────────────────────────── Error: Build target by executing the docker compose ────────────────────────────╮ │
│ │ Command failed with exit code 1:                                                                           │ │
│ │ docker compose -p crs_582rjhwn5c -f /tmp/da3y01n0ad/docker-compose.yaml run --rm target_builder            │ │
│ │                                                                                                            │ │
│ │  Network crs_582rjhwn5c_default Creating                                                                   │ │
│ │  Network crs_582rjhwn5c_default Created                                                                    │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Creating                                         │ │
│ │  Container crs_582rjhwn5c-target_builder-run-5f9d03e48a25 Error response from daemon: Requested CPUs are   │ │
│ │ not available - requested 4-129, available: 0-127                                                          │ │
│ │ Error response from daemon: Requested CPUs are not available - requested 4-129, available: 0-127           │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Hi, sorry for the late response, so the validation only runs before run currently, as I understood that would be the only need. I'll extend the check to build-target so the warning shows here too.

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

Successfully merging this pull request may close these issues.

feat(bug-finding): warn users if resource config conflicts with actual machine resources

2 participants