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

fix(xsnap): supply missing file, line numbers based on sourceURL #3776

Merged
merged 7 commits into from
Sep 9, 2021

Conversation

dckc
Copy link
Member

@dckc dckc commented Aug 28, 2021

fixes #2578

depends on agoric-labs/xsnap-pub#1

@michaelfig @warner I was surprised to find some metering diffs when I grabbed the sourceURL support from the moddable public branch. They're in TypedArray (xsDataView.c), which our "has metering changed?" test is insensitive to. Should I update from xs-meter-10 to 11?

As of #3607 we were at 91b0b8bfdc4c, which is part of Moddable's public branch.

But somehow in chore: publich 7.0.0 we regressed to some of our tweaks (to 6024736).

relevant diffs from 6024736-6d7f33f: https://gist.github.com/dckc/9513e1acc1c263ee962b0e282cf48153

@dckc
Copy link
Member Author

dckc commented Aug 28, 2021

@warner note: this probably enables the debugger network connection in release / production mode.

@dckc
Copy link
Member Author

dckc commented Aug 28, 2021

Also: I thought about testing the interaction with importBundle explicitly but I had enough trouble getting this much working.

Do you want a unit test involving importBundle too?

Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dckc
Copy link
Member Author

dckc commented Aug 28, 2021

Bummer... a test fails in ci but passes locally.

~/projects/agoric/agoric-sdk/packages/zoe
16:53 connolly@jambox$ yarn test test/swingsetTests/zoe-metering/test-zoe-metering.js

@dckc dckc force-pushed the 2578-xs-err-stack branch from 7f84e44 to 796c438 Compare August 29, 2021 02:07
@dckc
Copy link
Member Author

dckc commented Aug 29, 2021

@warner you asked how different... see https://gist.github.com/dckc/9513e1acc1c263ee962b0e282cf48153

@dckc
Copy link
Member Author

dckc commented Sep 3, 2021

test-refillMeter was nice enough to fail locally when I showed it to @warner . We have a diagnosis and a crude fix but I'd like to coordinate with @katelynsills on that.

More on that soon...

@dckc dckc force-pushed the 2578-xs-err-stack branch from 8b65227 to 1464e42 Compare September 6, 2021 14:23
@dckc
Copy link
Member Author

dckc commented Sep 6, 2021

@katelynsills was there anything more than trial-and-error to the 4.2M computron figure in zoe/test/swingsetTests/refillMeter/test-refillMeter.js?

I experimentally discovered that this change makes the test pass:

-        initial: 4_200_000n, // startInstance seems to take around this much
+        initial: 4_300_000n, // startInstance seems to take around this much

@warner thought about having the test compute this number by measurement in a pre-test phase, since this test isn't so much about the absolute numbers. But we agreed that the absolute numbers are somewhat relevant and they should be tested somewhere, so that's not urgent.

@dckc dckc requested review from katelynsills and removed request for kriskowal September 6, 2021 14:30
@katelynsills
Copy link
Contributor

@katelynsills was there anything more than trial-and-error to the 4.2M computron figure in zoe/test/swingsetTests/refillMeter/test-refillMeter.js?

It was unfortunately trial and error.

@warner thought about having the test compute this number by measurement in a pre-test phase, since this test isn't so much about the absolute numbers. But we agreed that the absolute numbers are somewhat relevant and they should be tested somewhere, so that's not urgent.

Ah, yeah, that seems like a good idea. This test is intended to confirm that the meter refills when expected and then the vat shuts down when the meter runs out when expected. So, the pre-test data would help me know "when expected" actually is. But you're also right that we need the absolute numbers somewhere too - in other words, I'd like to know when changes to agoric-sdk will result in broken assumptions about computrons for actions. I can make an issue for this, and feel free to tag me and any related issues with a TODO comment if that's helpful.

Copy link
Contributor

@katelynsills katelynsills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This a review of only the Zoe changes, but those look good to me. I'll work on making the metering test more robust.

@katelynsills
Copy link
Contributor

Added an issue for making the "refillMeter" test more robust: #3804

@dckc dckc force-pushed the 2578-xs-err-stack branch from 1464e42 to 91a6f6d Compare September 9, 2021 03:37
@dckc dckc enabled auto-merge September 9, 2021 03:39
@dckc dckc merged commit 68ac612 into master Sep 9, 2021
@dckc dckc deleted the 2578-xs-err-stack branch September 9, 2021 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stack traces from xs-worker vats lack filenames, line numbers
3 participants