Skip to content

SIGABRT in profiler (pthread_getcpuclockid → abort) #5492

@minwoo52

Description

@minwoo52

Environment

  • SDK: io.sentry:sentry-android 8.29.0 (NDK integration enabled by default)
  • Platform: Android (production), self-hosted Sentry

Steps to Reproduce

  1. Initialize SentryAndroid with transaction-based profiling enabled:
    options.tracesSampleRate = 0.1
    options.profilesSampleRate = 1.0
  2. Ship to a broad production user base (mixed OS versions / OEM devices), including Android 16.
  3. During normal usage, the profiler periodically samples thread CPU time.
  4. Intermittently (non-deterministic), the process aborts via SIGABRT while the profiler
    reads the CPU clock of a thread.

Expected Result

The profiler should not crash the host process when sampling thread CPU time.

Actual Result

Fatal native crash captured via the NDK signal handler.

  • Error: SIGABRT: Abort
  • mechanism: signalhandler, handled: no, level: fatal, platform: native
  • Crash path: abort ← pthread_getcpuclockid ← art::Thread::GetCpuNanoTime
  • Crash thread: "SentryExecutorServiceThreadFactory-0" (Sentry profiler/executor thread)
  • Event trace context shows client_sample_rate: 0.1, confirming profiling/tracing was active.
    Scale (single self-hosted project):
  • ~3,059 occurrences / ~1,285 impacted users
  • First seen: 2024-01-28, last seen: 2026-06-01 (still ongoing)
  • Still reproducing on the latest builds and on Android 16 / current-gen Samsung devices.
    Mitigation already applied on our side:
    We have REMOVED both options below to disable profiling, which stops the crash path:
    options.tracesSampleRate = 0.1
    options.profilesSampleRate = 1.0

Questions for the maintainers:

  1. If we switch to the new UI Profiling API (profileSessionSampleRate + profileLifecycle)
    instead of the (deprecated) transaction-based profilesSampleRate, will this crash NOT
    reproduce — or is UI Profiling still affected since it also relies on the Android Tracer?
  2. On SDK 8.43.0, with both tracesSampleRate and profilesSampleRate removed (profiling
    fully disabled), is there any remaining code path that could still trigger this SIGABRT?

Product Area

Unknown

Link

https://sentry.dailyshot.co/organizations/dailyshot/issues/6179/events/76ff3d6ee45a46c53f68b909da413fd7/?environment=production&project=4&query=is%3Aunresolved%20release.package%3Ashaker.bar.com%20level%3Afatal&referrer=next-event&sort=freq&stream_index=0

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions