openjdk/jdk · warning

Could not create SplashScreen thread, error number:%d\n

Error message

Could not create SplashScreen thread, error number:%d\n

What it means

pthread_create() failed while the splashscreen code tried to start its rendering/event thread (SplashScreenThread). The errno-style code is printed (e.g. 11=EAGAIN, 12=ENOMEM, 22=EINVAL). The splash then runs without its thread — no animation, and events may not be pumped — but the JVM continues; the message is informational.

Source

Thrown at src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c:746

        SplashEventLoop(splash);
    }
    SplashUnlock(splash);
    SplashDone(splash);

    splash->isVisible=-1;
    return 0;
}

void
SplashCreateThread(Splash * splash) {
    pthread_t thr;
    pthread_attr_t attr;

    int rslt = pthread_attr_init(&attr);
    if (rslt != 0) return;
    rslt = pthread_create(&thr, &attr, SplashScreenThread, (void *) splash);
    if (rslt != 0) {
        fprintf(stderr, "Could not create SplashScreen thread, error number:%d\n", rslt);
    }
    pthread_attr_destroy(&attr);
}

void
SplashLock(Splash * splash) {
    pthread_mutex_lock(&splash->lock);
}

void
SplashUnlock(Splash * splash) {
    pthread_mutex_unlock(&splash->lock);
}

void
SplashClosePlatform(Splash * splash) {
    sendctl(splash, SPLASHCTL_QUIT);
}

View on GitHub (pinned to 88dfb74bbe)

Solutions

  1. If error 11 (EAGAIN): raise limits — ulimit -u, container pids limit (docker --pids-limit), cgroup pids.max, systemd TasksMax
  2. If error 12 (ENOMEM): free memory or raise the container memory limit; check ulimit -v is not restrictive
  3. Reduce concurrent JVM/process count on the host
  4. Suppress the splash (-splash: omitted) if not needed to avoid the extra thread entirely
Defensive patterns

Strategy: validation

Validate before calling

// before launch, verify thread headroom
// sh: [ "$(ulimit -u)" -gt 512 ] || echo 'raise nproc limit'
// container: docker run --pids-limit=512 ... -> raise or omit the cap

Prevention

When it happens

Trigger: System thread/memory limits hit at splash creation time: ulimit -u (nproc) reached, cgroup pids.max exhausted in a container, kernel threads-max/overcommit limits, or severe memory pressure giving ENOMEM. pthread_attr_init failure returns even earlier and silently skips thread creation.

Common situations: Containers (Docker/K8s) with low pids limit or memory cap; CI runners saturated with threads; apps spawning many JVMs on one host; systemd user slice TasksMax reached. Appears at app startup when the launcher shows the splash.

Related errors


AI-assisted analysis of openjdk/jdk@88dfb74bbe (2026-08-14). Data as JSON: /api/errors/2c5188266d3f959e. Report an issue: GitHub.