ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: jessebs@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91379] [Ruby trunk Bug#15490] socket.rb - recurring segmentation faults
Date: Fri, 01 Feb 2019 20:56:21 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-76634.20190201205620.f64d13c5cabb5b85@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15490.20181231034644@ruby-lang.org

Issue #15490 has been updated by jessebs (Jesse Bowes).


I have run into a similar issue using Ruby 2.5.1 but unfortunately don't have an easy way to reproduce.

A couple of things that help mitigate it (and may be useful for finding the actual issue):

getaddrinfo is in the backtrace and this is happening around some network code for me.  I found that using an IP address instead of hostname makes the issue go away.

Another option that I have found is that around the code giving problems, turning off Garbage Collection will make it go away as well (GC.disable).

----------------------------------------
Bug #15490: socket.rb - recurring segmentation faults
https://bugs.ruby-lang.org/issues/15490#change-76634

* Author: matthew.oriordan (Matthew O'Riordan)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
With Ruby 2.5.3p105 and now with Ruby 2.6.0 following our recent upgrade, we are sadly still seeing reasonably frequent segmentation faults from Ruby, specifically within socket.rb

Looking in socket.rb, it seems it's related to the address lookup:

    Addrinfo.getaddrinfo(nodename, service, family, socktype, protocol, flags).each(&block)

Segfault report below in full.  Attached are diagnostic reports too.  If there is anything I can do to help reproduce I will, however sadly I have never been able to reproduce reliably, yet sadly it happens once every few days.


---Files--------------------------------
ruby_2018-12-31-032126-2_MacBook-Pro.crash (46.8 KB)
ruby_2018-12-31-032126-3_MacBook-Pro.crash (46.8 KB)
ruby_2018-12-31-032126-1_MacBook-Pro.crash (46.8 KB)
ruby_2018-12-31-032125_MacBook-Pro.crash (46.8 KB)
bug-15490.log (833 KB)


-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2019-02-01 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15490.20181231034644@ruby-lang.org>
2018-12-31  3:46 ` [ruby-core:90833] [Ruby trunk Bug#15490] socket.rb - recurring segmentation faults matt
2018-12-31  8:51 ` [ruby-core:90835] " nobu
2019-01-03 23:18 ` [ruby-core:90880] " matt
2019-02-01 20:56 ` jessebs [this message]
2019-03-16 16:56 ` [ruby-core:91854] " zoltan.ormandi
2019-03-22  9:08 ` [ruby-core:91925] " pikachuexe
2019-05-06 13:48 ` [ruby-core:92573] " matt
2019-05-06 14:03 ` [ruby-core:92574] " matt
2019-06-11 14:55 ` [ruby-core:93045] " myles
2019-10-13 13:34 ` [ruby-core:95312] [Ruby master " takeshi.arabiki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-76634.20190201205620.f64d13c5cabb5b85@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).