Skip to content

fix(deps): bump bugsnag to 6.27.1 - #1600

Closed
bmc08gt wants to merge 1 commit into
code/cashfrom
chore/bump-bugsnag
Closed

bmc08gt wants to merge 1 commit into
code/cashfrom
chore/bump-bugsnag

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Bugsnag 6.27.0, which shipped in 2026.9.1, can freeze the main thread in NativeBridge.addBreadcrumb. On 9.1 this accounts for eight ANRs across six devices. Each one shows the same chain across threads:

  • Bugsnag IO thread: stuck in RemoteConfigRequest.requestNewConfig (DNS lookup, connect, or read). Remote config fetching is new in 6.27.0.
  • Bugsnag Worker: inside NativeBridge.synchronizeState, holding the NDK environment lock and parked on DeviceDataCollector.calculateFreeDisk, whose future is queued behind that request.
  • main: waiting on the same lock in addBreadcrumb. The breadcrumb comes either from our trace() in RealSessionController.onAppInForeground or from Bugsnag's ActivityBreadcrumbCollector in MainActivity.onCreate.

6.27.1 changes NativeBridge to queue the native addBreadcrumb as a background task instead of taking the lock on the caller's thread, which removes the frame the main thread blocks in. synchronizeState still holds the lock while it collects device data, so other main-thread calls that go straight to the native side could still wait on it. None of the ANRs above took that path.

All four Bugsnag artifacts (bugsnag-android, -core, plugin-android-ndk, plugin-android-anr) resolve to 6.27.1.

6.27.0 (shipped in 2026.9.1) fetches its new remote config on the Bugsnag IO
thread at startup. When that request stalls, a Bugsnag worker holds the NDK
lock in synchronizeState while it waits behind the request for the free-disk
reading. Every native addBreadcrumb call needs the same lock, so a breadcrumb
from the main thread (our trace() in RealSessionController.onAppInForeground,
or Bugsnag's own ActivityBreadcrumbCollector in MainActivity.onCreate) ANRs.
All eight breadcrumb ANRs on 9.1 show this chain.

6.27.1 queues the native addBreadcrumb on a background task instead of taking
the lock on the caller's thread.
@bmc08gt bmc08gt self-assigned this Sep 28, 2026
@github-actions github-actions Bot added area: build-system Gradle, convention plugins, build-logic type: fix Bug fix labels Sep 28, 2026
@bmc08gt bmc08gt closed this Sep 28, 2026
@bmc08gt
bmc08gt deleted the chore/bump-bugsnag branch September 28, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant