From 8f24535f921d90c4a2117a40c56a5ae75c2b2569 Mon Sep 17 00:00:00 2001 From: Lauri Piisang Date: Thu, 30 Apr 2026 16:19:37 +0400 Subject: [PATCH 1/2] test[notask]: fix android sharded-model-resume scudo oom Tag sharded-model {detection, hash-validation, progress, resume, cancellation} with dependency "sharded-embeddings" instead of "none". With dep:none and the default loadSharded handler, modelSetup evicts sharded-embeddings then immediately re-mmaps the same 5 shards; on Android (Pixel 10 Pro) Scudo's mmap fails with "internal map failure" before the kernel reclaims the prior maps, killing the worklet and cascading the rest of the sharded category. Also bump mobile unloadSettleMs 100 -> 200 ms to keep some slack for remaining same-model unload / reload paths. --- packages/sdk/tests-qvac/tests/mobile/consumer.ts | 12 +++++++----- packages/sdk/tests-qvac/tests/sharded-model-tests.ts | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/sdk/tests-qvac/tests/mobile/consumer.ts b/packages/sdk/tests-qvac/tests/mobile/consumer.ts index 5414835b16..5c7ff3ae6c 100644 --- a/packages/sdk/tests-qvac/tests/mobile/consumer.ts +++ b/packages/sdk/tests-qvac/tests/mobile/consumer.ts @@ -68,11 +68,13 @@ import { LifecycleExecutor } from "../shared/executors/lifecycle-executor.js"; import { ConfigExecutor } from "../shared/executors/config-executor.js"; const resources = new ResourceManager({ - // Mobile (iOS) needs a tick after each unloadModel for the kernel to - // actually release pages — without it, the next test's load arrives - // while the previous model's RSS is still resident and crashes the - // GGML allocator. Empirically 200ms is enough; desktop doesn't need it. - unloadSettleMs: 100, + // Mobile (iOS + Android) needs a tick after each unloadModel for the + // kernel to actually release pages / reclaim mmap regions — without + // it, the next test's load arrives while the previous model's RSS is + // still resident and either the GGML allocator crashes (iOS) or + // Scudo's mmap fails with "internal map failure" (Android). Empirically + // 200ms is enough; desktop doesn't need it. + unloadSettleMs: 200, }); resources.define("llm", { diff --git a/packages/sdk/tests-qvac/tests/sharded-model-tests.ts b/packages/sdk/tests-qvac/tests/sharded-model-tests.ts index 82c9fd963d..0f045c826c 100644 --- a/packages/sdk/tests-qvac/tests/sharded-model-tests.ts +++ b/packages/sdk/tests-qvac/tests/sharded-model-tests.ts @@ -13,14 +13,14 @@ export const shardedModelDetection: TestDefinition = { params: {}, expectation: { validation: "type", expectedType: "string" }, suites: ["smoke"], - metadata: { category: "sharded-model", dependency: "none", estimatedDurationMs: 120000 }, + metadata: { category: "sharded-model", dependency: "sharded-embeddings", estimatedDurationMs: 120000 }, }; export const shardedModelHashValidation: TestDefinition = { testId: "sharded-model-hash-validation", params: {}, expectation: { validation: "type", expectedType: "string" }, - metadata: { category: "sharded-model", dependency: "none", estimatedDurationMs: 120000 }, + metadata: { category: "sharded-model", dependency: "sharded-embeddings", estimatedDurationMs: 120000 }, }; export const shardedModelBackwardCompatibility: TestDefinition = { @@ -34,21 +34,21 @@ export const shardedModelProgress: TestDefinition = { testId: "sharded-model-progress", params: {}, expectation: { validation: "type", expectedType: "string" }, - metadata: { category: "sharded-model", dependency: "none", estimatedDurationMs: 120000 }, + metadata: { category: "sharded-model", dependency: "sharded-embeddings", estimatedDurationMs: 120000 }, }; export const shardedModelResume: TestDefinition = { testId: "sharded-model-resume", params: {}, expectation: { validation: "type", expectedType: "string" }, - metadata: { category: "sharded-model", dependency: "none", estimatedDurationMs: 180000 }, + metadata: { category: "sharded-model", dependency: "sharded-embeddings", estimatedDurationMs: 180000 }, }; export const shardedModelCancellation: TestDefinition = { testId: "sharded-model-cancellation", params: {}, expectation: { validation: "type", expectedType: "string" }, - metadata: { category: "sharded-model", dependency: "none", estimatedDurationMs: 60000 }, + metadata: { category: "sharded-model", dependency: "sharded-embeddings", estimatedDurationMs: 60000 }, }; export const shardedModelInference: TestDefinition = { From 3f00263c9a1ccb2ce13a58492d928afb9f19c9c2 Mon Sep 17 00:00:00 2001 From: Lauri Piisang Date: Thu, 30 Apr 2026 17:33:37 +0400 Subject: [PATCH 2/2] infra[notask]: pass --report-dir to CI sdk producer runs Without --report-dir, BatchOrchestrator skips writing app-mem.ndjson and test-timeline.ndjson, so mobile in-app memory samples published on qvac/app-memory get dropped silently and the per-test memory rows / chart / suite peak never make it into the report. run:local already passes --report-dir; the three CI workflows did not. Pin --report-dir=./reports in test-android-sdk.yml, test-ios-sdk.yml and test-desktop-sdk.yml. The existing "Upload results" step already uploads ${working-directory}/reports/ so the new files ride along. --- .github/workflows/test-android-sdk.yml | 1 + .github/workflows/test-desktop-sdk.yml | 1 + .github/workflows/test-ios-sdk.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/test-android-sdk.yml b/.github/workflows/test-android-sdk.yml index 710f15e620..1cf83de7ce 100644 --- a/.github/workflows/test-android-sdk.yml +++ b/.github/workflows/test-android-sdk.yml @@ -576,6 +576,7 @@ jobs: --runId "${{ needs.build.outputs.runId }}" \ --consumer-timeout "${{ inputs.consumer-timeout }}" \ --config . \ + --report-dir=./reports \ $FILTER_ARG \ $SUITE_ARG \ $EXCLUDE_SUITE_ARG diff --git a/.github/workflows/test-desktop-sdk.yml b/.github/workflows/test-desktop-sdk.yml index f5a75dc7c4..9148e7a3cc 100644 --- a/.github/workflows/test-desktop-sdk.yml +++ b/.github/workflows/test-desktop-sdk.yml @@ -370,6 +370,7 @@ jobs: '--runId=${{ steps.runid.outputs.runId }}', '--consumer-timeout=${{ inputs.consumer-timeout }}', '--config=.', + '--report-dir=./reports', ...filterArgs, ...suiteArgs, ...excludeSuiteArgs diff --git a/.github/workflows/test-ios-sdk.yml b/.github/workflows/test-ios-sdk.yml index ad11073604..86c8a8ab69 100644 --- a/.github/workflows/test-ios-sdk.yml +++ b/.github/workflows/test-ios-sdk.yml @@ -698,6 +698,7 @@ jobs: --runId "${{ needs.build.outputs.runId }}" \ --consumer-timeout "${{ inputs.consumer-timeout }}" \ --config . \ + --report-dir=./reports \ $FILTER_ARG \ $SUITE_ARG \ $EXCLUDE_SUITE_ARG