Issue #13856 has been updated by usa (Usaku NAKAMURA).
Backport changed from 2.2: UNKNOWN, 2.3: REQUIRED, 2.4: DONE to 2.2: UNKNOWN, 2.3: DONE, 2.4: DONE
ruby_2_3 r62821 merged revision(s) 60055.
----------------------------------------
Bug #13856: MinGW / mswin intermittent failure in test/socket/test_socket.rb
https://bugs.ruby-lang.org/issues/13856#change-71071
* Author: MSP-Greg (Greg L)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.0dev (2017-09-11 trunk 59829) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: DONE, 2.4: DONE
----------------------------------------
Recently, there have been two Appveyor fails, [first](https://ci.appveyor.com/project/ruby/ruby/build/1.0.5036) and [second](https://ci.appveyor.com/project/ruby/ruby/build/1.0.5078).
Both listed the following as the error:
```
running file: C:/projects/ruby/test/socket/test_socket.rb
Some worker was crashed. It seems ruby interpreter's bug
or, a bug of test/unit/parallel.rb. try again without -j
option.
```
I have a similar intermittent error as a silent segfault in MinGW builds. I've attached the patch file I use, it patches the [TestSocket#test_closed_read](https://github.com/ruby/ruby/blob/ed740754bd96e845bc86f070b90267efc1ad5136/test/socket/test_socket.rb#L528-L548) method, and simply adds `sock.autoclose = false` after `sock` is created.
I haven't done much Ruby socket coding, so I've never looked into the issue, but the test passes and is stable with the patch. For all I know, the patch may 'end-around' the whole point of the test.
I don't know if this helps identify the real issue or not. If not, feel free to close.
---Files--------------------------------
segv-test-socket-test_socket.rb.patch (782 Bytes)
0001-io.c-fix-segfault-with-closing-socket-on-MinGW.patch (1.76 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>