dfinity / dfinity/sdk

Moderate load on local replica (or emulator) lead to canister calls hanging indefinitely

Open
#1,574 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked bug triaged
Dominant language
Rust
Stars
204
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce:

  1. Install dfx 0.7.0-beta.2
    DFX_VERSION=0.7.0-beta.2 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
  2. Start dfx (issue happens much more quickly when running emulator)
    dxf start --emulator
  3. Clone "open chat"
    https://github.com/dfinity-lab/open-chat/commit/04162d2a6004221d5ca8ceafb50fb022f6954187
  4. Build and deploy "open chat" locally
    3.1 cd into open-chat
    3.2 npm install
    3.3 dfx deploy
  5. Open local "website" canister in browser, sign-in, and register a user name
  6. Repeat step 4 in another browser - say Chrome incognito
  7. Open chrome dev tools and watch the network tab (open chat polls for new messages)
  8. After a few minutes you should see the query calls hanging

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the hang with dfx 0.7.0-beta.2, the emulator, and open-chat commit 04162d2a6004221d5ca8ceafb50fb022f6954187; watch the browser network tab after two users register. Investigate why query calls hang under moderate local load, and consider the issue done when those calls remain responsive during the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.