Stream: git-wasmtime

Topic: wasmtime / issue #7413 wasi-http: dropping `incoming-resp...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 30 2023 at 20:17):

dicej opened issue #7413:

While implementing a test for outbound request body streaming (https://github.com/bytecodealliance/wasmtime/pull/7412), I discovered that dropping the incoming-response object would cause the request connection to be closed, even if I still had open handles to the request body and stream.

For example, if I insert drop(response); to https://github.com/dicej/wasmtime/blob/1782a165754a2dd62f45cbc670603cc85477323b/crates/test-programs/src/bin/api_proxy_streaming.rs#L129, the test will fail with no (or few) bytes copied. The behavior I expected was that the test would pass (i.e. all bytes would be copied) regardless of whether the response handle was dropped or not.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 30 2023 at 21:14):

pchickey commented on issue #7413:

The worker task that manages the connection lives here: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-http/src/types.rs#L264 It looks like we need to hold an Arc to it both there and in the HostIncomingBody.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 17:57):

pchickey assigned issue #7413 to elliottt.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2023 at 18:43):

pchickey closed issue #7413:

While implementing a test for outbound request body streaming (https://github.com/bytecodealliance/wasmtime/pull/7412), I discovered that dropping the incoming-response object would cause the request connection to be closed, even if I still had open handles to the request body and stream.

For example, if I insert drop(response); to https://github.com/dicej/wasmtime/blob/1782a165754a2dd62f45cbc670603cc85477323b/crates/test-programs/src/bin/api_proxy_streaming.rs#L129, the test will fail with no (or few) bytes copied. The behavior I expected was that the test would pass (i.e. all bytes would be copied) regardless of whether the response handle was dropped or not.


Last updated: Nov 22 2024 at 16:03 UTC