ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly
@ 2024-01-09 22:56 mwaldvogel (Michael Waldvogel) via ruby-core
  2024-01-10  3:24 ` [ruby-core:116132] " mame (Yusuke Endoh) via ruby-core
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mwaldvogel (Michael Waldvogel) via ruby-core @ 2024-01-09 22:56 UTC (permalink / raw
  To: ruby-core; +Cc: mwaldvogel (Michael Waldvogel)

Issue #20172 has been reported by mwaldvogel (Michael Waldvogel).

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116132] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
@ 2024-01-10  3:24 ` mame (Yusuke Endoh) via ruby-core
  2024-01-10  3:46 ` [ruby-core:116133] " mame (Yusuke Endoh) via ruby-core
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-01-10  3:24 UTC (permalink / raw
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #20172 has been updated by mame (Yusuke Endoh).


Yeah, it is probably due to the change of #19965. I cannot debug it soon because I don't have a gentoo environment. I suspect `pthread_create` is somehow failing. Does `10000.times { Thread.new {}.join }` work successfully on your machine?

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106138

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116133] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
  2024-01-10  3:24 ` [ruby-core:116132] " mame (Yusuke Endoh) via ruby-core
@ 2024-01-10  3:46 ` mame (Yusuke Endoh) via ruby-core
  2024-01-10  8:43 ` [ruby-core:116135] " mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-01-10  3:46 UTC (permalink / raw
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #20172 has been updated by mame (Yusuke Endoh).


Incidentally, our Arch Linux CI also uses glibc 2.38, and it is working fine. So I guess either that it is a Gentoo-specific problem, or that your machine is so heavily loaded that it cannot `pthread_create`.

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106139

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116135] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
  2024-01-10  3:24 ` [ruby-core:116132] " mame (Yusuke Endoh) via ruby-core
  2024-01-10  3:46 ` [ruby-core:116133] " mame (Yusuke Endoh) via ruby-core
@ 2024-01-10  8:43 ` mwaldvogel (Michael Waldvogel) via ruby-core
  2024-01-10  9:50 ` [ruby-core:116139] " mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwaldvogel (Michael Waldvogel) via ruby-core @ 2024-01-10  8:43 UTC (permalink / raw
  To: ruby-core; +Cc: mwaldvogel (Michael Waldvogel)

Issue #20172 has been updated by mwaldvogel (Michael Waldvogel).


We can at least exclude that it is due to heavy load. I will provide you access to one of the vms by tomorrow. That way it should be easier to analyze.

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106141

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116139] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (2 preceding siblings ...)
  2024-01-10  8:43 ` [ruby-core:116135] " mwaldvogel (Michael Waldvogel) via ruby-core
@ 2024-01-10  9:50 ` mwaldvogel (Michael Waldvogel) via ruby-core
  2024-01-11  2:17 ` [ruby-core:116166] " mame (Yusuke Endoh) via ruby-core
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mwaldvogel (Michael Waldvogel) via ruby-core @ 2024-01-10  9:50 UTC (permalink / raw
  To: ruby-core; +Cc: mwaldvogel (Michael Waldvogel)

Issue #20172 has been updated by mwaldvogel (Michael Waldvogel).


mame (Yusuke Endoh) wrote in #note-2:
> Yeah, it is probably due to the change of #19965. I cannot debug it soon because I don't have a gentoo environment. I suspect `pthread_create` is somehow failing. Does `10000.times { Thread.new {}.join }` work successfully on your machine?

Yes, `10000.times { Thread.new {}.join }` works without any problems.

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106145

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116166] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (3 preceding siblings ...)
  2024-01-10  9:50 ` [ruby-core:116139] " mwaldvogel (Michael Waldvogel) via ruby-core
@ 2024-01-11  2:17 ` mame (Yusuke Endoh) via ruby-core
  2024-02-02  1:50 ` [ruby-core:116551] " naruse (Yui NARUSE) via ruby-core
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2024-01-11  2:17 UTC (permalink / raw
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #20172 has been updated by mame (Yusuke Endoh).


I investigated the issue by using the VM access Michael gave me. (Thank you!) And I understand the issue.

It looks like `sched_getcpu(3)` returns an unexpected number in the environment. Since the number of CPUs in the VM is 2, I expect it to return 0 or 1. However, it actually returns 0 or *123*. This makes `pthread_create` fail with EINVAL because of a wrong affinity configuration.

TBH, I don't know why `sched_getcpu(3)` returns a strange value, but I guess it may depend on the configuration of the virtual environment.

I decided to remove the setaffinity mechanism and confirmed that it solves the issue: https://github.com/ruby/ruby/pull/9479
I introduced the mechanism to reduce the overhead of thread context switch, but a quick benchmark showed that removing it didn't seem to degrade the performance. So I'd like to simply delete the troublesome code.

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106174

* Author: mwaldvogel (Michael Waldvogel)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116551] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (4 preceding siblings ...)
  2024-01-11  2:17 ` [ruby-core:116166] " mame (Yusuke Endoh) via ruby-core
@ 2024-02-02  1:50 ` naruse (Yui NARUSE) via ruby-core
  2024-02-02 10:25 ` [ruby-core:116557] " ioquatix (Samuel Williams) via ruby-core
  2024-02-04  5:36 ` [ruby-core:116572] " naruse (Yui NARUSE) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: naruse (Yui NARUSE) via ruby-core @ 2024-02-02  1:50 UTC (permalink / raw
  To: ruby-core; +Cc: naruse (Yui NARUSE)

Issue #20172 has been updated by naruse (Yui NARUSE).


Merging into 3.3 is pending
https://github.com/ruby/ruby/pull/9798

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106569

* Author: mwaldvogel (Michael Waldvogel)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116557] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (5 preceding siblings ...)
  2024-02-02  1:50 ` [ruby-core:116551] " naruse (Yui NARUSE) via ruby-core
@ 2024-02-02 10:25 ` ioquatix (Samuel Williams) via ruby-core
  2024-02-04  5:36 ` [ruby-core:116572] " naruse (Yui NARUSE) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: ioquatix (Samuel Williams) via ruby-core @ 2024-02-02 10:25 UTC (permalink / raw
  To: ruby-core; +Cc: ioquatix (Samuel Williams)

Issue #20172 has been updated by ioquatix (Samuel Williams).


For reference, I had a user report a similar issue due to `Addrinfo#ip_address`: https://github.com/socketry/falcon/issues/217

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106574

* Author: mwaldvogel (Michael Waldvogel)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:116572] [Ruby master Bug#20172] Socket.addrinfo failing randomly
  2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
                   ` (6 preceding siblings ...)
  2024-02-02 10:25 ` [ruby-core:116557] " ioquatix (Samuel Williams) via ruby-core
@ 2024-02-04  5:36 ` naruse (Yui NARUSE) via ruby-core
  7 siblings, 0 replies; 9+ messages in thread
From: naruse (Yui NARUSE) via ruby-core @ 2024-02-04  5:36 UTC (permalink / raw
  To: ruby-core; +Cc: naruse (Yui NARUSE)

Issue #20172 has been updated by naruse (Yui NARUSE).

Backport changed from 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED to 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE

ruby_3_3 53d4e9c4bbba077a569549a01a8263e5e8f59ee8 merged revision(s) 1bd98c820da46a05328d2d53b8f748f28e7ee8f7.

----------------------------------------
Bug #20172: Socket.addrinfo failing randomly
https://bugs.ruby-lang.org/issues/20172#change-106588

* Author: mwaldvogel (Michael Waldvogel)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE
----------------------------------------
I've recently updated one of my linux systems (Gentoo) to glibc 2.38 (that was the only change). After the update most of the time the below error happens. Among other things this breaks rubygems for me. I've reinstalled ruby 3.2.2 with rvm and didn't encounter the issue. The issue however remained even after reinstalling ruby 3.3.0 and even with ruby master. Since this goes back to getaddrinfo (which is working without any issues outside of ruby) and there seems to be only one bigger change to stdlib socket, I'm assuming the problem was introduced with https://bugs.ruby-lang.org/issues/19965

```
3.3.0 :001 > require 'socket'
 => true
3.3.0 :002 > Socket.getaddrinfo('rubygems.org', 443)
(irb):2:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):2:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :003 > Socket.getaddrinfo('rubygems.org', 443)
(irb):3:in `getaddrinfo': getaddrinfo: Temporary failure in name resolution (Socket::ResolutionError)
        from (irb):3:in `<main>'
        from <internal:kernel>:187:in `loop'
        from /usr/local/rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
        from /usr/local/rvm/rubies/ruby-3.3.0/bin/irb:25:in `<main>'
3.3.0 :004 > Socket.getaddrinfo('rubygems.org', 443)
 =>
[["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 1, 6],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 2, 17],
 ["AF_INET", 443, "151.101.193.227", "151.101.193.227", 2, 3, 0],
...
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 1, 6],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 2, 17],
 ["AF_INET6", 443, "2a04:4e42::483", "2a04:4e42::483", 10, 3, 0]]
3.3.0 :005 >
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-04  5:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-09 22:56 [ruby-core:116129] [Ruby master Bug#20172] Socket.addrinfo failing randomly mwaldvogel (Michael Waldvogel) via ruby-core
2024-01-10  3:24 ` [ruby-core:116132] " mame (Yusuke Endoh) via ruby-core
2024-01-10  3:46 ` [ruby-core:116133] " mame (Yusuke Endoh) via ruby-core
2024-01-10  8:43 ` [ruby-core:116135] " mwaldvogel (Michael Waldvogel) via ruby-core
2024-01-10  9:50 ` [ruby-core:116139] " mwaldvogel (Michael Waldvogel) via ruby-core
2024-01-11  2:17 ` [ruby-core:116166] " mame (Yusuke Endoh) via ruby-core
2024-02-02  1:50 ` [ruby-core:116551] " naruse (Yui NARUSE) via ruby-core
2024-02-02 10:25 ` [ruby-core:116557] " ioquatix (Samuel Williams) via ruby-core
2024-02-04  5:36 ` [ruby-core:116572] " naruse (Yui NARUSE) via ruby-core

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).