question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

m3db docker image crashes on rancher desktop, runs fine on other docker environments

See original GitHub issue

Rancher Desktop Version

0.7.1

Rancher Desktop K8s Version

1.21.0

What operating system are you using?

macOS

Operating System / Build Version

MacOS Monterey

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

No response

Actual Behavior

official m3db docker image crashes during execution with a SIGILL on rancher desktop, but works fine on docker desktop, minikube/vmware fusion and other docker environments on Mac.

See full output here: OUTPUT.txt

Steps to Reproduce

Run the docker image:

docker run -d -p 7201:7201 -p 7203:7203 --name m3db -v $(pwd)/m3db_data:/var/lib/m3db quay.io/m3db/m3dbnode:v1.4.2

The first two steps only need to be done once to configure the service.

Invoke REST API to create a namespace in m3db (this is async and takes 1-2 mins to complete):

curl --location --request POST 'http://localhost:7201/api/v1/database/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "namespaceName": "default_unaggregated",
    "retentionTime": "24h",
    "type": "local"
}

Wait approx 1-2 mins for namespace to be created before next step(ready namespace) will succeed:

curl --location --request POST 'http://localhost:7201/api/v1/services/m3db/namespace/ready' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "default_unaggregated"
}'

Crash occurs on next step: insert a metric into the namespace:

curl --location --request POST 'http://localhost:7201/api/v1/json/write' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tags": {
        "__name__": "third_avenue",
        "city": "new_york",
        "checkout": "1"
    },
    "timestamp": "1642741531",
    "value": 3347.26
}'

Result

SIGILL: illegal instruction PC=0xd01bf0 m=5 sigcode=2

goroutine 14333 [running]: github.com/m3db/m3/src/x/sync.getCore(0xc00fc88d80, 0x3, 0x3, 0x1, 0x230eba0, 0xc0a4637500, 0x22bc140, 0xc0a4637500, 0x22bc120, 0xc0a4637500, …) /go/src/github.com/m3db/m3/src/x/sync/cpu_linux_amd64.s:9 fp=0xc00609a218 sp=0xc00609a210 pc=0xd01bf0 github.com/m3db/m3/src/x/sync.CPUCore(…) /go/src/github.com/m3db/m3/src/x/sync/index_cpu.go:72

Expected Behavior

Docker image should run correctly

Additional Information

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
janduboiscommented, Jan 25, 2022

This looks like a frequent issue with m3db in virtual machines, e.g. https://github.com/m3db/m3/issues/3105, https://github.com/m3db/m3/issues/3659, https://github.com/m3db/m3/issues/3827.

The answer is always: Make sure you run on a machine that supports the rdtscp instruction!

We are running qemu with -cpu host, but it looks like qemu is disabling rdtscp even on some CPUs that would support it. Not quite sure where to go from here; I’ve filed a Lima issue yesterday to make the qemu cpu setting configurable: https://github.com/lima-vm/lima/issues/592. But I’m not sure if this will be sufficient.

Sounds like @evertonlperes can reproduce the problem, but just for reference, @nick-stephen and @evertonlperes, what is the exact model of your CPU, e.g.

$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
0reactions
moiocommented, Jul 18, 2022

I think we will move Rancher Desktop to the latest qemu release from homebrew for the next release, so it should all work out, wouldn’t it?

Yes, I do not expect any problem from my perspective. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a Single Node M3 Cluster with Docker - M3DB
Deploying a single-node cluster is a great way to experiment with M3 and get an idea of what it has to offer, but...
Read more >
Troubleshooting Tips - Rancher Desktop Docs
This page provides tips to troubleshoot issues you may have with Rancher Desktop.
Read more >
Find out Why Your Docker Container Keeps Crashing
Your Docker container is exiting without a useful error message? Here are a few ways to find out what's happening.
Read more >
WTF is up with Docker desktop on macOS? - Reddit
Everything runs fine for like 2-3 days max and then it either a) just randomly freezes and becomes unresponsive, forcing me to force...
Read more >
Troubleshooting the Rancher Server Kubernetes Cluster
This can be checked by logging into the host and running the command docker ps : $ ssh user@server user@server$ docker ps. CONTAINER...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found