Skip to content

Instantly share code, notes, and snippets.

@dckc
Created January 19, 2021 06:28
Show Gist options
  • Save dckc/3031523281d25fbf735bd2b69f7a8625 to your computer and use it in GitHub Desktop.
Save dckc/3031523281d25fbf735bd2b69f7a8625 to your computer and use it in GitHub Desktop.
vatAdminWrapper.js:70:13 'running.get(...)' is undefined

In the kernel, I see that vatSyscallHandler returns ['ok', data] but doSyscall strips off the ok and returns just data.

What does liveslots expect syscall to return? data or ['ok', data]?

Or is the failure below from something else altogether?

context: https://github.com/dckc/agoric-sdk/tree/xs-vat-worker

~/projects/agoric/agoric-sdk/packages/SwingSet
00:12 connolly@jambox$ yarn test --verbose test/workers/test-worker.js xs
yarn run v1.22.5
$ ava --verbose test/workers/test-worker.js xs

SwingSet global metering is disabled (no replaceGlobalMeter)
--parent: createFromBundle Object <[Object: null prototype] {}> { vatID: 'v1' }
xsnap worker does not support enableInternalMetering
starting xsnap for v1
--parent: bundle lockdown
--parent: bundle supervisor
# exception: Object.prototype.__lookupGetter__: cannot coerce undefined to object!
---worker: supervisor started
--parent: instructing worker to load bundle..
--parent: issueTagged setBundle
---worker: answerItem setBundle 4
---worker: got vatNS: buildRootObject
--parent: handleCommand Object <[Object: null prototype] {}> { length: 27 }
--parent: handleUpstream testLog 1
---worker: got dispatch: deliver,notify
--parent: issueTagged getResult
---worker: answerItem getResult 1
--parent: bundle loaded. dispatch ready.
--parent: manager Array <Array <[Object: null prototype] {}>>(4) [
  'replayTranscript',
  'setVatSyscallHandler',
  'deliver',
  'shutdown'
]
Replaying SwingSet transcripts
Temporary logging of sent error (Error#1)

  Error#1: four
     at Object.bootstrap (v2/SwingSet/test/workers/bootstrap.js:20:20)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:388:23
    at Object.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:353:14)
    at doIt (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:395:67)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:64:22
    at win (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:408:19)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:425:20
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  
  Error#1 ERROR_NOTE: Sent as error:liveSlots:v2#1
--parent: sending delivery Array <Array <[Object: null prototype] {}>>(3) [
  'message',
  'o+0',
  Object <[Object: null prototype] {}> {
    method: 'zero',
    args: Object <[Object: null prototype] {}> {
      body: '[{"@qclass":"slot","index":0},{"@qclass":"slot","index":1},{"@qclass":"slot","index":2}]',
      slots: [Array <Complex prototype>]
    },
    result: 'p-62'
  }
]
--parent: issueTagged deliver
---worker: answerItem deliver 3
---worker: runAndWait
--parent: handleCommand Object <[Object: null prototype] {}> { length: 30 }
--parent: handleUpstream syscall 2
--parent: syscall Array <Array <[Object: null prototype] {}>>(2) [ 'subscribe', 'p-60' ]
--parent: doSyscall null
--parent: handleCommand Object <[Object: null prototype] {}> { length: 30 }
--parent: handleUpstream syscall 2
--parent: syscall Array <Array <[Object: null prototype] {}>>(2) [ 'subscribe', 'p-61' ]
--parent: doSyscall null
--parent: handleCommand Object <[Object: null prototype] {}> { length: 72 }
--parent: handleUpstream syscall 5
--parent: syscall Array <Array <[Object: null prototype] {}>>(5) [
  'send',
  'o-50',
  'callback',
  Object <[Object: null prototype] {}> {
    body: '[11,12]',
    slots: Array <Array <Complex prototype>>(0) []
  },
  'p+5'
]
--parent: doSyscall null
--parent: handleCommand Object <[Object: null prototype] {}> { length: 29 }
--parent: handleUpstream syscall 2
--parent: syscall Array <Array <[Object: null prototype] {}>>(2) [ 'subscribe', 'p+5' ]
--parent: doSyscall null
--parent: handleCommand Object <[Object: null prototype] {}> { length: 180 }
--parent: handleUpstream syscall 3
--parent: syscall Array <Array <[Object: null prototype] {}>>(3) [
  'fulfillToData',
  'p-62',
  Object <[Object: null prototype] {}> {
    body: '[{"@qclass":"slot","index":0},{"@qclass":"slot","index":1},{"@qclass":"slot","index":2}]',
    slots: Array <Array <Complex prototype>>(3) [ 'p+6', 'p+7', 'p+5' ]
  }
]
--parent: doSyscall null
---worker: doProcess done
--parent: issueTagged getResult
---worker: answerItem getResult 1
--parent: deliverDone deliverDone 2
removing static vat v1
Temporary logging of sent error (TypeError#2)

  TypeError#2: Cannot destructure property 'resolve' of 'running.get(...)' as it is undefined.
     at Object.vatTerminated (v3/SwingSet/src/kernel/vatAdmin/vatAdminWrapper.js:70:13)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:388:23
    at Object.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:353:14)
    at doIt (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:395:67)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:64:22
    at win (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:408:19)
    at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:425:20
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  
  TypeError#2 ERROR_NOTE: Thrown from: (Error#3) : 4 . 0
  TypeError#2 ERROR_NOTE: Sent as error:liveSlots:v3#1
  TypeError#2
    Error#3: Event: 3.1
       at trackTurns (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:47:24)
      at handle (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:396:27)
      at Function.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:312:14)
      at Object.deliver (kernel/packages/SwingSet/src/kernel/liveSlots.js:425:28)
      at eval (kernel/packages/SwingSet/src/kernel/vatManager/deliver.js:50:48)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
    
