Skip to content

fix(cwl-demangle): increase timeout and chunk size for large Swift binaries - #649

Open
sentry[bot] wants to merge 1 commit into
mainfrom
claude/fix-demangle-timeout-large-binaries-39a7d55c-d4a2-4d0c-a93e-afcdd5320aa6
Open

fix(cwl-demangle): increase timeout and chunk size for large Swift binaries#649
sentry[bot] wants to merge 1 commit into
mainfrom
claude/fix-demangle-timeout-large-binaries-39a7d55c-d4a2-4d0c-a93e-afcdd5320aa6

Conversation

@sentry

@sentry sentry Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fixes LAUNCHPAD-6G

Problem

Large Swift binaries with 200,000+ symbols (e.g. VDIT.app, 296MB install size) cause cwl-demangle subprocess to exceed the 10-second timeout when processing individual chunks in parallel.

Root cause chain:

  1. The binary has 200,000+ Swift symbols
  2. With DEFAULT_CHUNK_SIZE=500, this creates 400+ chunks
  3. With parallel mode active (≥4 chunks), 4 cwl-demangle subprocesses run concurrently via ThreadPoolExecutor
  4. CPU/memory contention from 4 simultaneous processes causes individual cwl-demangle calls to exceed the 10-second DEFAULT_DEMANGLE_TIMEOUT
  5. TimeoutExpired is raised, and the chunk's symbols are silently lost (returned as empty {})

Fix

  • Increase DEFAULT_CHUNK_SIZE from 5005000: reduces the number of subprocess launches by 10x (e.g., 200k symbols goes from 400 chunks to 40 chunks), which dramatically reduces subprocess overhead and CPU contention between parallel workers.

  • Increase DEFAULT_DEMANGLE_TIMEOUT from 10s120s: gives each subprocess adequate time to complete even under contention with parallel sibling processes.

Both values remain configurable via LAUNCHPAD_DEMANGLE_CHUNK_SIZE and LAUNCHPAD_DEMANGLE_TIMEOUT environment variables for fine-tuning in production.

…naries

Fixes [LAUNCHPAD-6G](https://sentry.sentry.io/issues/7193300364/)

Large Swift binaries with 200,000+ symbols cause cwl-demangle subprocess
to exceed the 10-second timeout when processing individual chunks in
parallel. Four parallel ThreadPoolExecutor threads each launching a
cwl-demangle subprocess simultaneously causes CPU/memory contention.

- Increase DEFAULT_CHUNK_SIZE from 500 to 5000, reducing the number of
  subprocess launches by 10x (e.g., 200k symbols: 400 chunks → 40)
- Increase DEFAULT_DEMANGLE_TIMEOUT from 10s to 120s, giving each
  subprocess adequate time even under contention with parallel workers

Both values remain configurable via LAUNCHPAD_DEMANGLE_CHUNK_SIZE and
LAUNCHPAD_DEMANGLE_TIMEOUT environment variables.
@sentry

sentry Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Size Analysis

1 component analyzed, 1 component processing

iOS Builds

Name Configuration Version Download Size Install Size
HackerNews (iOS)
com.emergetools.hackernews
Release 3.8 (1) 6.5 MB (N/A) 9.7 MB (N/A)

Android Builds

Name Configuration Version Download Size Uncompressed Size
Hacker News (Android)
com.emergetools.hackernews
Release 1.0.2 (13) Processing... (-) Processing... (-)

Configure launchpad-test-ios status check rules

@sentry

sentry Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
HackerNews com.emergetools.hackernews 3.8 (1) Release

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

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.

1 participant