jax-ml/jax · error · ConcretizationTypeError

The traceback property was called on

Error message

The traceback property was called on {self._error_repr()}.{self._origin_msg()}

What it means

ConcretizationTypeError raised when the Tracer.traceback property is accessed. traceback exposes the Python traceback captured where a materialized jax.Array was created (used for error reporting on deleted/uninitialized arrays); tracers are created internally during tracing and the property is not meaningful, so the stub raises.

Solutions

  1. Only access traceback on concrete jax.Array instances, outside traced functions.
  2. In shared helpers, guard with isinstance(x, jax.Array) (or check for a .traceback attribute on the aval) before touching it.
  3. For error reporting under transforms, rely on JAX's own exception messages and jax.debug.print with ordered_effects instead.
  4. If provenance is needed, capture the host-side traceback at call time in the non-traced caller.

Example fix

// before
def audit(x):
    logger.info(x.traceback)   # ConcretizationTypeError when x is a tracer
@jax.jit
def f(x):
    audit(x)
    return x + 1

// after
def audit(x):
    if isinstance(x, jax.Array):
        logger.info(x.traceback)
@jax.jit
def f(x):
    return x + 1
Defensive patterns

Strategy: type-guard

Validate before calling

import jax

def get_traceback(x):
    if isinstance(x, jax.core.Tracer):
        return None
    return getattr(x, 'traceback', None)

Type guard

import jax
from jax.core import Tracer

def provenance_available(x) -> bool:
    return isinstance(x, jax.Array) and not isinstance(x, Tracer)

Try / catch

from jax.errors import ConcretizationTypeError
try:
    tb = x.traceback
except ConcretizationTypeError:
    tb = None  # traced value; capture host-side traceback instead

Prevention

When it happens

Trigger: Reading `x.traceback` on a value being traced inside jit/grad/vmap/pmap/scan/remat or a custom rule, typically in error-reporting or debug-logging code.

Common situations: Custom exception handlers or audit logging that records x.traceback for arrays, run on traced values; debugging utilities for 'Array has been deleted' errors reused inside transformed functions; wrapper libraries that capture provenance on every array-like input.

Related errors


AI-assisted analysis of jax-ml/jax@1e1c6a8fc0 (2026-08-27). Data as JSON: /api/errors/84c89d80a8ec15c7. Report an issue: GitHub.

Appendix: source

Thrown at jax/_src/core.py:1278

  def is_fully_addressable(self):
    raise ConcretizationTypeError(self,
      f"The is_fully_addressable property was called on {self._error_repr()}."
      f"{self._origin_msg()}")

  @property
  def is_fully_replicated(self):
    raise ConcretizationTypeError(self,
      f"The is_fully_replicated property was called on {self._error_repr()}."
      f"{self._origin_msg()}")

  def on_device_size_in_bytes(self):
    raise ConcretizationTypeError(self,
      f"The on_device_size_in_bytes() method was called on {self._error_repr()}."
      f"{self._origin_msg()}")

  @property
  def traceback(self):
    raise ConcretizationTypeError(self,
      f"The traceback property was called on {self._error_repr()}."
      f"{self._origin_msg()}")

  def unsafe_buffer_pointer(self):
    raise ConcretizationTypeError(self,
      f"The unsafe_buffer_pointer() method was called on {self._error_repr()}."
      f"{self._origin_msg()}")

_jax.set_tracer_class(Tracer)

# these can be used to set up forwarding of properties and instance methods from
# Tracer instances to the underlying avals
aval_property = namedtuple("aval_property", ["fget"])
aval_method = namedtuple("aval_method", ["fun"])

pytype_aval_mappings[Tracer] = lambda x: x.aval
dtypes.register_canonicalize_value_handler(Tracer, None)

View on GitHub (pinned to 1e1c6a8fc0)