Issue #13856 has been reported by MSP-Greg (Greg L).

----------------------------------------
Bug #13856: MinGW / mswin intermittent failure in test/socket/test_socket.rb
https://bugs.ruby-lang.org/issues/13856

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
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)


-- 
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>