kp45.policy logFailure: rejection {"body":"{\"@qclass\":\"error\",\"name\":\"TypeError\",\"message\":\"Cannot destructure property 'resolve' of 'running.get(...)' as it is undefined.\",\"errorId\":\"error:liveSlots:v3#1\"}","slots":[]}
Temporary logging of sent error (Error#4)

  Error#4: vat terminated
     at fullRevive (kernel/packages/marshal/src/marshal.js:743:36)
    at Object.unserialize (kernel/packages/marshal/src/marshal.js:795:19)
    at Object.notify (kernel/packages/SwingSet/src/kernel/liveSlots.js:526:21)
    at eval (kernel/packages/SwingSet/src/kernel/vatManager/deliver.js:50:48)
  
  Error#4 ERROR_NOTE: Rejection from: (Error#5) : 2 . 0
  Error#4 ERROR_NOTE: Rejection from: (Error#6) : 1 . 2
  Error#4 ERROR_NOTE: Sent as error:liveSlots:v2#2
  Error#4
    Error#5: Event: 1.1
       at trackTurns (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:47:24)
      at handle (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:396:27)
      at Function.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:312:14)
      at Proxy.eval (v2/eventual-send/src/E.js:37:49)
      at Object.bootstrap (v2/SwingSet/test/workers/bootstrap.js:17:40)
      at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:388:23
      at Object.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:353:14)
      at doIt (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:395:67)
      at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:64:22
      at win (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:408:19)
      at /home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:425:20
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
    
    Error#5 ERROR_NOTE: Caused by: (Error#6)
    Error#5
      Error#6: Event: 0.1
         at trackTurns (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/track-turns.js:47:24)
        at handle (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:396:27)
        at Function.applyMethod (/home/connolly/projects/agoric/agoric-sdk/packages/eventual-send/src/index.js:312:14)
        at Object.deliver (kernel/packages/SwingSet/src/kernel/liveSlots.js:425:28)
        at eval (kernel/packages/SwingSet/src/kernel/vatManager/deliver.js:50:48)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
      
##### KERNEL PANIC: kp40.policy panic: rejection {"body":"{\"@qclass\":\"error\",\"name\":\"Error\",\"message\":\"vat terminated\",\"errorId\":\"error:liveSlots:v2#2\"}","slots":[]} #####
  ✖ xs vat manager Rejected promise returned by test
  ─

  xs vat manager

  Rejected promise returned by test. Reason:

  Error {
    message: 'kernel panic kp40.policy panic: rejection {"body":"{\\"@qclass\\":\\"error\\",\\"name\\":\\"Error\\",\\"message\\":\\"vat terminated\\",\\"errorId\\":\\"error:liveSlots:v2#2\\"}","slots":[]}',
  }

  › panic (kernel/packages/SwingSet/src/kernel/kernel.js:254:26)
  › resolveToError (kernel/packages/SwingSet/src/kernel/kernel.js:320:7)
  › reject (kernel/packages/SwingSet/src/kernel/kernelSyscall.js:154:5)
  › Object.doKernelSyscall (kernel/packages/SwingSet/src/kernel/kernelSyscall.js:172:16)
  › vatSyscallHandler (kernel/packages/SwingSet/src/kernel/kernel.js:593:43)
  › doSyscall (kernel/packages/SwingSet/src/kernel/vatManager/syscall.js:78:18)
  › Object.reject (kernel/packages/SwingSet/src/kernel/vatManager/syscall.js:101:26)
  › eval (kernel/packages/SwingSet/src/kernel/liveSlots.js:503:15)

  ─

  1 test failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment