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

Kill all pending accepts when TCP listener is closed #1517

Merged
merged 3 commits into from Jan 16, 2019

Conversation

4 participants
@kevinkassimo
Copy link
Contributor

commented Jan 14, 2019

Closes #1516 .

Keep track of the pending accept task and notify it when the corresponding TcpListener from ResourceTable is dropped.

Before: Hangs forever
After:

Other: Listener has been closed
    at DenoError (deno/js/errors.ts:19:5)
    at maybeError (deno/js/errors.ts:38:12)
    at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)

and dies. This error could be caught.

This is a first-pass implementation (so might not be the best solution). I'm slightly worried about the performance implication of adding 2 ResourceTable locks.
(Benchmark from Travis seems no change though)

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch 3 times, most recently from 368f758 to 0eb056e Jan 14, 2019

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch from 0eb056e to beac39b Jan 14, 2019

r.track_task(self.task_id);
return Ok(futures::prelude::Async::NotReady);
}
Err(e) => return Err(From::from(e)),

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

Probably should untrack here too?

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 14, 2019

Author Contributor

Added.

err = e;
}
assert(!!err);
assertEqual(err.message, "Listener has been closed");

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

Cool - good test case

// we need to track these task so that when the listener is closed,
// pending tasks could be notified and die.
// The tasks are indexed, so they could be removed when accept completed.
TcpListener(tokio::net::TcpListener, HashMap<usize, futures::task::Task>),

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

It seems like this is something TcpListener should take care of? Is this working around a bug in tokio? Maybe we ought to report and link here?

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 14, 2019

Author Contributor

Not so sure about this... we could probably ask them...
(Also I think our usage here is different from its most publicly available API, so there might be a miss...)

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

Would you mind opening an issue and just describing what's we're experiencing https://github.com/tokio-rs/tokio
Ideally link that issue in the source code here.
It's also unclear to me what the expected behavior is.

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 14, 2019

Author Contributor

Submitted: tokio-rs/tokio#846
I'll add a comment linking to this once there are some basic feedback from the Tokio team (that this is indeed a problem)

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 15, 2019

Author Contributor

So I believe based on the discussion there we might just save the task and notify ourselves...

There seems to be some problems with sccache on AppVeyor... On Travis it seems that it is rejecting more network listening requests (tried locally on my Mac machine, and seems it is the firewall that rejects the listen after reaching a threshold and instead shows a permission prompt that requires manual confirmation...) Nvm, found the issue

