question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AMM UI hung due to hung / dead issuer

See original GitHub issue

Describe the bug

The devnet AMM is hung, most likely because I added a pool based on an off-chain issuer and then exited my client, hence taking down the issuer.

To Reproduce

This is what I did, anyway. I haven’t tried to do it again.

  1. in a deploy script, use makeIssuerKit and put it on the board (and put the mint in home.scratch) and leave the deploy script awaiting a never-resolving promise.
  2. E(ammAPI).addPool(issuer, 'Note2') and add liquidity. See the Note2 issuer in the AMM (screenshot below)
  3. Kill the deploy script.
  4. Run it again, creating a Cat token.
  5. Add Cat to the AMM. Try to look at it in the AMM.
  6. The AMM is hung. (screenshot below)

full REPL log: https://gist.github.com/dckc/25c4f28f039c08f7cf1c460196396ac9

Expected behavior

AMM handles Cat tokens like Note2 tokens.

Platform Environment

devnet and the docker wallet

Additional context

This is the deploy script that was originally used for Note and then editing for Cat:

import { E } from '@endo/far';
import { deeplyFulfilled } from '@endo/marshal';

import { makeIssuerKit, AssetKind } from '@agoric/ertp';

/**
 * @param {Promise<{zoe: ERef<ZoeService>, board: ERef<Board>, agoricNames:
 * Object, wallet: ERef<Object>, faucet: ERef<Object>}>} homePromise
 */
const deployContract = async (homePromise) => {
  console.log('awaiting home promise...');
  const home = await homePromise;

  const kit = makeIssuerKit('Cat', AssetKind.NAT, harden({ decimalPlaces: 2 }));
  console.log('publishing issuer, brand to board');
  const published = await deeplyFulfilled(
    harden({
      proposedName: 'Note',
      issuer: E(home.board).getId(kit.issuer),
      brand: E(home.board).getId(kit.brand),
    }),
  );
  console.log(published);
  console.log('saving noteMint to personal scratchpad...');
  await E(home.scratch).set('noteMint', kit.mint);

  // Keep the issuer etc. around for the duration of the demo
  await new Promise(() => {});
};

export default deployContract;

Screenshots

It worked the 1st time with Note2:

paste (1)

But with Cat, it hangs:

image

cc @michaelfig

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dckccommented, Apr 8, 2022

See also Agoric/documentation#663 .

0reactions
erightscommented, Sep 6, 2022

I’m leaning towards the latter because if it can’t load an issuer from the chain then that’s probably a sign that something went very wrong. However, that wouldn’t fix the expected behavior for this specific local setup.

When the deploy script is killed, it’s the same as if an issuer returns promise rejection from an E(...). We don’t want to. trust an issuer, so should make sure that every E(...) can tolerate failure, either by being awaited, or by putting a .catch that returns a default value.

A misbehaving issuer may also never respond, leaving all promise-for-results-of E calls unresolved. Without resorting to timeouts, this should not block other operations. Do we know what code is making which E call whose lack of a successful response (whether error or just unresponsive) is causing things to hang?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cloudera Manager UI doesnt start, clouder-scm-server dead and pid ...
Opening a new issue since the exception for cloudera-scm-server is ... that the issue you are seeing is related to a situation with...
Read more >
G1 G-code parsing is broken leading to import hang · Issue #119 ...
G1 G-code parsing is broken leading to import hang #119 ... to the affected codes, or stop using PrusaControl since it appears to...
Read more >
Troubleshooting Omnibus GitLab installation issues
I am unable to install Omnibus GitLab without root access ... As seen in the line below, if you see inactive dead ,...
Read more >
Composer killed while updating - php - Stack Overflow
The "Killed" message usually means your process consumed too much memory, so you may simply need to add more memory to your system...
Read more >
How to hang your GUI – IDEs Support (IntelliJ Platform) | JetBrains
Thanks a lot for description, we'll ask our QA engineer to reproduce it, and create an issue if she succeded. Regards, Oleg. 0....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found