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(ext/http): Ensure cancelled requests don't crash Deno.serve #19154

Merged
merged 3 commits into from
May 16, 2023

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented May 16, 2023

Fixes for various Attemped to access invalid request bugs (#19058, #15427, #17213).

We did not wait for both a drop event and a completion event before removing items from the slab table. This ensures that we do so.

In addition, the slab methods are refactored out into slab.rs for maintainability.

@mmastrac mmastrac changed the title WIP: Fixes for HTTP slab ID not found WIP: fix(ext/http): Fix for HTTP slab ID not found May 16, 2023
@mmastrac mmastrac changed the title WIP: fix(ext/http): Fix for HTTP slab ID not found fix(ext/http): Fix for HTTP slab ID not found May 16, 2023
@mmastrac mmastrac changed the title fix(ext/http): Fix for HTTP slab ID not found fix(ext/http): Ensure cancelled requests don't crash Deno.serve May 16, 2023
@@ -12,6 +12,7 @@ description = "HTTP server implementation for Deno"

[features]
"__zombie_http_tracking" = []
"__http_tracing" = []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Useful flag to ensure we're not leaking requests

ext/http/00_serve.js Outdated Show resolved Hide resolved
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix and remember to close the issues once this lands :)

@mmastrac mmastrac merged commit a22388b into denoland:main May 16, 2023
levex pushed a commit that referenced this pull request May 18, 2023
Fixes for various `Attemped to access invalid request` bugs (#19058,
#15427, #17213).

We did not wait for both a drop event and a completion event before
removing items from the slab table. This ensures that we do so.

In addition, the slab methods are refactored out into `slab.rs` for
maintainability.
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.

Panic in ext\http\http_next.rs:195:1 Cannot use npm package @vitejs/plugin-react-swc Support Vite
2 participants