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 inspector hanging when task budget is exceeded #5083

Merged
merged 1 commit into from
May 5, 2020

Conversation

piscisaureus
Copy link
Member

The issue is solved by proxying websocket messages over a pair of
futures::mpsc::unbounded channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.

@piscisaureus piscisaureus changed the title Fix inspector hanging when task budget is exceeded (#5039) Fix inspector hanging when task budget is exceeded May 5, 2020
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
@piscisaureus piscisaureus requested a review from ry May 5, 2020 06:38
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
let script = deno::test_util::root_path()
.join("cli")
.join("tests")
.join("inspector3.js");
Copy link
Member

Choose a reason for hiding this comment

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

there's also deno::test_util::tests_path()

let s = r#"{"method":"Debugger.paused","#;
assert!(socket_rx.next().await.unwrap().starts_with(s));
// Send the 'Debugger.resume' request.
let s = format!(r#"{{"id":{},"method":"Debugger.resume"}}"#, request_id);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - nice test, I confirmed it hangs on master.

piscisaureus added a commit to piscisaureus/deno that referenced this pull request May 5, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
@piscisaureus piscisaureus merged commit e574437 into denoland:master May 5, 2020
@piscisaureus piscisaureus deleted the fix_inspector branch May 5, 2020 14:37
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
The issue is solved by proxying websocket messages over a pair of
`futures::mpsc::unbounded` channels. As these are are implemented in
the 'futures' crate, they can't participate in Tokio's cooperative
task yielding.
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.

2 participants