Skip to content

SparkDirectoryUtil hangs when no Gluten local directory can be created #13097

Description

@LuciferYang

When every configured Spark local directory is uncreatable at startup (disk full, read-only mounts, or a spark.local.dir pointed at a file or a non-creatable path), SparkDirectoryUtil.ROOTS ends up empty, because the constructor logs and skips each directory whose creation throws.

The first namespace(...).mkChildDirRoundRobin(...) then constructs a Namespace whose cycleLooper is Stream.continually(ROOTS).flatten. Forcing that stream over an empty ROOTS hangs at the val cycleLooper initializer, so the caller spins forever with no error. The random variant (mkChildDirRandomly) instead throws IllegalArgumentException: bound must be positive from Random.nextInt(0). Neither points at the real cause, and the round-robin hang is silent (needs a jstack to diagnose).

Reachable in a degraded environment where the job cannot succeed anyway, so the value is failing fast with a clear message instead of hanging or crashing obscurely. Consumers on this path include spill-dir creation (VeloxIteratorApi/BoltIteratorApi), the JNI workspace (VeloxListenerApi), and shuffle-write dirs (ColumnarShuffleWriter).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions