Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-04-26T16:13:55ZRuby Issue Tracking System
Redmine Ruby master - Bug #13513 (Closed): Resolv::DNS::Message.decode hangs after detecting truncation i...https://bugs.ruby-lang.org/issues/135132017-04-26T16:13:55Ziamasmith (Andrew Smith)
<p>ruby-core:32407 introduced support for a TCP requestor in fetch_resource if Resolv::DNS::Message.decode returned RCode::NoError and a reply tc of 1.</p>
<p>Unfortunately Resolv::DNS::Message.decode proceeds to attempt to unpack all answers based upon the answer count from the message regardless of truncation which causes exception behaviour which is then silently retried as this is seen as the response to the request never being seen (see begin, ensure).</p>
<p>To avoid this issue I add a return to Message.decode once the truncation is detected.</p>
<p>To patch this in a portable fashion I use the attached monkey patch which causes the truncation to propagate correctly back to fetch_resource and allows it to proceed correctly with the TCP based query.</p> Ruby master - Bug #12808 (Closed): Ruby builds do not produce Process::UPTIME constant on macOS S...https://bugs.ruby-lang.org/issues/128082016-10-04T14:15:55Ziamasmith (Andrew Smith)
<p>Due to the fact that macOS Sierra does not define CLOCK_UPTIME in /usr/include/time.h the UPTIME constant is never generated during the Ruby build.</p>
<p>macOS defines CLOCK_UPTIME_RAW instead as..</p>
<p>clock that increments monotonically, in the same manner as CLOCK_MONOTONIC_RAW, but that does not increment while the system is asleep. The returned value<br>
is identical to the result of mach_absolute_time() after the appropriate mach_timebase conversion is applied.</p>
<p>It appears this is done to provide a selection for uptime value based on sleeping or non sleeping return value.</p>