Skip to content

Fix Sentry singleton initialization race - #48

Open
elpete wants to merge 1 commit into
developmentfrom
fix/thread-safe-sentry-initialization
Open

elpete wants to merge 1 commit into
developmentfrom
fix/thread-safe-sentry-initialization

Conversation

@elpete

@elpete elpete commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Concurrent first-use requests can obtain SentryService after its constructor stores empty settings but before WireBox finishes dependency injection and onDIComplete(). Calling captureException() during that window throws The key [SHOWJAVASTACKTRACE] was not found in the struct. Valid keys are ([]), preventing the original application exception from reaching Sentry.

Mark the service threadSafe so WireBox publishes the singleton only after initialization completes. Add a deterministic regression that pauses real autowiring, verifies a concurrent lookup waits, and checks that the initialized service serializes the original exception. Only outbound transport is mocked; no Sentry events are sent.

Validation:

  • Reproduced the exact missing-settings exception before the fix.
  • All 27 module TestBox specs passed on BoxLang 1.17.2+60 (CommandBox engine package 1.17.2+56).
  • Repository formatting and git diff --check passed.
  • Adobe CF, Lucee, and live Sentry ingestion were not tested.

This is independent of the timestamp correction in #47.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

lucee@5 ColdBox ^6.0.0 Test Results

27 tests   27 ✅  1s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

lucee@5 ColdBox ^7.0.0 Test Results

27 tests   27 ✅  1s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2018 ColdBox ^7.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

lucee@6 ColdBox be Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2023 ColdBox ^7.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2023 ColdBox be Test Results

27 tests   27 ✅  1s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2021 ColdBox ^7.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2021 ColdBox be Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2023 ColdBox ^6.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2018 ColdBox ^6.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

lucee@5 ColdBox be Test Results

27 tests   27 ✅  1s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

adobe@2021 ColdBox ^6.0.0 Test Results

27 tests   27 ✅  0s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

boxlang@1 ColdBox be Test Results

27 tests   27 ✅  1s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit 47f6027.

♻️ This comment has been updated with latest results.

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