Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad source position for stack trace frames inside our functions #1093

Open
erights opened this issue Feb 23, 2022 · 3 comments
Open

Bad source position for stack trace frames inside our functions #1093

erights opened this issue Feb 23, 2022 · 3 comments
Assignees
Labels
debugging support kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 tooling

Comments

@erights
Copy link
Contributor

erights commented Feb 23, 2022

At https://github.com/Agoric/agoric-sdk/runs/5297749653?check_suite_focus=true#step:4:26
we see the stack trace

Error#2: I don't remember allocating o+24
Error: I don't remember allocating (a string)
 at construct ()
 at Error (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/lockdown-subprocess-xsnap.js:7572)
 at makeError (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/lockdown-subprocess-xsnap.js:1738)
 at fail (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/lockdown-subprocess-xsnap.js:1866)
 at baseAssert (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/lockdown-subprocess-xsnap.js:1884)
 at convertSlotToVal (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:14012)
 at unserializeSlot (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:5326)
 at fullRevive (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:5453)
 at fullRevive (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:5507)
 at fullRevive (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:5496)
 at fullRevive (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:5507)
 at unserialize (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:55[30](https://github.com/Agoric/agoric-sdk/runs/5297749653?check_suite_focus=true#step:4:30))
 at runWithoutMetering (/home/runner/work/agoric-sdk/agoric-sdk/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js:15003)
 at (.../ertp/src/paymentLedger.js:177)
 at (.../eventual-send/src/track-turns.js:66)

Even weirder, the source file mentioned exists at
https://github.com/Agoric/agoric-sdk/blob/markm-virtualize-ERTP/packages/SwingSet/src/kernel/vatManager/supervisor-subprocess-xsnap.js
but has only 368 lines.

@erights erights changed the title Insane source position for stack trace frames inside our functions Bad source position for stack trace frames inside our functions Feb 23, 2022
@dckc
Copy link
Contributor

dckc commented Feb 24, 2022

Due to living at such a low level in the xsnap bootstrap, supervisor-subprocess-xsnap.js is bundled using bundleSource(..., { format: 'getExport' }), which isn't as nice about line numbers as the default format.

https://github.com/Agoric/agoric-sdk/blob/43ad08f4effc94aed8be34ba0d662761838bcf16/packages/SwingSet/src/initializeSwingset.js#L47-L62

I suggest narrowing the scope of this issue to the 2 bundles used to bootstrap SwingSet vats (lockdownBundle, supervisorBundle)... or perhaps to something around getExport.

I think the shortest path to addressing this is via using native XS Compartments (#400).

@erights
Copy link
Contributor Author

erights commented Dec 24, 2022

What's the status of this?

@erights erights self-assigned this Dec 24, 2022
@kriskowal kriskowal added the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 10, 2024
@kriskowal
Copy link
Member

What's the status of this?

We still haven’t given this issue due attention. Added a label recommending team review for prioritization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging support kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 tooling
Projects
None yet
Development

No branches or pull requests

3 participants