[#87467] [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError — mofezilla@...
Issue #14841 has been reported by hirura (Hiroyuki URANISHI).
3 messages
2018/06/10
[#87515] [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError — hirura@...
Issue #14841 has been updated by hirura (Hiroyuki URANISHI).
7 messages
2018/06/19
[#87516] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
hirura@gmail.com wrote:
[#87517] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
Sorry, I left this out: If you can reproduce it again, can you
[#87519] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— hirura <hirura@...>
2018/06/19
Hi Eric,
[#87521] Re: [Ruby trunk Bug#14841] Very rarely IO#readpartial does not raise EOFError
— Eric Wong <normalperson@...>
2018/06/19
hirura <hirura@gmail.com> wrote:
[#87541] [Ruby trunk Feature#14859] [PATCH] implement Timeout in VM — normalperson@...
Issue #14859 has been reported by normalperson (Eric Wong).
4 messages
2018/06/21
[#87570] [Ruby trunk Feature#14859] [PATCH] implement Timeout in VM — eregontp@...
Issue #14859 has been updated by Eregon (Benoit Daloze).
4 messages
2018/06/21
[#87605] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been reported by k0kubun (Takashi Kokubun).
3 messages
2018/06/23
[#87614] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — normalperson@...
Issue #14867 has been updated by normalperson (Eric Wong).
4 messages
2018/06/23
[#87631] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — takashikkbn@...
Issue #14867 has been updated by k0kubun (Takashi Kokubun).
5 messages
2018/06/25
[#87635] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process
— Eric Wong <normalperson@...>
2018/06/25
takashikkbn@gmail.com wrote:
[#87665] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — eregontp@...
Issue #14867 has been updated by Eregon (Benoit Daloze).
4 messages
2018/06/28
[#87710] [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process — Greg.mpls@...
Issue #14867 has been updated by MSP-Greg (Greg L).
3 messages
2018/06/30
[ruby-core:87458] [Ruby trunk Bug#14829] test-all - 2 fails - 63589 - Windows - part of 'Introduce write_timeout to Net::HTTP'
From:
Greg.mpls@...
Date:
2018-06-08 14:53:53 UTC
List:
ruby-core #87458
Issue #14829 has been updated by MSP-Greg (Greg L).
@naruse @usa
Thank you for the work on net/http and write_timeout. Obviously, write_nonblock works differently on Windows and *nix.
I'm by no means an expert on what expected behavior is with net/http, but I think it would certainly be helpful to have the write_timeout tests not skipped on windows.
For one thing, if windows behavior changes in the future, hopefully the test would fail...
Otherwise, feel free to close. Greg
----------------------------------------
Bug #14829: test-all - 2 fails - 63589 - Windows - part of 'Introduce write_timeout to Net::HTTP'
https://bugs.ruby-lang.org/issues/14829#change-72448
* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.0dev (2018-06-06 trunk 63593) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
@naruse
At 63589, Windows builds, both mswin & MinGW are failing on the following two tests:
TestNetHTTP_v1_2#test_timeout_during_HTTP_session_write
TestNetHTTP_v1_2_chunked#test_timeout_during_HTTP_session_write
I am not that familiar with blocking IO. I added some debug code to Net::BufferedIO.write0 as follows:
```ruby
def write0(*strs)
@debug_output << strs.map(&:dump).join if @debug_output
orig_written_bytes = @written_bytes
strs.each_with_index do |str, i|
need_retry = true
case len = @io.write_nonblock(str, exception: false)
when Integer
@written_bytes += len
len -= str.bytesize
puts "\nlen #{len}" if @write_timeout < 50
if len == 0
if strs.size == i+1
puts "@written_bytes #{@written_bytes} orig_written_bytes #{orig_written_bytes}" if @write_timeout < 50
return @written_bytes - orig_written_bytes
else
need_retry = false
# next string
end
elsif len < 0
str = str[len, -len]
else # len > 0
need_retry = false
# next string
end
# continue looping
when :wait_writable
puts "\nlen #{len}" if @write_timeout < 50
@io.to_io.wait_writable(@write_timeout) or raise Net::WriteTimeout
# continue looping
else
puts "\nlen #{len}" if @write_timeout < 50
end while need_retry
puts "\nPast case statement"
end
end
```
Console output for the two tests:
```
[50/69] TestNetHTTP_v1_2#test_timeout_during_HTTP_session_writeC:/Greg/Ruby26-x64b/lib/ruby/2.6.0/net/http/generic_request.rb:186: warning: net/http: Content-Type did not set; using application/x-www-form-urlencoded
len 0
@written_bytes 225 orig_written_bytes 0
len 0
@written_bytes 25000000 orig_written_bytes 0
#<Thread:0x0000000003c97f40@C:/Greg/GitHub/ruby/test/net/http/test_http.rb:544 aborting> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
5: from C:/Greg/GitHub/ruby/test/net/http/test_http.rb:545:in `block (2 levels) in test_timeout_during_HTTP_session_write'
4: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:96:in `assert_raise'
3: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:96:in `ensure in assert_raise'
2: from C:/Greg/GitHub/ruby/test/lib/minitest/unit.rb:550:in `flunk'
1: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:37:in `assert'
C:/Greg/GitHub/ruby/test/lib/minitest/unit.rb:201:in `assert': Net::WriteTimeout expected but nothing was raised. (MiniTest::Assertion)
= 10.06 s
[69/69] TestNetHTTP_v1_2_chunked#test_timeout_during_HTTP_session_writeC:/Greg/Ruby26-x64b/lib/ruby/2.6.0/net/http/generic_request.rb:186: warning: net/http: Content-Type did not set; using application/x-www-form-urlencoded
len 0
@written_bytes 225 orig_written_bytes 0
len 0
@written_bytes 25000000 orig_written_bytes 0
#<Thread:0x00000000034f15c0@C:/Greg/GitHub/ruby/test/net/http/test_http.rb:544 aborting> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
5: from C:/Greg/GitHub/ruby/test/net/http/test_http.rb:545:in `block (2 levels) in test_timeout_during_HTTP_session_write'
4: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:96:in `assert_raise'
3: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:96:in `ensure in assert_raise'
2: from C:/Greg/GitHub/ruby/test/lib/minitest/unit.rb:550:in `flunk'
1: from C:/Greg/GitHub/ruby/test/lib/test/unit/assertions.rb:37:in `assert'
C:/Greg/GitHub/ruby/test/lib/minitest/unit.rb:201:in `assert': Net::WriteTimeout expected but nothing was raised. (MiniTest::Assertion)
= 10.07 s
```
I have no idea if this is helpful, and I'm happy to check whatever. Certainly interested in seeing the solution...
Thanks for your work, Greg
---Files--------------------------------
http.rb.patch (1.14 KB)
GitHub_PR_1883.patch (1.24 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>