Project

General

Profile

Bug #15763

Segmentation fault in timeout.rb / sleep

Added by stan-envato (Stan Pitucha) 10 days ago. Updated 10 days ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]
[ruby-core:92239]

Description

I'm running into crashes on both ruby 2.6.1 and 2.6.2 (2.5.x is all good).
I'm on OSX / mojave with ruby installed via rbenv / ruby-build. Confirmed on two different machines.

The crash happens through the parallel gem, but it happens even if the number of processes is reduced to 1.

Short summary:

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0011 e:000010 CFUNC :sleep
c:0002 p:0025 s:0006 e:000005 BLOCK /Users/viraptor/.rbenv/versions/2.6.2/lib/ruby/2.6.0/timeout.rb:86 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/Users/viraptor/.rbenv/versions/2.6.2/lib/ruby/2.6.0/timeout.rb:86:in block (2 levels) in timeout'
/Users/viraptor/.rbenv/versions/2.6.2/lib/ruby/2.6.0/timeout.rb:86:in
sleep'

The rest is in the logs.


Files

crash_log (68.9 KB) crash_log console output stan-envato (Stan Pitucha), 04/11/2019 12:22 AM
ruby_2019-04-11-101832-3_Stans-MacBook-Pro.crash (44.7 KB) ruby_2019-04-11-101832-3_Stans-MacBook-Pro.crash osx crash report stan-envato (Stan Pitucha), 04/11/2019 12:25 AM

History

Updated by stan-envato (Stan Pitucha) 10 days ago

Additionally, the issue does not seem to happen on every build. If I rebuild the same version of ruby, the issue may go away. (until another few rebuilds)

Updated by mame (Yusuke Endoh) 10 days ago

This might be the same issue as:

The common points are:

  • macOS (darwin17 or 18)
  • uses multiple threads
  • segfault in getaddrinfo

I could be wrong, but I suspect a bug of macOS's getaddrinfo.

Can you show a short program that causes the segfault?

Also available in: Atom PDF