[#85940] [Ruby trunk Bug#14578] Forking a child process inside of a mutex crashes the ruby interpreter — ben.govero@...
Issue #14578 has been reported by bengovero (Ben Govero).
3 messages
2018/03/05
[#86205] [Ruby trunk Feature#14618] Add display width method to String for CLI — aycabta@...
Issue #14618 has been reported by aycabta (aycabta .).
3 messages
2018/03/19
[#86366] Re: [ruby-cvs:70102] usa:r63008 (trunk): get rid of test error/failure on Windows introduced at r62955 — Eric Wong <normalperson@...>
usa@ruby-lang.org wrote:
3 messages
2018/03/28
[ruby-core:85945] [Ruby trunk Bug#14571] File descriptor leak in resolv.rb
From:
nobu@...
Date:
2018-03-06 02:23:31 UTC
List:
ruby-core #85945
Issue #14571 has been updated by nobu (Nobuyoshi Nakada). Just to clarify, do those file descriptors get closed by GC? ---------------------------------------- Bug #14571: File descriptor leak in resolv.rb https://bugs.ruby-lang.org/issues/14571#change-70801 * Author: quixoten (Devin Christensen) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- There's an edge case in resolv.rb that can lead to file descriptor leaks on a highly saturated system (logstash in our case).  (the cliff at the end is from a restart of the application) We're using the logstash-filter-dns plugin which [uses timeout](https://github.com/logstash-plugins/logstash-filter-dns/blob/v3.0.7/lib/logstash/filters/dns.rb#L250-L252). When a timeout fires while [waiting](https://github.com/ruby/ruby/blob/8032b00f8e43be6e34f93005a17e26bc6d89f1c1/lib/resolv.rb#L649-L658) for a [random](https://github.com/ruby/ruby/blob/8032b00f8e43be6e34f93005a17e26bc6d89f1c1/lib/resolv.rb#L752) [port](https://github.com/ruby/ruby/blob/8032b00f8e43be6e34f93005a17e26bc6d89f1c1/lib/resolv.rb#L805), the new object is never returned to the caller. Instead `requester` is [set to nil](https://github.com/ruby/ruby/blob/8032b00f8e43be6e34f93005a17e26bc6d89f1c1/lib/resolv.rb#L514). There's no handle to any sockets that were created in the initializer, so they can't be closed, and one ore more file descriptors is leaked. (This if my first patch submission, let me know what I can fix or do better.) ---Files-------------------------------- add-failing-tests.patch (1.39 KB) fix-leak.patch (5.01 KB) combined.patch (6.4 KB) -- 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>