0xPolygon / kurtosis-cdk

A Kurtosis package that deploys a private, portable, and modular Polygon CDK devnet
https://docs.polygon.technology/cdk
Apache License 2.0
37 stars 66 forks source link

Kurtosis CDK Deployment failure on MacOS 14.6.1 #225

Closed prateektiwari7 closed 2 days ago

prateektiwari7 commented 3 weeks ago

System information

MacOS 14.6.1

Commit id

Main

Tools versions

I am running this command kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .

Getting this Error:-


Adding service with name 'zkevm-stateless-executor-001' and image 'hermeznetwork/zkevm-prover:v6.0.3-RC20'
There was an error executing Starlark code 
An error occurred executing instruction (number 61) at github.com/0xPolygon/kurtosis-cdk/lib/zkevm_prover.star[27:28]:
  add_service(name="zkevm-stateless-executor-001", config=ServiceConfig(image="hermeznetwork/zkevm-prover:v6.0.3-RC20", ports={"executor": PortSpec(number=50071, application_protocol="grpc"), "hash-db": PortSpec(number=50061, application_protocol="grpc")}, files={"/etc/zkevm": "stateless-executor-config-artifact"}, entrypoint=["/bin/bash", "-c"], cmd=["[[ \"{{kurtosis:1d593fde7a3643bca1b835f7f8b22645:output.runtime_value}}\" == \"aarch64\" || \"{{kurtosis:1d593fde7a3643bca1b835f7f8b22645:output.runtime_value}}\" == \"arm64\" ]] && export EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1;                 /usr/local/bin/zkProver -c /etc/zkevm/stateless-executor-config.json"]))
  Caused by: Unexpected error occurred starting service 'zkevm-stateless-executor-001'
  Caused by: An error occurred waiting for all TCP and UDP ports to be open for service 'zkevm-stateless-executor-001' with private IP '172.16.0.18'; this is usually due to a misconfiguration in the service itself, so here are the logs:
  == SERVICE 'zkevm-stateless-executor-001' LOGS ===================================
  terminate called after throwing an instance of 'std::bad_array_new_length'
    what():  std::bad_array_new_length
  qemu: uncaught target signal 6 (Aborted) - core dumped

  == FINISHED SERVICE 'zkevm-stateless-executor-001' LOGS ===================================
  Caused by: An error occurred while waiting for all TCP and UDP ports to be open
  Caused by: Unsuccessful ports check for IP '172.16.0.18' and port spec '{privatePortSpec:0x4000784e10}', even after '240' retries with '500' milliseconds in between retries. Timeout '2m0s' has been reached
  Caused by: An error occurred while calling network address '172.16.0.18:50061' with port protocol 'TCP' and using time out '200ms'
  Caused by: dial tcp 172.16.0.18:50061: i/o timeout

Error encountered running Starlark code.

Description & steps to reproduce

Following the documentation here https://docs.polygon.technology/cdk/getting-started/local-deployment/#run-the-chain-locally

Attaching the screenshots of all commands

  1. $% ./scripts/tool_check.sh
    
    Checking that you have the necessary tools to deploy the Kurtosis CDK package...
    ✅ kurtosis 1.0.0 is installed, meets the requirement (=1.0).
    ✅ docker 24.0.2 is installed, meets the requirement (>=24.7).

You might as well need the following tools to interact with the environment... 🟡 Optional jq is not installed. You can install jq at: https://jqlang.github.io/jq/download/ 🟡 Optional yq is not installed. You can install yq at: https://pypi.org/project/yq/ 🟡 Optional cast is not installed. You can install cast at: https://book.getfoundry.sh/getting-started/installation#using-foundryup 🟡 Optional polycli is not installed. You can install polycli at: https://github.com/maticnetwork/polygon-cli/releases

🎉 You are ready to go!


2. % kurtosis clean --all   

INFO[2024-08-17T18:01:37+05:30] Cleaning enclaves...
INFO[2024-08-17T18:01:38+05:30] Successfully removed the following enclaves: 1db57b9a1d244d9397eb124631ca4a7f cdk-v1 INFO[2024-08-17T18:01:38+05:30] Successfully cleaned enclaves
INFO[2024-08-17T18:01:38+05:30] Cleaning unused images...
INFO[2024-08-17T18:01:38+05:30] Successfully cleaned unused images
INFO[2024-08-17T18:01:38+05:30] Cleaning old Kurtosis engine containers...
INFO[2024-08-17T18:01:38+05:30] Successfully cleaned old Kurtosis engine containers


3. kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .

Adding service with name 'zkevm-stateless-executor-001' and image 'hermeznetwork/zkevm-prover:v6.0.3-RC20' There was an error executing Starlark code An error occurred executing instruction (number 61) at github.com/0xPolygon/kurtosis-cdk/lib/zkevm_prover.star[27:28]: add_service(name="zkevm-stateless-executor-001", config=ServiceConfig(image="hermeznetwork/zkevm-prover:v6.0.3-RC20", ports={"executor": PortSpec(number=50071, application_protocol="grpc"), "hash-db": PortSpec(number=50061, application_protocol="grpc")}, files={"/etc/zkevm": "stateless-executor-config-artifact"}, entrypoint=["/bin/bash", "-c"], cmd=["[[ \"{{kurtosis:1d593fde7a3643bca1b835f7f8b22645:output.runtime_value}}\" == \"aarch64\" || \"{{kurtosis:1d593fde7a3643bca1b835f7f8b22645:output.runtime_value}}\" == \"arm64\" ]] && export EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU=1; /usr/local/bin/zkProver -c /etc/zkevm/stateless-executor-config.json"])) Caused by: Unexpected error occurred starting service 'zkevm-stateless-executor-001' Caused by: An error occurred waiting for all TCP and UDP ports to be open for service 'zkevm-stateless-executor-001' with private IP '172.16.0.18'; this is usually due to a misconfiguration in the service itself, so here are the logs: == SERVICE 'zkevm-stateless-executor-001' LOGS =================================== terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length qemu: uncaught target signal 6 (Aborted) - core dumped

== FINISHED SERVICE 'zkevm-stateless-executor-001' LOGS =================================== Caused by: An error occurred while waiting for all TCP and UDP ports to be open Caused by: Unsuccessful ports check for IP '172.16.0.18' and port spec '{privatePortSpec:0x4000784e10}', even after '240' retries with '500' milliseconds in between retries. Timeout '2m0s' has been reached Caused by: An error occurred while calling network address '172.16.0.18:50061' with port protocol 'TCP' and using time out '200ms' Caused by: dial tcp 172.16.0.18:50061: i/o timeout

Error encountered running Starlark code.



### Desired behavior

It has to pass all cases without errors

### What is the severity of this bug?

Critical; I am blocked and Kurtosis CDK is unusable for me because of this bug.
leovct commented 3 weeks ago

Hi @prateektiwari7, you'll need to install Docker >= 24.7 for this to work on a mac environment. We rely on an experimental flag called EXPERIMENTAL_DOCKER_DESKTOP_FORCE_QEMU to run the zkevm_prover image on arm architectures. It is used here in the code. Otherwise the prover won't be able to start.