weixin_39871649
weixin_39871649
2020-11-25 07:32

handle_get_links_result panic

and are both reporting seeing this issue

From
"But: there is another problem that is new and that saw this morning first and I'm bumping into that now using holochain-basic-chat: When I run that DNA without n3h (-> memory network) the app works locally with UI. But if I configure n3h, even without any other node running, I get this:"


2019-04-23 22:26:50:holo-chat: debug/scheduled_jobs: tick
2019-04-23 22:27:00:holo-chat: debug/scheduled_jobs: tick
2019-04-23 22:27:11:holo-chat: debug/scheduled_jobs: tick
2019-04-23 22:27:17:holo-chat: debug/actions/call_zome_fn: Validating call: ZomeFnCall { id: ProcessUniqueId { prefix: 6, offset: 1 }, zome_name: "chat", cap: CapabilityRequest { cap_token: HashString("QmQBhcDr2NidzPxaPsuc9N5vFA3C96ya4LjD6mqy6HuYuV"), provenance: Provenance(HashString("HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i"), Signature("D485TPnFkA63yCMIT0++EmiYn0vXLIYsLb7sd5jiTaZ8xYuxXSu1aJaYYTvCwlg+Sl+zlrFOHQ1OiaUqdugTBw==")) }, fn_name: "get_my_member_profile", parameters: JsonString("{}") }
2019-04-23 22:27:17:holo-chat: debug/actions/call_zome_fn: executing call: ZomeFnCall { id: ProcessUniqueId { prefix: 6, offset: 1 }, zome_name: "chat", cap: CapabilityRequest { cap_token: HashString("QmQBhcDr2NidzPxaPsuc9N5vFA3C96ya4LjD6mqy6HuYuV"), provenance: Provenance(HashString("HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i"), Signature("D485TPnFkA63yCMIT0++EmiYn0vXLIYsLb7sd5jiTaZ8xYuxXSu1aJaYYTvCwlg+Sl+zlrFOHQ1OiaUqdugTBw==")) }, fn_name: "get_my_member_profile", parameters: JsonString("{}") }
2019-04-23 22:27:17:holo-chat: debug/net/handle: FetchMetaResult: FetchMetaResultData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-7-0", requester_agent_id: "HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i", provider_agent_id: "HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i", entry_address: HashString("HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i"), attribute: "link__profile", content_list: [] }
2019-04-23 22:27:17:holo-chat: debug/reduce/handle_get_links_result: Got response from HcScIf7MJejaj887bsEA7GOyWWzq3f9diFXGZOcTPigz8irvWCmNUd6eE34f64i: []
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
<0
>1

', core/src/network/reducers/handle_get_links_result.rs:17:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-04-23 22:27:20:holo-chat: debug/scheduled_jobs: tick
^C(n3h-bin) [i] n3h exited cleanly
</unnamed>

该提问来源于开源项目:holochain/holochain-rust

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

