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

Upgrading deno_std to v0.3.4 fails #1988

Closed
ry opened this issue Mar 23, 2019 · 4 comments
Closed

Upgrading deno_std to v0.3.4 fails #1988

ry opened this issue Mar 23, 2019 · 4 comments
Labels
bug Something isn't working correctly

Comments

@ry
Copy link
Member

ry commented Mar 23, 2019

denoland/std#297

It hangs after 19 minutes and prints "WARNING the sharedQueue overflowed"
(The warning isn't necessarily a bad thing but is perhaps a hint)

@ry ry added the bug Something isn't working correctly label Mar 23, 2019
@bartlomieju
Copy link
Member

bartlomieju commented Mar 23, 2019

I've just encountered the same error when running deno --fmt, it hangs during compilation of prettier/main.ts.

Note that prettier requires large files.

$ ls deno_std/prettier/vendor
207K Feb  2 15:23 parser_babylon.js
126K Feb  2 15:23 parser_markdown.js
2.1M Mar 17 14:40 parser_typescript.js
965K Feb  2 15:23 standalone.js

EDIT: I'm debugging this

@bartlomieju
Copy link
Member

bartlomieju commented Mar 23, 2019

@ry after some debugging I found that:

fn poll(&mut self) -> Poll<(), JSError> {

poll is not called again after we hit overflow_response.

So we're left in situation where there is 1 pending op but it's not resolved because poll is not called again.

Could you point me where should I dig further?

EDIT: I verified that by changing share queue size, still after queue overflows, poll is never called again and it just hangs.

@bartlomieju
Copy link
Member

It seems that adding self.polled_recently = false; to unsuccessful_push branch resolves this issue.

if !successful_push {
  // If we couldn't push the response to the shared queue, because
  // there wasn't enough size, we will return the buffer via the
  // legacy route, using the argument of deno_respond.
  overflow_response = Some(buf);
  self.polled_recently = false;  // change
  break;
}

@ry
Copy link
Member Author

ry commented Mar 23, 2019

Sounds like you figured it out! Try resetting polled_recently for that op.
Would be great to get a small test case that demoed this bug in core/isolate.rs test section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

2 participants