https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112018-12-31T08:51:13ZRuby Issue Tracking SystemRuby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=760182018-12-31T08:51:13Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>File</strong> <a href="/attachments/7598">bug-15490.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7598/bug-15490.log">bug-15490.log</a> added</li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/76018/diff?detail_id=50810">diff</a>)</li></ul><p>Always it happens here, though I couldn't find the source of <code>si_destination_compare</code>, it may be a problem in libsystem_info.dylib.</p>
<pre><code>7 ??? 0x00007fc6cddeaac0 0 + 140491834174144
8 libsystem_trace.dylib 0x00007fff6e31adb4 os_log_type_enabled + 627
9 libsystem_info.dylib 0x00007fff6e23305b si_destination_compare_statistics + 1659
10 libsystem_info.dylib 0x00007fff6e231bf3 si_destination_compare_internal + 707
11 libsystem_info.dylib 0x00007fff6e231762 si_destination_compare + 530
12 libsystem_info.dylib 0x00007fff6e20f95f _gai_addr_sort + 111
13 libsystem_c.dylib 0x00007fff6e1b9a0f _isort + 193
14 libsystem_c.dylib 0x00007fff6e1b993c _qsort + 2159
15 libsystem_info.dylib 0x00007fff6e207135 _gai_sort_list + 789
16 libsystem_info.dylib 0x00007fff6e205b88 si_addrinfo + 2040
17 libsystem_info.dylib 0x00007fff6e205262 _getaddrinfo_internal + 242
18 libsystem_info.dylib 0x00007fff6e20515d getaddrinfo + 61
</code></pre> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=760662019-01-03T23:18:04Zmatthew.oriordan (Matthew O'Riordan)
<ul></ul><p>Is there something I can do to help with the source of si_destination_compare, and the problem you believe is related to libsystem_info.dylib?</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=766342019-02-01T20:56:20Zjessebs (Jesse Bowes)
<ul></ul><p>I have run into a similar issue using Ruby 2.5.1 but unfortunately don't have an easy way to reproduce.</p>
<p>A couple of things that help mitigate it (and may be useful for finding the actual issue):</p>
<p>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.</p>
<p>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).</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=769382019-03-05T14:47:56Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-8 priority-4 priority-default closed" href="/issues/15639">Bug #15639</a>: [BUG] Segmentation fault at 0x000000010e82ca3a</i> added</li></ul> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=771252019-03-16T16:56:52Zzormandi (Zoltan Ormandi)zoltan.ormandi@emarsys.com
<ul></ul><p>We're seeing this issue as well, on Ruby 2.6.1. For us, it occurs towards the end of a fairly large test suite when running one of our legacy Cucumber tests. When we only run the Cucumber section of our test suite (not the whole thing) then the issue does not occur. Also, it does not happen on our CI server which makes me suspect that this might be an OSX-exclusive problem - we're only seeing it on our Macbooks.</p>
<p>The test that triggers the crash starts up a fake web server using WEBrick to simulate one of our services. It binds to '<a href="http://localhost:42638" class="external">http://localhost:42638</a>' but the suggestion of using an IP address instead of a hostname didn't solve the problem for us; it still occurs if we change the binding to '<a href="http://127.0.0.1:42638" class="external">http://127.0.0.1:42638</a>'.</p>
<p>Let me know if there's any information that could help (other than a reproduce script, which I obviously cannot provide) - it would be great to get rid of this bug.</p>
<p><em>UPDATE</em></p>
<p>Unfortunately, I was wrong. The issue does sometimes occur even when only the Cucumber section of our test suite is being executed. Also, turning off the GC didn't help either.</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=772572019-03-22T09:08:15ZPikachuEXE (Pikachu EXE)
<ul></ul><p>I might got a similar issue with 2.6.2 (also crash at os_log_type_enabled + 627)<br>
<a href="https://bugs.ruby-lang.org/issues/15623#note-2" class="external">https://bugs.ruby-lang.org/issues/15623#note-2</a></p>
<p>See update #2</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=779322019-05-06T13:48:48Zmatthew.oriordan (Matthew O'Riordan)
<ul><li><strong>ruby -v</strong> changed from <i>ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]</i> to <i>ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]</i></li></ul><p>This issue is still happening with the latest version of Ruby 2.6.3. Happy to provide more logs / run tests if I can help.</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=779332019-05-06T14:03:33Zmatthew.oriordan (Matthew O'Riordan)
<ul></ul><p>Some background to how I have worked around this for now, which may be useful.<br>
I use the parallel gem <a href="https://github.com/grosser/parallel" class="external">https://github.com/grosser/parallel</a>, which can parallelise tasks using threads of processes. When switching from processes to threads, this issue has gone away. In some code baths with a CLI we use locally, processes are preferable given the isolation from the running code, however in this case it was not an issue to use threads and arguably also better from a resource perspective.</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=784142019-06-09T04:11:17Zjeremyevans0 (Jeremy Evans)merch-redmine@jeremyevans.net
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-8 priority-4 priority-default closed" href="/issues/13646">Bug #13646</a>: Segmentation fault with postgresql_adapter in Rails</i> added</li></ul> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=784382019-06-11T14:55:40Zmylesgearon (Myles Gearon)
<ul><li><strong>ruby -v</strong> changed from <i>ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]</i> to <i>ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin18], ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18], ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]</i></li></ul><p>I have been experiencing this issue as well, but only on a computer running OSX 10.14.5. I can't seem to recreate this on linux using Fedora 29 or Ubuntu 18.04.</p>
<p>Switching the OSX over to 127.0.0.1 instead of localhost seems to crash less? But I'm still getting the segfault there. The segfault happens on 2.5.0 and 2.6.3 for OSX.</p> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=802692019-07-30T08:34:09Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Third Party's Issue</i></li></ul> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=803432019-08-02T00:38:20Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-8 priority-4 priority-default closed" href="/issues/16036">Bug #16036</a>: workers keep on crashing with [BUG] Segmentation fault at 0x000000010b647a3a</i> added</li></ul> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=804842019-08-08T00:16:36Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-8 priority-4 priority-default closed" href="/issues/16085">Bug #16085</a>: when running rspec I get this issue</i> added</li></ul> Ruby master - Bug #15490: socket.rb - recurring segmentation faultshttps://bugs.ruby-lang.org/issues/15490?journal_id=819962019-10-13T13:34:55Za_bicky (Takeshi Arabiki)
<ul></ul><p>I got a similar issue.</p>
<p>I uploaded a reproducible code and a crash report.<br>
<a href="https://gist.github.com/abicky/1263fd5c7d39db257f663382970bc2b0" class="external">https://gist.github.com/abicky/1263fd5c7d39db257f663382970bc2b0</a></p>
<p>I hope they help.</p>