RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1944227 - Resolv::DNS: ruby:2.7/ruby: timeouts if multiple IPv6 name servers are given and address contains leading zero [rhel-8]
Summary: Resolv::DNS: ruby:2.7/ruby: timeouts if multiple IPv6 name servers are given ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ruby
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Vít Ondruch
QA Contact: Jan Houska
URL:
Whiteboard:
Depends On:
Blocks: 1916404 1952000
TreeView+ depends on / blocked
 
Reported: 2021-03-29 14:51 UTC by Grzegorz Grasza
Modified: 2023-02-09 12:19 UTC (History)
6 users (show)

Fixed In Version: ruby-2.7.3-136.module+el8.4.0+10728+4c884998
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1952000 (view as bug list)
Environment:
Last Closed: 2021-12-16 11:54:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5705911 0 None None None 2021-03-30 10:38:02 UTC
Ruby 16439 0 None None None 2021-03-29 14:51:47 UTC

Description Grzegorz Grasza 2021-03-29 14:51:47 UTC
Description of problem:

Resolv::DNS does not return any results under those conditions:

    there are at least two name servers (in /etc/resolv.conf).
    The name servers have IPv6 addresses containing leading zeros.

Example resolv.conf:
nameserver 2001:0db8::0001:1
nameserver 2001:0db8::0002:1

This is caused by a mismatch in representation of the address: Requester::sender_for compares the address of the answering server (e.g. 2001:0db8::1:1) with the address the request was sent to (e.g. 2001:0db8::0001:1).

Version-Release number of selected component (if applicable):

ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64

How reproducible:

We reproduced this by running puppet_facts on OSP 16.1

Steps to Reproduce:


You can see the difference in timing when the ipa facts are pre-populated (the DNS lookup is skipped) or not:

[root@]# time FACTER_ipa_domain='' FACTER_ipa_server='' puppet facts >/dev/null

real    0m2.367s
user    0m1.746s
sys     0m0.392s

[root@]# time puppet facts >/dev/null

real    1m22.435s
user    0m1.735s
sys     0m0.428s


Additional info:

See https://bugzilla.redhat.com/show_bug.cgi?id=1916404

This was fixed in https://bugs.ruby-lang.org/issues/16439

Comment 1 Vít Ondruch 2021-04-09 08:30:17 UTC
@Grzegorz Thank you for reporting the issue. Just for clarification, there is Ruby 2.5 mentioned, but I assume, the issue exists in every version up until Ruby 3.0. Is that correct? If yes, then:

1) We should ask upstream to backport the fix. While Ruby 2.5 is upstream EOL and Ruby 2.6 is in security fix only mode, this should still be relevant for Ruby 2.7
2) We should consider, where to apply the fix. Of course it would be ideal to fix in every version of Ruby we have available in RHEL. But if that was not possible for whatever reason, would it help to fix this in just e.g. Ruby 2.7?

Comment 2 Vít Ondruch 2021-04-16 14:27:05 UTC
Reproducer:

~~~
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]

$ tail -4 /etc/resolv.conf 
nameserver 127.0.00.53
nameserver 127.0.0.53
options edns0 trust-ad
search home redhat.com

$ time ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address'
127.0.0.1

real	0m5.071s
user	0m0.053s
sys	0m0.013s

$ tail -4 /etc/resolv.conf 
nameserver 127.0.0.53
nameserver 127.0.0.53
options edns0 trust-ad
search home redhat.com

$ time ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address'
127.0.0.1

real	0m0.064s
user	0m0.055s
sys	0m0.008s

==================

$ ruby -v
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]

$ tail -4 /etc/resolv.conf
nameserver 127.0.00.53
nameserver 127.0.0.53
options edns0 trust-ad
search home redhat.com

$ time ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address'
127.0.0.1

real	0m0.054s
user	0m0.044s
sys	0m0.009s

$ tail -4 /etc/resolv.conf
nameserver 127.0.0.53
nameserver 127.0.0.53
options edns0 trust-ad
search home redhat.com

$ time ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address'
127.0.0.1

real	0m0.057s
user	0m0.046s
sys	0m0.010s
~~~

Comment 4 Grzegorz Grasza 2021-04-19 07:23:19 UTC
I believe OSP16.1 is tied to the RHEL 8.2 EUS release, is it possible to make the update there?

