From: usa@... Date: 2017-09-21T11:39:34+00:00 Subject: [ruby-core:82919] [Ruby trunk Bug#13856] MinGW / mswin intermittent failure in test/socket/test_socket.rb Issue #13856 has been updated by usa (Usaku NAKAMURA). Shirosaki-san, your patch seems ok. Could you check in? ---------------------------------------- Bug #13856: MinGW / mswin intermittent failure in test/socket/test_socket.rb https://bugs.ruby-lang.org/issues/13856#change-66819 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-09-11 trunk 59829) [x64-mingw32] * 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) 0001-io.c-fix-segfault-with-closing-socket-on-MinGW.patch (1.76 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: