Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pthread_create failed (EPERM) when launching docker container on eclipse-temurin:17.0.3_7 #2976

Closed
cotjoey opened this issue Jun 9, 2022 · 6 comments
Labels
docker Issues related to our docker files and docker scripts testing Issues that enhance or fix our test suites

Comments

@cotjoey
Copy link

cotjoey commented Jun 9, 2022

What are you trying to do?

Build a Docker image from "eclipse-temurin:17", and then run its java in a container.

Expected behaviour:

When the Docker container is started, I should be able to run java and all it's arguments.

Observed behaviour:

When the Docker container starts, the first java command errors out with the following message:

[0.003s][warning][os,thread] Failed to start thread - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# //hs_err_pid9.log

Any other comments:

I was able to test with both eclipse-temurin:17.0.3_7-jre and eclipse-temurin:17.0.2_8-jre and only version 17.0.2_8-jre gives me the error.

Output of testing:

--> version 17.0.3_7-jre - fails

$ sudo docker run -it eclipse-temurin:17.0.3_7-jre /bin/bash
root@1cf1e9b60376:/# java -version
[0.003s][warning][os,thread] Failed to start thread - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# //hs_err_pid9.log

--> version 17.0.2_8 - succeeds

$ sudo docker run -it eclipse-temurin:17.0.2_8-jre /bin/bash
root@81263cb3f400:/# java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
@github-actions github-actions bot added docker Issues related to our docker files and docker scripts testing Issues that enhance or fix our test suites labels Jun 9, 2022
@jerboaa
Copy link
Contributor

jerboaa commented Jun 10, 2022

Please upgrade your docker. See: adoptium/containers#215 (comment)

@jerboaa jerboaa closed this as completed Jun 10, 2022
@holgerstolzenberg
Copy link

Same for us in another context but the key info here is that we switched our Temurin based JDK eclipse-temurin:17.0.3_7-jre to a focal based image eclipse-temurin:17.0.3_7-jre-focal.

Side note: The Docker upgrade did not work for us, it had no effect.

@Lonzak
Copy link

Lonzak commented Apr 9, 2024

@holgerstolzenberg

Side note: The Docker upgrade did not work for us, it had no effect.

So how did you solve it?

@holgerstolzenberg
Copy link

As stated in the comment switching from 17.0.3_7-jre to 17.0.3_7-jre-focal for the image worked for us (this is meant by focal based).

@Lonzak
Copy link

Lonzak commented Apr 9, 2024

What does "focal" mean? We use a debian-slim base image and install java afterwards. The "focal" stuff seem to be an extra docker image based on ubuntu:

Tags: 11.0.22_7-jdk-focal, 11-jdk-focal, 11-focal
Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
GitCommit: 2dae22b74703ce78b2951bc458945fdfde5b8f50
Directory: 11/jdk/ubuntu/focal

Mhm hope that the docker-engine upgrade works...

@holgerstolzenberg
Copy link

Yes we moved to Ubuntu Focal based image. I guess it packages different docker version or containerd version.
Focal is a codename for a certain ubuntu major version.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Issues related to our docker files and docker scripts testing Issues that enhance or fix our test suites
Projects
None yet
Development

No branches or pull requests

4 participants