-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
11.0.16, 16.0.1, 17, 20
-
generic
-
linux
ADDITIONAL SYSTEM INFORMATION :
Debian10 (running inside docker)
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
We start a regular subprocess using the java binary via a script and rely on being able to consume the java processes' stdout and parse it as JSON. (in the particular case to start up a small java server that communicates its random, OS-assigned TCP-port via stdout so we can connect to it later on, fully automated).
In our particular environment the assumption that stdout is pure JSON broke because of the following log message on stdout, which we feel belongs to stderr:
[0.000s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /cgroup-in/cpuset.
We have found this while googling for solutions: https://openjdk.java.net/jeps/158 containing most importantly this statement:
"The default configuration is that all messages using warning and error level are output to stderr." which does not seem to be true in this case. This issues is being addressed withJDK-8272121.
The second issue, why this warning is being produced in the first place is being addressed withJDK-8293472.
REGRESSION : Last worked in version 15
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Create a new empty folder and cd into it
- Download and extract jdk16 or 16.01 into it
- Create a file called "Dockerfile" with the following contents
FROM debian:10
ADD jdk-16 /jdk-16
- Build a docker container using the command
docker build -t jdk16-logging-repro -f Dockerfile .
- run it using the following command
docker run -it --rm -v /sys/fs/cgroup:/cgroup-in:ro jdk16-logging-repro
- inside the container do a "jdk16/bin/java -version 2>/dev/null"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output or only the java version information
ACTUAL -
[0.000s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /cgroup-in/cpuset.
CUSTOMER SUBMITTED WORKAROUND :
Can be worked around by not specifying "-v /sys/fs/cgroup:/cgroup-in:ro" on the docker invocation or by using -XX:-UseContainerSupport being passed to java -version.
FREQUENCY : always
Debian10 (running inside docker)
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
We start a regular subprocess using the java binary via a script and rely on being able to consume the java processes' stdout and parse it as JSON. (in the particular case to start up a small java server that communicates its random, OS-assigned TCP-port via stdout so we can connect to it later on, fully automated).
In our particular environment the assumption that stdout is pure JSON broke because of the following log message on stdout, which we feel belongs to stderr:
[0.000s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /cgroup-in/cpuset.
We have found this while googling for solutions: https://openjdk.java.net/jeps/158 containing most importantly this statement:
"The default configuration is that all messages using warning and error level are output to stderr." which does not seem to be true in this case. This issues is being addressed with
The second issue, why this warning is being produced in the first place is being addressed with
REGRESSION : Last worked in version 15
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Create a new empty folder and cd into it
- Download and extract jdk16 or 16.01 into it
- Create a file called "Dockerfile" with the following contents
FROM debian:10
ADD jdk-16 /jdk-16
- Build a docker container using the command
docker build -t jdk16-logging-repro -f Dockerfile .
- run it using the following command
docker run -it --rm -v /sys/fs/cgroup:/cgroup-in:ro jdk16-logging-repro
- inside the container do a "jdk16/bin/java -version 2>/dev/null"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output or only the java version information
ACTUAL -
[0.000s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /cgroup-in/cpuset.
CUSTOMER SUBMITTED WORKAROUND :
Can be worked around by not specifying "-v /sys/fs/cgroup:/cgroup-in:ro" on the docker invocation or by using -XX:-UseContainerSupport being passed to java -version.
FREQUENCY : always
- duplicates
-
JDK-8293472 Incorrect container resource limit detection if manual cgroup fs mounts present
-
- Resolved
-
- relates to
-
JDK-8253435 Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
-
- Resolved
-
-
JDK-8272121 Unified Logging always writes warnings to stdout
-
- Closed
-