Project

General

Profile

Actions

Bug #21179

closed

Introduction Happy Eyeballs Version 2 broke `Socket.tcp` from secondary Ractors

Bug #21179: Introduction Happy Eyeballs Version 2 broke `Socket.tcp` from secondary Ractors

Added by byroot (Jean Boussier) 8 months ago. Updated 8 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:121278]

Description

require "socket"

Ractor.new do
  Socket.tcp("example.com", 80)
end.take
socket.rb:1046:in 'Socket::HostnameResolutionStore#get_addrinfo': can not access non-shareable objects in constant
Socket::HostnameResolutionStore::PRIORITY_ON_V6 by non-main ractor. (Ractor::IsolationError)
	from socket.rb:724:in 'block in Socket.tcp_with_fast_fallback'
	from socket.rb:720:in 'Socket.tcp_with_fast_fallback'

Proposed patch: https://github.com/ruby/ruby/pull/12896


Related issues 2 (0 open2 closed)

Related to Ruby - Feature #20935: API for Globally Enabling/Disabling Happy Eyeballs Version 2 in the Socket ClassClosedActions
Has duplicate Ruby - Bug #21178: Socket fails in RactorClosedActions

Updated by byroot (Jean Boussier) 8 months ago Actions #1

  • Related to Feature #20935: API for Globally Enabling/Disabling Happy Eyeballs Version 2 in the Socket Class added

Updated by byroot (Jean Boussier) 8 months ago Actions #2

  • Has duplicate Bug #21178: Socket fails in Ractor added

Updated by byroot (Jean Boussier) 8 months ago Actions #3

  • Status changed from Open to Closed

Applied in changeset git|ba5fb74583303d9e80f3700d0b5433cbc7e7c88e.


Fix Socket.tcp_with_fast_fallback to be usable from a Ractor

[Bug #21179]

socket.rb:1046:in 'Socket::HostnameResolutionStore#get_addrinfo': can not access non-shareable objects in constant
Socket::HostnameResolutionStore::PRIORITY_ON_V6 by non-main ractor. (Ractor::IsolationError)
        from socket.rb:724:in 'block in Socket.tcp_with_fast_fallback'
        from socket.rb:720:in 'Socket.tcp_with_fast_fallback'

Updated by tenderlovemaking (Aaron Patterson) 8 months ago Actions #4 [ruby-core:121408]

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

Backported in 0e416faf450159a989fba87b41f3e3874a4af129

Actions

Also available in: PDF Atom