12条回答

  • weixin_39871649 weixin_39871649 5月前

    said:

    "I get the failure on both Linux and Mac, with and without hc run --networked ... specified. "

    点赞 评论 复制链接分享
  • weixin_39740419 weixin_39740419 5月前

    Last week, when I was running holochain-rust v0.0.11-alpha1 and holofuel develop, when I ran the DNA under hc run --networked with HC_N3H_MODE=REAL networking or with hack-mode networking, I could get 2 Agents running and commit links with hdk::link_entries between them (a from!( "%agent_id"...) link from the counterparty agent ID to the local agent public commit), and they would be reported to the counterparty; a hdk::get_links(&hdk::AGENT_ADDRESS,...) would report the new link.

    When I added the 3rd agent, this 3rd agent would fail to be able to establish the link -- hdk::link_entries would fail, saying the base was invalid (the counterparty agent ID).

    Now, as of this week Monday Apr 22nd -- none of this works at all; I can't get even 1 agent to run, on Mac or Linux, on holochain-rust v0.0.11, v0.0.12, nor develop -- I get a panic:

    
    2019-04-23 14:08:20:test-instance: debug/reduce/handle_get_links_result: Got response from HcSCJvyu5aUXiyvubmkfapFJmHq6fxfojfFWqc9w4Iyxdq4sGQej5HY47hNte6i: []
    thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
    
    Diff < left / right > :
    <0
    >1
    
    ', core/src/network/reducers/handle_get_links_result.rs:17:5
    </unnamed>

    as soon as I try to do an hdh::get_links, and the thread fails, and no more Zome API calls work.

    I tried disabling ipv6, recompiling everything clean, etc. This appears to be consistent across both Mac and Linux.

    Removing the assert in handle_get_links_result.rs:

    
    17c17,23
    <     assert_eq!(dht_meta_data.content_list.len(), 1);
    ---
    >     //assert_eq!(dht_meta_data.content_list.len(), 1);
    >     if dht_meta_data.content_list.len() == 0 {
    >         return Err(HolochainError::ErrorGeneric(
    >             "DHT meta list is empty"
    >                 .to_string(),
    >         ));
    >     }
    

    allows the thread to continue and every attempt to go an hdk::get_links returns an error, which allows the agent to continue to serve Zome API requests, but we can no longer observe the links being created, so no HoloFuel "request" or "promise" API calls work, which prevents us from operating the remaining API calls (which required the data from these calls to operate).

    点赞 评论 复制链接分享
  • weixin_39740419 weixin_39740419 5月前

    The failure (after patching handle_get_links_result.rs) occurs from start-up of a holofuel UI:

    
    Err: Object { Internal: "{\"kind\":{\"ErrorGeneric\":\"DHT meta list is empty\"},\"file\":\"core/src/nucleus/ribosome/runtime.rs\",\"line\":\"192\"}" }
    

    To build holofuel, check out https://github.com/Holo-Host/holofuel.git. It'll build by default using v0.0.11-alpha1. Hit make build install to build dist/holofuel.dna.json. You won't be able to make test unless you have a holochain-rust checkout out and ../../nodejs_conductor/ is built and available relative to the holofuel/test directory (becuase it uses require('../../holochain-rust/nodejs_conductor');).

    Getting a UI running against it is a bit more work... I'll give instructions on that, next.

    点赞 评论 复制链接分享
  • weixin_39854440 weixin_39854440 5月前

    -mtl, , I've tracked this down to this: with only one instance and n3h, a fetchMeta in n3h (as seen with my custom log below) results directly in a fetchMetaResult with empty content list that core receives. n3h is not asking core for any metas but just directly responds with an empty list.

    
    N3H FETCH META data:  { method: 'fetchMeta',
      dnaAddress: 'Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47',
      _id: 'puid-7-0',
      requesterAgentId:
       'HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi',
      entryAddress:
       'HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi',
      attribute: 'link__profile' }
    2019-04-24 13:58:00:holo-chat: trace/net/handle:(HoloTester1): Json(JsonString("{\"method\":\"fetchMetaResult\",\"_id\":\"puid-7-0\",\"dnaAddress\":\"Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47\",\"requesterAgentId\":\"HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi\",\"providerAgentId\":\"HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi\",\"entryAddress\":\"HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi\",\"attribute\":\"link__profile\",\"contentList\":[]}"))
    2019-04-24 13:58:00:holo-chat: trace/net/handle: FetchMetaResult before check: FetchMetaResultData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-7-0", requester_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", provider_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", entry_address: HashString("HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi"), attribute: "link__profile", content_list: [] }
    2019-04-24 13:58:00:holo-chat: trace/net/handle: FetchMetaResult after DNA check
    2019-04-24 13:58:00:holo-chat: trace/net/handle: FetchMetaResult after ID check
    2019-04-24 13:58:00:holo-chat: debug/net/handle: FetchMetaResult: FetchMetaResultData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-7-0", requester_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", provider_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", entry_address: HashString("HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi"), attribute: "link__profile", content_list: [] }
    GOT EMPTY LINKS RESULT: FetchMetaResultData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-7-0", requester_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", provider_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", entry_address: HashString("HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi"), attribute: "link__profile", content_list: [] }
    2019-04-24 13:58:00:holo-chat: debug/reduce/handle_get_links_result: Got response from HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi: []
    2019-04-24 13:58:00:holo-chat: debug/scheduled_jobs: tick
    2019-04-24 13:58:10:holo-chat: debug/scheduled_jobs: tick
    2019-04-24 13:58:20:holo-chat: debug/scheduled_jobs: tick
    
    点赞 评论 复制链接分享
  • weixin_39854440 weixin_39854440 5月前

    I (also) have replaced above mentioned assertion in the network reducer with an error so core can continue. I can then at least sign-up with holochain-basic-chat. But when it loads the stream, I see that n3h is returning an error:

    
    2019-04-24 16:10:51:holo-chat: debug/net/handle: SendMessageResult: MessageData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-2-9", to_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", from_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", content: Object({"ValidationPackage": Object({"chain_header": Object({"entry_type": String("LinkAdd"), "entry_address": String("QmZwn51qynyNAxEhpa1NRSRhgT5k4V16mowrbU193HvBT5"), "provenances": Array([Array([String("HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi"), String("YA5yRtXd5JIcJYzONJdrL5a6RatcPUyLqRhmgfG3X2LFAxfhRTr68LA1W6Ul0VibSGWt7tHLZRSwUraJ5EooCw==")])]), "link": String("QmWhEY4o6Eza9RHvdR75FKsPiPQjYt4z6pUTbr94j1cqwA"), "link_same_type": String("QmZU4QDKSUvTEeZmLuaktWeQycdew92fEucQeENuk8wceL"), "link_update_delete": Null, "timestamp": String("2019-04-24T14:10:51+00:00")}), "source_chain_entries": Null, "source_chain_headers": Null, "custom": Null})}) }
    N3H FETCH META data:  { method: 'fetchMeta',
      dnaAddress: 'Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47',
      _id: 'puid-27-0',
      requesterAgentId:
       'HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi',
      entryAddress: 'QmQsXP4eggvKZYZduJQCXWdB8f9Xe5ExX3pPnuHZ3Z739p',
      attribute: 'link__public_stream' }
    DHT FULLSYNC fetchDataLocal START
    N3H FETCH META failure
    2019-04-24 16:10:51:holo-chat: trace/net/handle:(HoloTester1): Json(JsonString("{\"method\":\"failureResult\",\"_id\":\"puid-27-0\",\"dnaAddress\":\"Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47\",\"toAgentId\":\"HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi\",\"errorInfo\":\"Entry not found during fetchMeta for:QmQsXP4eggvKZYZduJQCXWdB8f9Xe5ExX3pPnuHZ3Z739p\"}"))
    2019-04-24 16:10:51:holo-chat: warning/net/handle: FailureResult: FailureResultData { dna_address: HashString("Qmdi7MHcccdijbmmXM7NYiCJet7oPwrBwfrLf2o4UMNa47"), request_id: "puid-27-0", to_agent_id: "HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi", error_info: String("Entry not found during fetchMeta for:QmQsXP4eggvKZYZduJQCXWdB8f9Xe5ExX3pPnuHZ3Z739p") }
    2019-04-24 16:10:51:holo-chat: debug/workflow/hold_link: is valid!
    2019-04-24 16:10:51:holo-chat: debug/workflow/hold_link: added! Link { base: HashString("HcSCj4h6VT5j4Rapb6hq8FIue8Wek89hiWq6J88v4XCmBuvc4bXwHWcEFzt79vi"), target: HashString("QmVwLQt9UsCpfLc4ogPtS2448QtRq78DU6GmGPSaseXTnE"), tag: "profile" }
    2019-04-24 16:10:51:holo-chat: debug/workflow/hold_entry: is valid! QmZwn51qynyNAxEhpa1NRSRhgT5k4V16mowrbU193HvBT5
    2019-04-24 16:10:51:holo-chat: debug/workflow/hold_entry: HOLDING: QmZwn51qynyNAxEhpa1NRSRhgT5k4V16mowrbU193HvBT5
    2019-04-24 16:11:00:holo-chat: debug/scheduled_jobs: tick
    2019-04-24 16:11:10:holo-chat: debug/scheduled_jobs: tick
    2019-04-24 16:11:20:holo-chat: debug/scheduled_jobs: tick
    
    点赞 评论 复制链接分享
  • weixin_39740419 weixin_39740419 5月前

    The holofuel.dna.json can be built using just the hc binary from the v0.0.11-alpha1 download of holochain-rust (and installing rustup from rustup.rs), putting it in your PATH and hitting holofuel's make build install.

    To build/run holofuel-gui:

    • mkdir ~/src && cd ~/src # checkout code in a known location
    • git clone git.com:holochain/n3h.git -b meta-fix-realmode
    • ( cd n3h && npm install )
    • ln -fs $PWD/n3h ~/n3h # necessary for holofuel-gui/package.json to find n3h
    • git clone git.com:Holo-Host/holofuel-gui.git -b develop-working
    • ( cd holofuel-gui/ui-src && yarn install && yarn run build # compile typescript )
    • cd holofuel-gui && rm -rf holofuel && ln -fs ../holofuel . # link built holofuel/dist/holofuel.dna.json
    • new terminal: cd ~/src/holofuel-gui && npm run start-dna-agent1
    • new terminal: cd ~/src/holofuel-gui && npm run start-ui-agent1 # should open HoloFuel GUI, w/ H0
    • Copy the wss://... from the line starting -ipc: wss://..., and paste it into package.json after HC_N3H_IPC_URI=
    • Copy the wss://...?a=HcS... from the line -p2p: ["wss://..."], and paste it into package.json after HC_N3H_BOOTSTRAP_NODE=
    • new terminal: cd ~/src/holofuel-gui && npm run start-dna-agent2
    • new terminal: cd ~/src/holofuel-gui && npm run start-ui-agent2

    However, I can't get this to work. Alternatively, try:

    • cd ~/src
    • git clone git.com:mjbrisebois/holofuel-app.git
    • cd holofuel-app && npm install && npm run build # compile and webpack
    • new terminal: make start-bootstrap-agent-dna # starts Bootstrap agent DNA via hc run
    • new terminal: make start-agent-dna-1 # starts 2nd agent DNA via hc run
    • new terminal: cd ~/src/holofuel-app && python -m SimpleHTTPServer # web web server on http://localhost:8000
    • In web browser window, go to: http://localhost:8000/#/3000
    • In another browser window, go to: http://localhost:8000/#/3100

    Once you get a UI running, attempt to Send or Receive funds from a counterparty (in holofuel-gui, the Agent ID in the Profile tab, upper right). In holofuel-app, it is at the top of the screen.

    Now, start up another Agent - cd ~/src/holofuel-app && make start-agent-dna-2 - In a new browser window, go to http://localhost:8000/#/3101

    You should be able to send/receive funds from any of the first 2 agents, but the hdk::link_entries will fail when you try to do either a Send or a Receive.

    点赞 评论 复制链接分享
  • weixin_39740419 weixin_39740419 5月前

    In HACK mode (v0.0.12-alpha1, n3h branch meta-fix-realmode), 1 agent works -- I can send/recieve (setting Links), and see the links.

    I'm getting this now; as soon as I start the second agent, the first agent reports:

    
    (@) [e] #### P2P hasTrack() failed for agent "HcSCJnb8mm9YOxu8hsSyj5aKzB9Dantg5Fdz3AxAP7J3f9movrkYmjIAtxwx6si" ; DNA = "Qmav7DCUmSDdeDLEh7mPbd9w97yHNk661ee66d42SjDFXc"
    (@) [e] #### CHECK FAILED for (agent) "HcSCJnb8mm9YOxu8hsSyj5aKzB9Dantg5Fdz3AxAP7J3f9movrkYmjIAtxwx6si" + (DNA) "Qmav7DCUmSDdeDLEh7mPbd9w97yHNk661ee66d42SjDFXc" (sender: undefined)
    

    Then, future calls start reporting (in the browser console.log, the error):

    
    Err: Object { Internal: "{\"kind\":\"Timeout\",\"file\":\"core/src/nucleus/ribosome/runtime.rs\",\"line\":\"192\"}" }
    

    when I make API calls. I'm not seeing anything in the logs that indicates a problem -- its just that API requests are either very slow, or don't work at all.

    点赞 评论 复制链接分享
  • weixin_39740419 weixin_39740419 5月前

    This CHECK FAILED failure continues to occur in HACK mode in holochain-rust develop branch HC_N3H_MODE=HACK hc run --networked ..., with the n3h meta-mix-realmode (added built n3h's bin to PATH).

    点赞 评论 复制链接分享
  • weixin_39757212 weixin_39757212 5月前

    That error means that agent is not known for tracking that dna. So it could be the flaky startup problem again? (sender: undefined) is also weird.

    点赞 评论 复制链接分享
  • weixin_39530509 weixin_39530509 5月前

    Before I look into this much, does anyone know whether this is still likely to be an issue?

    点赞 评论 复制链接分享
  • weixin_39530509 weixin_39530509 5月前

    Ah, holochat is archived in favour of holo-basic-chat.

    https://github.com/holochain/holochat

    So can this can be closed?

    点赞 评论 复制链接分享
  • weixin_39871649 weixin_39871649 5月前

    -mtl said:

    "That assert was for making sure we are not sending multi values in the content_list since its not supported that way for now. But here it is triggered because there is no content at all. Sending an empty list doesn't seem normal. This assert is picking it up but there is something wrong with sending empty list of meta content in the first place."

    点赞 评论 复制链接分享

相关推荐