Comment 5 Vít Ondruch 2021-04-19 13:14:49 UTC
(In reply to Grzegorz Grasza from comment #4)
> I believe OSP16.1 is tied to the RHEL 8.2 EUS release, is it possible to
> make the update there?

In what version of Ruby. I am asking because it is certainly not possible for Ruby 2.7, because Ruby 2.7 was not available in RHEL 8.2.

Comment 8 Vít Ondruch 2021-04-23 12:45:33 UTC
(In reply to Vít Ondruch from comment #5)
> (In reply to Grzegorz Grasza from comment #4)
> > I believe OSP16.1 is tied to the RHEL 8.2 EUS release, is it possible to
> > make the update there?
> 
> In what version of Ruby. I am asking because it is certainly not possible
> for Ruby 2.7, because Ruby 2.7 was not available in RHEL 8.2.

Could you please clarify to see if we can help you?

Comment 9 Andrew Mercer 2021-04-23 16:09:54 UTC
Hello,

It looks as if RHEL 8.2 out of the box [1] ships with ruby-2.5.5-106 [2]. Please let me know if this is the information that you are looking for or if you need further information.

Thanks.

[1]

cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 (Ootpa)

[2]

dnf install ruby
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                                                                                                                                      3.7 MB/s |  26 MB     00:07    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                                                                                                                         8.6 MB/s |  29 MB     00:03    
Last metadata expiration check: 0:00:01 ago on Fri 23 Apr 2021 11:57:40 AM EDT.
Dependencies resolved.
==============================================================================================================================================================================================================================================
 Package                                              Architecture                           Version                                                                   Repository                                                        Size
==============================================================================================================================================================================================================================================
Installing:
 ruby                                                 x86_64                                 2.5.5-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  86 k
Installing dependencies:
 ruby-irb                                             noarch                                 2.5.5-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                 102 k
 ruby-libs                                            x86_64                                 2.5.5-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                 2.9 M
 rubygem-json                                         x86_64                                 2.1.0-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  90 k
 rubygem-psych                                        x86_64                                 3.0.2-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  95 k
Installing weak dependencies:
 rubygem-bigdecimal                                   x86_64                                 1.3.4-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  97 k
 rubygem-did_you_mean                                 noarch                                 1.2.0-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  81 k
 rubygem-io-console                                   x86_64                                 0.4.6-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                  66 k
 rubygem-openssl                                      x86_64                                 2.1.2-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                 189 k
 rubygem-rdoc                                         noarch                                 6.0.1-106.module+el8.3.0+7153+c6f6daa5                                    rhel-8-for-x86_64-appstream-rpms                                 486 k
 rubygems                                             noarch                                 2.7.6.2-106.module+el8.3.0+7153+c6f6daa5                                  rhel-8-for-x86_64-appstream-rpms                                 308 k
Enabling module streams:
 ruby                                                                                        2.5                                                                                                                                             

Transaction Summary
==============================================================================================================================================================================================================================================

Comment 10 Grzegorz Grasza 2021-05-25 07:44:14 UTC
Ok, so this means that we are not able to fix it in RHEL 8.2?

Comment 11 Grzegorz Grasza 2021-05-25 07:49:07 UTC
Oh, I just saw https://bugzilla.redhat.com/show_bug.cgi?id=1950332

Comment 13 Jan Houska 2021-07-29 11:00:05 UTC
VERIFIED


Current latest nightly compose 
(http://download.eng.brq.redhat.com/rhel-8/nightly/RHEL-8/RHEL-8.5.0-20210729.n.0/compose/AppStream/x86_64/os/Packages/ruby-2.7.4-137.module+el8.4.0+12025+f744ca41.x86_64.rpm)
contains package with fixed version. 


Test Passed (1minutetip)
version:
ruby-2.7.4-137.module+el8.4.0+12025+f744ca41.x86_64




::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 06:57:08 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-6YlsjnV/backup' as backup destination
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl start named.service
:: [ 06:57:08 ] :: [   LOG    ] :: rlServiceStart: Service named started successfully
:: [ 06:57:08 ] :: [  BEGIN   ] :: Run reproducer :: actually running 'timeout 3 ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address' 2>&1 | tee output.txt'
127.0.0.1
:: [ 06:57:08 ] :: [   PASS   ] :: Run reproducer (Expected 0, got 0)
:: [ 06:57:08 ] :: [   PASS   ] :: File 'output.txt' should contain '127.0.0.1' 
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl stop named.service
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   RESULT: PASS (Test)


Note You need to log in before you can comment on or make changes to this bug.