Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-14 Thread Yasumasa Suenaga
On Thu, 14 Jan 2021 14:47:47 GMT, Daniel Fuchs wrote: > The updated test looks good. I ran the httpclient tests ~200 times on all > platform and the new test didn't fail. Please integrate and I will sponsor > (if you need a sponsor?). I'm OpenJDK Reviewer (ysuenaga), so I will integrate it. -

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-14 Thread Chris Hegarty
On Thu, 14 Jan 2021 02:25:25 GMT, Yasumasa Suenaga wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >> `Bo

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-14 Thread Daniel Fuchs
On Thu, 14 Jan 2021 02:25:25 GMT, Yasumasa Suenaga wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >> `Bo

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-13 Thread Yasumasa Suenaga
On Wed, 13 Jan 2021 18:59:30 GMT, Daniel Fuchs wrote: >> PING: could you review this PR? > > Hi Yasumasa, > > The new StreamCloseTest seems to be suffering from some race conditions; On > windows I saw it failing 29 times out of 50. > > config StreamCloseTest.setup(): success > test StreamClos

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-13 Thread Yasumasa Suenaga
> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPublishers.ofFile()`has same problem because it also use > `St

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v4]

2021-01-13 Thread Daniel Fuchs
On Thu, 7 Jan 2021 00:32:42 GMT, Yasumasa Suenaga wrote: >> @ChrisHegarty @dfuch could you review new change? It updates a testcase. > > PING: could you review this PR? Hi Yasumasa, The new StreamCloseTest seems to be suffering from some race conditions; On windows I saw it failing 29 times ou

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v4]

2021-01-06 Thread Yasumasa Suenaga
On Fri, 18 Dec 2020 08:07:53 GMT, Yasumasa Suenaga wrote: >> @dfuch Thanks for your comment! I updated PR. >> >> * Close the stream in `StreamIterator::hasNext` >> * Throw `UncheckedIOException` whenever IOE happens >> * Added testcase for this PR >> >> Could you review again? > > @ChrisHegarty

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v4]

2020-12-18 Thread Yasumasa Suenaga
On Sat, 5 Dec 2020 04:55:56 GMT, Yasumasa Suenaga wrote: >> Hi Yasumasa, >> >> Thanks for filing the issue and providing a fix. >> >> Before integrating, can you please provide a non regression test that >> verifies the fix? You can place it in `test/jdk/java/net/httpclient/`; >> Please als

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-10 Thread Yasumasa Suenaga
On Thu, 10 Dec 2020 10:13:01 GMT, Daniel Fuchs wrote: >> test/jdk/java/net/httpclient/StreamCloseTest.java line 37: >> >>> 35: * @compile ../../../com/sun/net/httpserver/FileServerHandler.java >>> 36: * @build jdk.test.lib.net.SimpleSSLContext >>> 37: * @build LightWeightHttpServer >> >> It

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v4]

2020-12-10 Thread Yasumasa Suenaga
> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPublishers.ofFile()`has same problem because it also use > `St

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-10 Thread Daniel Fuchs
On Thu, 10 Dec 2020 09:35:05 GMT, Chris Hegarty wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Throw UIOE when stream throws IOE > > test/jdk/java/net/httpclient/StreamCloseTest.java line 37: > >> 35: * @com

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-10 Thread Chris Hegarty
On Sat, 5 Dec 2020 04:54:27 GMT, Yasumasa Suenaga wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >> `Bod

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-04 Thread Yasumasa Suenaga
On Fri, 4 Dec 2020 09:59:11 GMT, Daniel Fuchs wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Throw UIOE when stream throws IOE > > Hi Yasumasa, > > Thanks for filing the issue and providing a fix. > > Befo

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v3]

2020-12-04 Thread Yasumasa Suenaga
> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPublishers.ofFile()`has same problem because it also use > `St

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v2]

2020-12-04 Thread Yasumasa Suenaga
> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPublishers.ofFile()`has same problem because it also use > `St

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-04 Thread Daniel Fuchs
On Fri, 4 Dec 2020 14:32:37 GMT, Yasumasa Suenaga wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java >> line 422: >> >>> 420: } catch (IOException ex) { >>> 421: need2Read = false; >>> 422: haveNext = false; >> >>

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-04 Thread Daniel Fuchs
On Fri, 4 Dec 2020 14:32:41 GMT, Yasumasa Suenaga wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java >> line 426: >> >>> 424: is.close(); >>> 425: } catch (IOException ex2) {} >>> 426: return -1; >> >> } ca

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-04 Thread Yasumasa Suenaga
On Fri, 4 Dec 2020 09:53:00 GMT, Daniel Fuchs wrote: >> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when >> the stream reaches EOF. However IOE handler returns without closing. >> >> I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think >> `BodyPub

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-04 Thread Daniel Fuchs
On Fri, 4 Dec 2020 00:47:51 GMT, Yasumasa Suenaga wrote: > `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPubl

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-04 Thread Daniel Fuchs
On Fri, 4 Dec 2020 00:47:51 GMT, Yasumasa Suenaga wrote: > `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPubl

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-03 Thread Yasumasa Suenaga
On Fri, 4 Dec 2020 00:47:51 GMT, Yasumasa Suenaga wrote: > `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPubl

RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens

2020-12-03 Thread Yasumasa Suenaga
`InputStream` from `BodyPublishers.ofInputStream()` is usually closed when the stream reaches EOF. However IOE handler returns without closing. I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think `BodyPublishers.ofFile()`has same problem because it also use `StreamIterator