sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Pocket IC not handling well a devcontainer stopping

Open tiagoicp opened this issue 7 months ago • 2 comments

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

tiagoicp avatar Jun 06 '25 14:06 tiagoicp

After using dfx extension run nns install dfx 0.27.0 doesn't start anymore due to some panic in mr_non_increasing_batch_time

Running dfx start for version 0.27.0
Using shared network 'local' defined in /Users/mac/.config/dfx/networks.json
⠤ 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:49543/instances): client error (SendRequest): connection closed before message completed
⠐ 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:49545/instances): client error (SendRequest): connection closed before message completed
⠙ 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:49547/instances): client error (SendRequest): connection closed before message completed
⠄ 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:49549/instances): client error (SendRequest): connection closed before message completed
⠓ 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:49551/instances): client error (SendRequest): connection closed before message completed
⠈ Starting local network...                                                           
⠁ Starting local network...                                                           
⠒ 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.", ...)

Web3NL avatar Jun 23 '25 12:06 Web3NL

I replied on the forum.

mraszyk avatar Jul 11 '25 12:07 mraszyk