{"record":{"id":"2c5188266d3f959e","repo":"openjdk/jdk","slug":"could-not-create-splashscreen-thread-error-number","errorCode":null,"errorMessage":"Could not create SplashScreen thread, error number:%d\\n","messagePattern":"Could not create SplashScreen thread, error number:(.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c","lineNumber":746,"sourceCode":"        SplashEventLoop(splash);\n    }\n    SplashUnlock(splash);\n    SplashDone(splash);\n\n    splash->isVisible=-1;\n    return 0;\n}\n\nvoid\nSplashCreateThread(Splash * splash) {\n    pthread_t thr;\n    pthread_attr_t attr;\n\n    int rslt = pthread_attr_init(&attr);\n    if (rslt != 0) return;\n    rslt = pthread_create(&thr, &attr, SplashScreenThread, (void *) splash);\n    if (rslt != 0) {\n        fprintf(stderr, \"Could not create SplashScreen thread, error number:%d\\n\", rslt);\n    }\n    pthread_attr_destroy(&attr);\n}\n\nvoid\nSplashLock(Splash * splash) {\n    pthread_mutex_lock(&splash->lock);\n}\n\nvoid\nSplashUnlock(Splash * splash) {\n    pthread_mutex_unlock(&splash->lock);\n}\n\nvoid\nSplashClosePlatform(Splash * splash) {\n    sendctl(splash, SPLASHCTL_QUIT);\n}","sourceCodeStart":728,"sourceCodeEnd":764,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c#L728-L764","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["If error 11 (EAGAIN): raise limits — ulimit -u, container pids limit (docker --pids-limit), cgroup pids.max, systemd TasksMax","If error 12 (ENOMEM): free memory or raise the container memory limit; check ulimit -v is not restrictive","Reduce concurrent JVM/process count on the host","Suppress the splash (-splash: omitted) if not needed to avoid the extra thread entirely"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before launch, verify thread headroom\n// sh: [ \"$(ulimit -u)\" -gt 512 ] || echo 'raise nproc limit'\n// container: docker run --pids-limit=512 ... -> raise or omit the cap","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set sane pids/memory limits in containers (or leave defaults)","Monitor thread counts of JVM-heavy hosts","Skip the splash in constrained environments to save a thread"],"tags":["splashscreen","pthread","threads","resource-limits","container","native"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}