Skip to content

Pocket IC not handling well a devcontainer stopping #4264

@tiagoicp

Description

@tiagoicp

Hi team,

Have made this video for Nathan, but perhaps it's better to share it here directly.

Think there is an edge case not yet covered by dfx or Pocket IC.

I created a video that showcases the error very well:
https://www.loom.com/share/88d792b1da82421589938794a726c7b0

Printscreen:
Image

And here is a repo with a devcontainer that you can easily reproduce. But the issue is on any devcontainer.
Reproducible Repo: https://github.com/tiagoicp/ic-siwe-react-demo-rust

Meta

dfx --version:

26.1 and 27.0
Further log output

root@codespaces-4eb5c1:/workspaces/ic-siwe-react-demo-rust# dfx start --verbose
Running dfx start for version 0.27.0
There is no project-specific network 'local' defined in /workspaces/ic-siwe-react-demo-rust/dfx.json
Using the default configuration for the local shared network.
Local server configuration:
  bind address: 127.0.0.1:4943
  bitcoin: disabled
  canister http: enabled
    log level: Error
  replica:
    subnet type: Application
    log level: Error
  data directory: /root/.local/share/dfx/network/local
  scope: shared

Starting PocketIC...
Configuring PocketIC server
⠂ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
⠄ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:46283/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠁ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:40871/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠖ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:39345/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠒ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:40747/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠋ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:34001/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠂ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:42453/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠠ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:37767/instances): client error (SendRequest): connection closed before message completed
Starting PocketIC...
Configuring PocketIC server
⠉ Starting local network...                                                                                                                                                          
Stopping PocketIC...
⠤ Starting local network...                                                                                                                                                          thread 'tokio-runtime-worker' panicked at rs/state_machine_tests/src/lib.rs:2584:13:
Critical error mr_non_increasing_batch_time occurred.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at rs/pocket_ic_server/src/state_api/state.rs:756:14:
Failed to create PocketIC instance: JoinError::Panic(Id(21), "Critical error mr_non_increasing_batch_time occurred.", ...)
ERROR: Failed to initialize PocketIC: error sending request for url (http://localhost:41705/instances): client error (SendRequest): connection closed before message completed
Got signal to stop.
Stopped.
All local network processes stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThis ticket needs investigation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions