oci-oracle-xe
oci-oracle-xe copied to clipboard
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
I had a docker image gvenzl/oracle-xe running on my macbook desktop for some time. I recently restarted it but now it exits directly. Could this be related to Docker desktop upgrade 4.1.1 ? As it seems related to cgroup discussions on versions Log extract
2022-08-11T15:55:00.996476+00:00
Warning: VKTM detected a time stall.
Time drifts can result in unexpected behavior such as time-outs.
Please see the VKTM trace file for more details:
/opt/oracle/diag/rdbms/xe/XE/trace/XE_vktm_42.trc
2022-08-11T16:56:37.841846+00:00
Warning: VKTM detected a forward time drift.
Time drifts can result in unexpected behavior such as time-outs.
Please see the VKTM trace file for more details:
/opt/oracle/diag/rdbms/xe/XE/trace/XE_vktm_42.trc
2022-08-11T17:56:40.790778+00:00
Warning: VKTM detected a forward time drift.
Time drifts can result in unexpected behavior such as time-outs.
Please see the VKTM trace file for more details:
/opt/oracle/diag/rdbms/xe/XE/trace/XE_vktm_42.trc
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
CONTAINER: starting up...
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
/opt/oracle/container-entrypoint.sh: line 293: /sys/fs/cgroup/memory.max: No such file or directory
Hey @vortex314,
Hm, yeah, I think it's related to the move to cgroups-v2. Need to update that logic to deal with v1 and v2, thanks a lot for bringing this up!
On second thought, I just realized that /sys/fs/cgroup/memory.max
is the path for cgroups-v2 and the file already got a check for cgroups-v1 vs. cgroups-v2 in the code:
https://github.com/gvenzl/oci-oracle-xe/blob/4a7062989bf7126cf18b46663111298f4b59778d/container-entrypoint.sh#L292-L299
Is there yet another cgroups version out there? What discussions are you referring to?
This seems related to https://github.com/oracle/docker-images/issues/2334
Buildkit does not seem to support cgroups, however building images without buildkit does not support secrets. For now we'll manage without secrets, but it would be nice if you could provide a fallback memory amount. For instance something like the following:
container_memory=$(< /sys/fs/cgroup/memory.max || echo 2147483648)
Inspired by https://github.com/oracle/docker-images/pull/2370/files
Ah I see, thanks for that!
Yeah, that can be easily amended to take a default.
This is fixed now, 2GB is used as the default when these files are not available.