// If TcpListener, we must kill all pending accepts!
if let Repr::TcpListener(l, m) = r.unwrap() {
// Drop first
std::mem::drop(l);

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

I don’t think this is necessary - it will be dropped with the above remove

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 14, 2019

Author Contributor

Indeed... Forgot to remove this (was part of initial experiment...)

use std::sync::atomic::Ordering;
lazy_static! {
// Keep unique such that no collisions in TcpListener accept task map
static ref NEXT_ACCEPT_ID: AtomicUsize = AtomicUsize::new(0);

This comment has been minimized.

Copy link
@ry

ry Jan 14, 2019

Collaborator

Can you use a HashSet instead and avoid this machinery?

This comment has been minimized.

Copy link
@kevinkassimo

kevinkassimo Jan 14, 2019

Author Contributor

It seems that futures::task::Task does not implement a few traits necessary for comparison in HashSet...

@kevinkassimo

This comment has been minimized.

Copy link
Contributor Author

commented Jan 15, 2019

Per tokio-rs/tokio#846 (comment)
I believe we should throw an error when multiple concurrent accept on the same listener is called. With such enforcement, we could simply keep an Option instead of a HashMap for the current underlying task and only need to notify this single task on listener drop.

I'll go and implement this if this sounds reasonable

@ry

This comment has been minimized.

Copy link
Collaborator

commented Jan 15, 2019

@kevinkassimo Thanks for investigating this. Yes, one accept at a time seems like a reasonable constraint for a single thread of JS. I can imagine that we might want to share servers among isolates in the future and accept in multiple workers... but let's do that later. You should mention in a comment something about how this may need to be improved for the multi-worker accept situation.

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch from ae51d18 to 07b575b Jan 15, 2019

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch from 07b575b to 3e686e2 Jan 15, 2019

@kevinkassimo

This comment has been minimized.

Copy link
Contributor Author

commented Jan 15, 2019

Should be ready for one more round of review. (Added a test for multiple concurrent accepts)

Show resolved Hide resolved js/net_test.ts Outdated
Show resolved Hide resolved src/resources.rs Outdated

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch from 3e686e2 to de7b233 Jan 15, 2019

Show resolved Hide resolved js/net_test.ts Outdated
Show resolved Hide resolved js/net_test.ts
Show resolved Hide resolved src/resources.rs
Show resolved Hide resolved src/tokio_util.rs Outdated
Show resolved Hide resolved src/tokio_util.rs Outdated

@kevinkassimo kevinkassimo force-pushed the kevinkassimo:tcp/close_accept branch from de7b233 to 9f405cc Jan 15, 2019

@ry

ry approved these changes Jan 16, 2019

Copy link
Collaborator

left a comment

LGTM - very technical fix - thanks for digging through it.

@ry ry merged commit 431e455 into denoland:master Jan 16, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
@ry

This comment has been minimized.

Copy link
Collaborator

commented Jan 17, 2019

@kevinkassimo FYI I've now seen one failure of this test on Windows. Not sure what's happening - it's potentially flaky.

test netConcurrentAccept_permW0N1E0R0 assertEqual failed. actual = Another accept task is ongoing expected = Listener has been closedC:/deno/js/deps/https/deno.land/x/std/testing/mod.ts:23:14
        throw new Error(msg);
Error: actual: Another accept task is ongoing expected: Listener has been closed
    at assertEqual (file:///C:/deno/js/deps/https/deno.land/x/std/testing/mod.ts:28:11)
    at listener.accept.catch.e (file:///C:/deno/js/net_test.ts:33:5)
127.0.0.1 - - [17/Jan/2019 22:07:43] "GET /tests/subdir/mt_video_mp2t.t3.ts HTTP/1.1" 200 -
127.0.0.1 - - [17/Jan/2019 22:07:43] "GET /tests/subdir/no_ext HTTP/1.1" 200 -
``
@kevinkassimo

This comment has been minimized.

Copy link
Contributor Author

commented Jan 17, 2019

@ry It's a race condition I believe: basically the second accept somehow polls earlier than the first one by the scheduler.

keroxp added a commit to keroxp/deno that referenced this pull request Apr 27, 2019

ry added a commit that referenced this pull request Apr 27, 2019

ry added a commit to ry/deno that referenced this pull request Apr 28, 2019

Revert "recover: denoland#1517 Kill all pending accepts when TCP list…
…ener is closed (denoland#2224)"

Crashes while running wrk against
js/deps/https/deno.land/std/http/http_bench.ts

This reverts commit 972ac03.

ry added a commit that referenced this pull request Apr 28, 2019

Revert "recover: #1517 Kill all pending accepts when TCP listener is …
…closed (#2224)" (#2239)

Crashes while running wrk against
js/deps/https/deno.land/std/http/http_bench.ts

This reverts commit 972ac03.

keroxp added a commit to keroxp/deno that referenced this pull request May 2, 2019

ry added a commit to keroxp/deno that referenced this pull request May 2, 2019

ry added a commit to keroxp/deno that referenced this pull request May 3, 2019

juniarta added a commit to juniarta/deno that referenced this pull request May 8, 2019

Update (#2)
* Add --no-binary-download option to setup.py (denoland#1916)

* core: Behavior shouldn't be generic

We always pass around Box<[u8]>, and adding this generic is an
unnecessary complication.

Add deno_core_http_bench_test to test.py

sharedQueue works on deno_core_http_bench

* disable arm64 test

* docs: fix example (denoland#1936)

* jsdoc style guide update (denoland#1932)

* Fix TextDecoder for SharedArrayBuffer backed TypedArray (denoland#1940)

* core: remove reset() from SharedQueue API

* Add test style guide (denoland#1918)

* Fix a missing import in manual.md example for testing (denoland#1935)

* Typo fix in styleguide (denoland#1946)

* Fix entry point for tools/docs.py

* Remove unused tools/build_test.py file

* More permissions prompt options (denoland#1926)

* CI jobs should fail quicker on bad test_format or lint (denoland#1954)

* Integrate //core into existing code base

This disables a few tests which are broken still:
- tests/error_004_missing_module.test
- tests/error_005_missing_dynamic_import.test
- tests/error_006_import_ext_failure.test
- repl_test test_set_timeout
- repl_test test_async_op
- repl_test test_set_timeout_interlaced
- all of permission_prompt_test

* Re-order tests for sanity

* Re-enable permissions prompt tests (denoland#1957)

* Remove Eager read, write, accept (denoland#1959)

Removing this reduces tail latency in test/http_bench.ts by half.

* Re-implement init scripts in core (denoland#1958)

Re-enables arm64 CI test

* Deprecate DENO_BUILD_MODE=release

Instead use: tools/build.py --release

* Make write_gn_args.py quiet

* Rename //src/ to //cli/ (denoland#1962)

To better distinguish the deno_core crate from the executable deno,
which will now be called "the cli" internally.

* Add async version of http_util::fetch_sync_string

* Move fetch_remote_source, fetch_local_source

They do not depend on DenoDir, so should not be methods of it.

* Add fetch_remote_source_async (denoland#1972)

* Remove old Buf definition in cli.rs (denoland#1971)

* Separate behavior for the compiler isolate (denoland#1973)

* Add more async module loading function (denoland#1974)

* get_source_code_async
* fetch_module_meta_data_async
* fetch_module_meta_data_and_maybe_compile_async

* Improve pretty printing of objects

If an object has more than 5 elements, it is printed in abbeviated form
displaying only the keys. This is useful in the REPL when inspecting
large objects like the Deno namespace:

  > Deno
  { args, noColor, pid, env, exit, isTTY, execPath, chdir, cwd, File,
  open, stdin, stdout, stderr, read, write, seek, close, copy,
  toAsyncIterator, SeekMode, Buffer, readAll, mkdirSync, mkdir,
  makeTempDirSync, makeTempDir, chmodSync, chmod, removeSync, remove,
  renameSync, rename, readFileSync, readFile, readDirSync, readDir,
  copyFileSync, copyFile, readlinkSync, readlink, statSync, lstatSync,
  stat, lstat, symlinkSync, symlink, writeFileSync, writeFile, ErrorKind,
  DenoError, libdeno, permissions, revokePermission, truncateSync,
  truncate, connect, dial, listen, metrics, resources, run, Process,
  inspect, build, platform, version, Console, stringifyArgs,
  DomIterableMixin }

* pretty-print long strings

* Website and manual improvements (denoland#1967)

* v0.3.4

* Disable arm test again

getting this failure on travis:
https://travis-ci.com/denoland/deno/jobs/186518015

  $ $CARGO_TARGET_DIR/aarch64-unknown-linux-gnu/release/deno tests/002_hello.ts
  qemu: Unsupported syscall: 278
  qemu: Unsupported syscall: 278
  Compiling file:///home/travis/build/denoland/deno/tests/002_hello.ts

* Fix clippy errors and upgrade Rust to 1.33.0 in CI (denoland#1945)

* core: Allow terminating an Isolate from another thread (denoland#1982)

* Remove dead code (denoland#1983)

* Website updates (denoland#1984)

* remove `console` constructor (denoland#1985)

* Handle overflown shared queue (denoland#1992)

Fixes denoland#1988

* Add benchmark for max latency (denoland#1975)

* Update ts_library_builder (denoland#1920)

* Resolve callback moved from Behavior to mod_instantiate()  (denoland#1999)

This simplifies the Behavior trait and makes it more explicit where the
resolve callback is being made.

Also s/StartupScript/Script

* Check `Event` constructor params (denoland#1997)

* namespace reorg: libdeno and DenoCore to Deno.core (denoland#1998)

* fixed typo (denoland#2001)

* Do not close file on invalid seek mode (denoland#2004)

* Fix some typos (denoland#2005)

* remove `isTrusted`'s setter (denoland#2006)

* Fix error when JS is executed with --recompile (denoland#2007)

test case from @afinch7

* Rewrite readFile and writeFile (denoland#2000)

Using open/read/write

* Fix typo (denoland#2010)

* Check `CustomEvent` constructor params (denoland#2011)

* Clippy fixes (denoland#2009)

* Make sharedQueue overflow warning quieter (denoland#2008)

* Merge the --recompile and --reload flags (denoland#2003)

* Add Process.stderrOutput() (denoland#1828)

* v0.3.5

* third_party: upgrade rust crates

* Avoid search prototype chain (denoland#2019)

* check `EventTarget` params (denoland#2018)

* Move //libdeno to //core/libdeno (denoland#2015)

Fixes some sed errors introduced in c43cfe.

Unfortunately moving libdeno required splitting build.rs into two parts,
one for cli and one for core.

I've also removed the arm64 build - it's complicating things at this
re-org and we're not even testing it. I need to swing back to it and get
tools/test.py running for it.

* Call ninja directly from build.rs (denoland#2020)

* Rename crate deno_core to deno (denoland#2022)

* Remove deno_core_http_bench from core/Cargo.toml (denoland#2023)

So we don't have to have an optional tokio dependency. We build
deno_core_http_bench using GN anyway.

* Publish rust crate on crates.io (denoland#2024)

* third_party: add rust crate 'clap'

* Update `deno -h` output in manual (denoland#2030)

* Upgrade to TypeScript 3.4.1 (denoland#2027)

* Improve new TextDecoder().toString() (denoland#2032)

* Add web worker JS API (denoland#1993)

* Refactored the way worker polling is scheduled and errors are handled.
* Share the worker future as a Shared

* add scoop in the install (denoland#2035)

* Follow redirect location as new referrers for nested module imports (denoland#2031)

Fixes denoland#1742
Fixes denoland#2021

* Fix missing return type (denoland#2038)

* Clippy fixes

* cli: refactor compile_sync() for readability

* Add deno_core::RecursiveLoad for async module loading (denoland#2034)

* Refactor deno_core::RecursiveLoad to be more idiomatic (denoland#2034)

* web-compatibility console (denoland#2042)

* fix console.log when error has been caught (denoland#2041)

* fix toString for some web objects (denoland#2040)

* fix JSDoc (denoland#2043)

* Non-fatal compile_sync failures (denoland#2039)

And model worker resources as Stream

* fix code bug in jsdocs (denoland#2048)

* Improve docs in core (denoland#2049)

* v0.3.6

* add compile_async (denoland#2053)

* fix v0.3.6 date error (denoland#2051)

* Add worker benchmarks (denoland#2059)

* Fix tools/docs.py (denoland#2055)

* Test TCP_NODELAY in hyper_hello (denoland#2060)

* Refactor CLI flag parsing (denoland#2025)

* Fix typo in manual.md (denoland#2066)

* Fix unit_tests.py (denoland#2065)

They were silently broken in 780e72 due to flag reordering. This commit
also includes a new assert that would avoid that kind of failure in the
future.

* Flags clean up: DenoFlags::from (denoland#2068)

* use flatbuffer create functions to add fields (denoland#2046)

* Use -O3 instead of -O (denoland#2070)

As recommended in
https://www.reddit.com/r/rust/comments/balb45/why_is_hypers_max_latency_so_high_in_deno/ekck1ww/

* Add link/linkSync fs call for hardlinks (denoland#2074)

* fix `console instanceof Console` (denoland#2073)

* core: snapshot improvements (denoland#2052)

* Moves how snapshots are supplied to the Isolate. Previously they were
  given by Behavior::startup_data() but it was only called once at
  startup. It makes more sense (and simplifies Behavior) to pass it to the
  constructor of Isolate.
* Adds new libdeno type deno_snapshot instead of overloading
  deno_buf.
* Adds new libdeno method to delete snapshot deno_snapshot_delete().
* Renames deno_get_snapshot() to deno_snapshot_new().
* Makes StartupData hold references to snapshots. This was implicit when
  it previously held a deno_buf but is made explicit now. Note that
  include_bytes!() returns a &'static [u8] and we want to avoid
  copying that.

* Allow high precision performance.now() (denoland#1977)

* Merge Worker and Isolate types (denoland#2078)

Reduces generics.

* core: poll ops round robin

Also use a VecDeque to store pending ops to avoid exponential time complexity
when removing completed ops from the list.

* core: Rename Behavior to Dispatch (denoland#2082)

And rename IsolateState to ThreadSafeState.

Also make ThreadSafeState directly implement Dispatch. This is simpler.

* upgrade deno_std & add workaround prettier issue (denoland#2087)

* Silence clippy warnings and format source code

* Use correct type for `source_bytes` when buiding in check-only mode

* fix --v8-options (denoland#2093)

* Improve op dispatch (denoland#2088)

* v0.3.7

* Update `deno -h` output in manual (denoland#2099)

* fix: re-expose DomFile (denoland#2100)

* better wait for removed_from_resource_table_on_close test (denoland#2104)

* Add deno eval subcommand (denoland#2102)

* fix absolute path resolution from remote (denoland#2109)

* Upgrade deno_std (denoland#2111)

* docs: add a pixelated animation logo (denoland#2110)

* Fix silent error, add custom panic handler (denoland#2098)

This is to work around Tokio's panic recovery feature.
Ref tokio-rs/tokio#495
Ref tokio-rs/tokio#209
Ref denoland#1311
Fixes denoland#2097

* third_party: patch hyper to reduce worst-case response latency

* third_party: fix bug in hyper latency patch

* Small fixes in manual.md (denoland#2118)

* third_party: upgrade rust crates

* Add max memory benchmark (denoland#2061)

* Implement async module loading in CLI (denoland#2084)

* core/http_bench: support -D flag to enable logging

* core: run isolate tests within a task

This change is made in preparation for using FuturesUnordered to track
futures that are spawned by the isolate. FuturesUnordered sets up
notififications for every future that it finds to be not ready when
polled, which causes a crash if attempted outside of a task context.

* core: make Isolate use FuturesUnordered to track ops

Additionally, instead of polling ops in a loop until none of them are
ready, the isolate will now yield to the task system after delivering
the first batch of completed ops to the javascript side.

Although this makes performance a bit worse (about 15% fewer
requests/second on the 'deno_core_http_bench' benchmark), we feel that
the advantages are worth it:

* It resolves the extremely high worst-case latency that we were seeing
  on deno_core_http_bench, in particular when using the multi-threaded
  Tokio runtime, which would sometimes exceed a full second.

* Before this patch, the implementation of Isolate::poll() had to loop
  through all sub-futures and poll each one of them, which doesn't scale
  well as the number of futures managed by the isolate goes up. This
  could lead to poor performance when e.g. a server is servicing
  thousands of connected clients.

* Move deno_core_http_bench into examples dir (denoland#2127)

* Add cli dependency on tokio-rustls

* Fix clippy warnings

* benchmarks: fix max_memory and clean up (denoland#2137)

* Fix flaky tests (denoland#2139)

* benchmarks: improve syscall and thread count (denoland#2140)

* Fix redirects under async load (denoland#2133)

* chore: update eslint plugin (denoland#2146)

* avoid prototype builtin hasOwnProperty (denoland#2144)

* Improve test slow_never_ready_modules (denoland#2145)

* core: test Modules::deps and handle error cases better (denoland#2141)

* v0.3.8

* Make Deno/Deno.core not deletable/writable (denoland#2153)

* Exclude .png files from git auto-EOL (denoland#2161)

Fix denoland#1995 for users with the old git version

* fix typo in permissions explanation (denoland#2162)

* docs: improve clarity of the text (denoland#2165)

* Fix link to http_bench example in core README (denoland#2167)

* Refactor CLI entry point (denoland#2157)

Changes "deno --types" to "deno types"
and "deno --prefetch" to "deno prefetch"

* Fixes denoland#2033, shared queue push bug (denoland#2158)

* Fix flaky tests (denoland#2164)

* Remove dead code js/compiler_test.ts (denoland#2160)

* Issue/2170 (denoland#2175)

* Consistency using requiredArguments method

Replaced tuple length check in Headers class with requiredArguments
method.

* Consistency using requiredArguments method

Replaced tuple length check in UrlSearchParams class with
requiredArguments method.

* fmt

* Fix eslint warnings (denoland#2151)

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>

* Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (denoland#2177)

* Simplify logic in URLSearchParams, Buffer, Console (denoland#2174)

* symlink: Ignore type parameter on non-Windows platforms (denoland#2185)

Fixes denoland#2169

* third_party: upgrade rust crates

* Use tokio_threadpool's new panic_handler (denoland#2188)

* core: make Isolate concrete, remove Dispatch trait (denoland#2183)

Op dispatch is now dynamically dispatched, so slightly less efficient.
The immeasurable perf hit is a reasonable trade for the API simplicity
that is gained here.

* Upgrade CI to Node v12 (denoland#2193)

* Fix symlinkSyncNotImplemented (denoland#2198)

* core: Add test for snapshotting from Rust (denoland#2197)

* `URLSearchParams` deleting appended multiple (denoland#2201)

* v0.3.9

* Fix anchor links and add spinner to the benchmarks page (denoland#2205)

* Rename deno prefetch to deno fetch (denoland#2210)

* compile lib.deno_runtime.d.ts into executable (denoland#2209)

* Rename CLI flags to subcommands (denoland#2212)

* v0.3.10

* core: add Deps::to_json() (denoland#2223)

* URLSearchParams init with itself (denoland#2218)

* Use alt logos on benchmarks and manual page (denoland#2211)

* disable --version flag from deno version (denoland#2226)

* recover:  denoland#1517 Kill all pending accepts when TCP listener is closed (denoland#2224)

* fix test description for `atob` (denoland#2232)

* Revert "recover:  denoland#1517 Kill all pending accepts when TCP listener is closed (denoland#2224)" (denoland#2239)

Crashes while running wrk against
js/deps/https/deno.land/std/http/http_bench.ts

This reverts commit 972ac03.

* Disable flaky assert in killSuccess (denoland#2230)

* Add support for custom tsconfig.json (denoland#2089)

Use `--config`

* Rewrite flags.rs::parse_flags (denoland#2237)

* removes ? from URL when deleting all params (denoland#2217)

* flags: fix merge error (denoland#2244)

* Upgrade V8 to 7.6.53

* Fix max_latency benchmark on zero value (denoland#2247)

* Fix another flaky assert (denoland#2246)

* Make `atob` follow the spec (denoland#2242)

* Make error in ast_util more informative. (denoland#2252)

* fs: add Deno.utime/Deno.utimeSync (denoland#2241)

* Rename test targets (denoland#2262)

* core: remove unused function StrBufNullAllocPtr()

* Refactor zero-copy buffers for performance and to prevent memory leaks

* In order to prevent ArrayBuffers from getting garbage collected by V8,
  we used to store a v8::Persistent<ArrayBuffer> in a map. This patch
  introduces a custom ArrayBuffer allocator which doesn't use Persistent
  handles, but instead stores a pointer to the actual ArrayBuffer data
  alongside with a reference count. Since creating Persistent handles
  has quite a bit of overhead, this change significantly increases
  performance. Various HTTP server benchmarks report about 5-10% more
  requests per second than before.

* Previously the Persistent handle that prevented garbage collection had
  to be released manually, and this wasn't always done, which was
  causing memory leaks. This has been resolved by introducing a new
  `PinnedBuf` type in both Rust and C++ that automatically re-enables
  garbage collection when it goes out of scope.

* Zero-copy buffers are now correctly wrapped in an Option if there is a
  possibility that they're not present. This clears up a correctness
  issue where we were creating zero-length slices from a null pointer,
  which is against the rules.

* Async iterator for listener (denoland#2263)

* core: express op as enum (denoland#2255)

* doc: add long about messages for subcommands (denoland#2264)

Type deno <subcommand> -h to view descriptions.

* Add Request global constructor (denoland#2253)

* core: remove support for moving deno_buf ownership from C++ to JavaScript

The functionality hasn't been in use for a long time. Without this feature,
the `alloc_ptr` and `alloc_len` fields are no longer necessary.

* Work around Windows-only V8 concurrent initialization crash

This patch provides a work-around for an apparent V8 bug where
initializing multiple isolates concurrently leads to a crash on
Windows.

At the time of writing the cause of this crash is not exactly
understood, but it seems to be related to the V8 internal
function win64_unwindinfo::RegisterNonABICompliantCodeRange(),
which didn't exist in older versions of V8.

* Re-enable networking unit tests (denoland#2268)

The following tests were commented out in order to get this to go green :
- bodyMultipartFormData
- bodyURLEncodedFormData
- fetchRequestInitStringBody
- netConcurrentAccept
- netListenAsyncIterator

* core,cli: fix clippy warnings

* ci: run clippy

* Optimize read and write ops (denoland#2259)

* fixes body formData tests disabled in denoland#2268 (denoland#2274)

* Fix: deno --v8-options does not print v8 options (denoland#2277)

* add --no-fetch CLI flag to prevent remote downloads (denoland#2213)

* Bump required rustc version to 1.34.1

* ci: make the sanitize build fast again (denoland#2280)

sccache doesn't work for cache debug builds at the moment, because it
doesn't support the `-Xclang -fdebug-compilation-dir` flag that has been
added by the most recent V8 upgrade.

This patch should make the asan/lsan job on Travis CI fast again.

* fix: display "-0" for -0 (denoland#2281)

Added special handling code in js/console.ts

* Minor doc edits (denoland#2231)

* feat: support .mjs extension resolution (denoland#2283)

Removed `extmap` and added .mjs entry in `map_file_extension`.
The assert in the compiler does not need to be updated, since it is
resolving from the compiled cache instead of elsewhere (notice the .map
is asserted next to it)

* feat(cli cmd): deno xeval (denoland#2260)

* add "deno run" subcommand (denoland#2215)

* v0.3.11

* fix: deno version panic (denoland#2286)

* v0.4.0

* add warning for adblockers (denoland#2250)

* update manual.md for deno v0.4.0 (denoland#2291)

* fix: Add all permissions to deno xeval (denoland#2290)

* Add Deno.chown (denoland#2292)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.