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

Can't start Elasticsearch image #965

Open
1 of 5 tasks
xiongtx opened this issue Jan 17, 2024 · 9 comments
Open
1 of 5 tasks

Can't start Elasticsearch image #965

xiongtx opened this issue Jan 17, 2024 · 9 comments

Comments

@xiongtx
Copy link

xiongtx commented Jan 17, 2024

Description

Can't start elasticsearch:8.11.3 properly. Getting the following error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1474b78040, pid=7, tid=16
#
# JRE version: OpenJDK Runtime Environment (21.0.1+12) (build 21.0.1+12-29)
# Java VM: OpenJDK 64-Bit Server VM (21.0.1+12-29, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
# Problematic frame:
# J 187 c1 java.lang.invoke.MethodType.parameterCount()I [email protected] (6 bytes) @ 0x00007f1474b78040 [0x00007f1474b78020+0x0000000000000020]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /usr/share/elasticsearch/core.7)
#
# An error report file with more information is saved as:
# /usr/share/elasticsearch/hs_err_pid7.log
[2.934s][warning][os] Loading hsdis library failed

Here's the image

$ docker image ls
REPOSITORY                                      TAG       IMAGE ID       CREATED       SIZE
docker.elastic.co/elasticsearch/elasticsearch   8.11.3    792fab0c0bd8   5 weeks ago   1.43GB

Version

colima version 0.6.7
git commit: ba1be00

runtime: docker
arch: x86_64
client: v23.0.0
server: v24.0.7
limactl version 0.19.1
qemu-img version 8.2.0

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

INFO[0000] colima is running using QEMU
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:https:///Users/tianxiong.xiong/.colima/default/docker.sock

Reproduction Steps

  1. Use the following docker-compose.yml:
version: '3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.11.3
    ports:
      - "9200:9200"
    environment:
      - discovery.type=single-node
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
  1. docker-compose up -d
  2. Wait for the container to fail
  3. docker-compose logs

Expected behaviour

Container starts properly.

Running Elasticsearch directly works fine.

Additional context

No response

@madhavhugar
Copy link

@xiongtx The default resource requirements of elasticsearch container are higher than what is configured for when running Colima in the default settings mode. It is possible that this is an issue caused by resource constrains. Could you run colima list and share your results?

Additionally, try running the following and try restarting the elasticsearch container to rule out any resource constrains issue:

colima stop
colima start --cpu 3 --memory 5 --arch x86_64

@sfsmfc
Copy link

sfsmfc commented Jan 29, 2024

I can confirm this issue with elasticsearch in version 7.17.x. The output from colima listlooks like:

PROFILE STATUS ARCH CPUS MEMORY DISK RUNTIME ADDRESS
default Running x86_64 6 8GiB 60GiB docker

@xiongtx
Copy link
Author

xiongtx commented Jan 30, 2024

@madhavhugar I don't think this is a resource constraint issue:

$ colima list
PROFILE    STATUS     ARCH      CPUS    MEMORY    DISK     RUNTIME    ADDRESS
default    Running    x86_64    8       10GiB     60GiB    docker

@abiosoft
Copy link
Owner

abiosoft commented Feb 1, 2024

May I ask why you are emulating x86_64 for elasticsearch when there are native aarch64 images?

@xiongtx
Copy link
Author

xiongtx commented Feb 3, 2024

We're also running an Oracle image that only works on x86.

@medkbadri
Copy link

Hello,
Any updates on this issue.
I keep getting the same errors randomly while trying to run x86_64 containers on top of Colima.

@d-led
Copy link

d-led commented May 7, 2024

same happens with a Confluence Image. The crashes did not happen on an Intel Mac, if that helps. Crashes are varied, not always the same.

One:

 #
 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  SIGSEGV (0xb) at pc=0x00007fc5b3b2359e, pid=7, tid=85
 #
 # JRE version: OpenJDK Runtime Environment Temurin-11.0.23+9 (11.0.23+9) (build 11.0.23+9)
 # Java VM: OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (11.0.23+9, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
 # Problematic frame:
 # J 1441 c2 java.util.LinkedHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; [email protected] (33 bytes) @ 0x00007fc5b3b2359e [0x00007fc5b3b23540+0x000000000000005e]
 #
 # Core dump will be written. Default location: /var/atlassian/application-data/confluence/core
 #
 # An error report file with more information is saved as:
 # /var/atlassian/application-data/confluence/hs_err_pid7.log
 Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
 #
 # If you would like to submit a bug report, please visit:
 #   https://github.com/adoptium/adoptium-support/issues
 #

another one:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f46c4936600, pid=7, tid=106
#
# JRE version: OpenJDK Runtime Environment Temurin-11.0.23+9 (11.0.23+9) (build 11.0.23+9)
# Java VM: OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (11.0.23+9, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# J 5557 c1 org.yaml.snakeyaml.reader.StreamReader.peek(I)I (24 bytes) @ 0x00007f46c4936600 [0x00007f46c49365c0+0x0000000000000040]
#
# Core dump will be written. Default location: /var/atlassian/application-data/confluence/core
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid7.log
Compiled method (c1)   32291 5557       2       org.yaml.snakeyaml.reader.StreamReader::peek (24 bytes)
 total in heap  [0x00007f46c4936410,0x00007f46c4936828] = 1048
 relocation     [0x00007f46c4936588,0x00007f46c49365c0] = 56
 main code      [0x00007f46c49365c0,0x00007f46c4936720] = 352
 stub code      [0x00007f46c4936720,0x00007f46c4936760] = 64
 oops           [0x00007f46c4936760,0x00007f46c4936768] = 8
 metadata       [0x00007f46c4936768,0x00007f46c4936778] = 16
 scopes data    [0x00007f46c4936778,0x00007f46c4936798] = 32
 scopes pcs     [0x00007f46c4936798,0x00007f46c4936808] = 112
 dependencies   [0x00007f46c4936808,0x00007f46c4936810] = 8
 nul chk table  [0x00007f46c4936810,0x00007f46c4936828] = 24
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#

the following seems consistent: Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled

@d-led
Copy link

d-led commented May 7, 2024

tried starting colima with rosetta instead of amd64: colima start --vz-rosetta --cpu 4 --memory 12 instead of
colima start --arch x86_64 --cpu 4 --memory 12, and the error seems to be avoided, although there are some warnings upon start: image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was

@cvakiitho
Copy link

seems like Apple bug in Sonoma+ actually, and there are workarounds:

docker/for-mac#7006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants