<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext, branch v3_4_3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix crash in TCPSocket.open</title>
<updated>2025-04-09T23:02:37+00:00</updated>
<author>
<name>Luke Jahnke</name>
<email>luke.jahnke@gmail.com</email>
</author>
<published>2025-03-14T13:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7e093fb43a692935823de1bb32ac4f05e46329bb'/>
<id>7e093fb43a692935823de1bb32ac4f05e46329bb</id>
<content type='text'>
Fix segfault crash observable with TCPSocket.open(nil, nil)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix segfault crash observable with TCPSocket.open(nil, nil)
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve backtrace of errors raised by `Socket.tcp_with_fast_fallback`</title>
<updated>2025-04-02T16:16:27+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-04-02T10:08:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e3fc29a9b7fd7869723d2e13185c1387c6d026db'/>
<id>e3fc29a9b7fd7869723d2e13185c1387c6d026db</id>
<content type='text'>
[Bug #21211]

Socket errors raised from background threads are hard to track down because
their backtrace starts from the spawned thread.

To solve this we can raise a new error with the old one as `cause`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21211]

Socket errors raised from background threads are hard to track down because
their backtrace starts from the spawned thread.

To solve this we can raise a new error with the old one as `cause`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix `Socket.tcp_with_fast_fallback` to be usable from a Ractor</title>
<updated>2025-03-11T16:16:22+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-03-10T20:18:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e416faf450159a989fba87b41f3e3874a4af129'/>
<id>0e416faf450159a989fba87b41f3e3874a4af129</id>
<content type='text'>
[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'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[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'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 1683dadb19876f0a64589bdbbcf6fff8143f78ff: [Backport #21088]</title>
<updated>2025-02-14T05:13:47+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-02-14T05:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=319c3c70385a63aaea3c1a68a79c70cfd533c6b6'/>
<id>319c3c70385a63aaea3c1a68a79c70cfd533c6b6</id>
<content type='text'>
	Do not save ResolutionError if resolution succeeds for any address family (#12678)

	* Do not save ResolutionError if resolution succeeds for any address family

	Socket with Happy Eyeballs Version 2 performs connection attempts and name resolution in parallel.

	In the existing implementation, if a connection attempt failed for one address family while name resolution was still in progress for the other, and that name resolution later failed, the method would terminate with a name resolution error.
	This behavior was intended to ensure that the final error reflected the most recent failure, potentially overriding an earlier error.

	However, [Bug #21088](https://bugs.ruby-lang.org/issues/21088) made me realize that terminating with a name resolution error is unnatural when name resolution succeeded for at least one address family.

	This PR modifies the behavior so that if name resolution succeeds for one address family, any name resolution error from the other is not saved.

	This PR includes the following changes:

	* Do not display select(2) as the system call that caused the raised error, as it is for internal processing

	* Fix bug: Get errno with Socket::SO_ERROR in Windows environment with a workaround for tests not passing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Do not save ResolutionError if resolution succeeds for any address family (#12678)

	* Do not save ResolutionError if resolution succeeds for any address family

	Socket with Happy Eyeballs Version 2 performs connection attempts and name resolution in parallel.

	In the existing implementation, if a connection attempt failed for one address family while name resolution was still in progress for the other, and that name resolution later failed, the method would terminate with a name resolution error.
	This behavior was intended to ensure that the final error reflected the most recent failure, potentially overriding an earlier error.

	However, [Bug #21088](https://bugs.ruby-lang.org/issues/21088) made me realize that terminating with a name resolution error is unnatural when name resolution succeeded for at least one address family.

	This PR modifies the behavior so that if name resolution succeeds for one address family, any name resolution error from the other is not saved.

	This PR includes the following changes:

	* Do not display select(2) as the system call that caused the raised error, as it is for internal processing

	* Fix bug: Get errno with Socket::SO_ERROR in Windows environment with a workaround for tests not passing
</pre>
</div>
</content>
</entry>
<entry>
<title>merge revision(s) 2b6fc9ea7212543a1be26768403f59c7a759b5ea: [Backport #21092]</title>
<updated>2025-02-14T05:11:06+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2025-02-14T05:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2ee25f7b47a30b7515cdb4da341d28931d8b5810'/>
<id>2ee25f7b47a30b7515cdb4da341d28931d8b5810</id>
<content type='text'>
	[Bug #21092] Fallback variables after execonf has done

	When reading from a dummy makefile, the global variables initialized
	in `init_mkmf` may not be overridden.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	[Bug #21092] Fallback variables after execonf has done

	When reading from a dummy makefile, the global variables initialized
	in `init_mkmf` may not be overridden.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Monitor</title>
<updated>2024-12-25T04:16:14+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-25T04:16:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2acbf45d368e03f8a38906676b2e3e63f299c67d'/>
<id>2acbf45d368e03f8a38906676b2e3e63f299c67d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Stop document Ripper::Lexer</title>
<updated>2024-12-25T04:07:22+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-25T04:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=871124c3ea9ccdc0e53efac73369786b494f6f96'/>
<id>871124c3ea9ccdc0e53efac73369786b494f6f96</id>
<content type='text'>
`:nodoc:` seems not working for inner classes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`:nodoc:` seems not working for inner classes.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Monitor</title>
<updated>2024-12-25T01:30:40+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-12-25T01:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e46314edd11d6807b603498150e0785c87d5d3a5'/>
<id>e46314edd11d6807b603498150e0785c87d5d3a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a timeout to prevent `rb_thread_fd_select` from hanging with write(2) failure (#12457)</title>
<updated>2024-12-24T18:06:02+00:00</updated>
<author>
<name>Misaki Shioi</name>
<email>31817032+shioimm@users.noreply.github.com</email>
</author>
<published>2024-12-24T18:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3be1baab82d8627ce52391030160bcbca69db01d'/>
<id>3be1baab82d8627ce52391030160bcbca69db01d</id>
<content type='text'>
Rarely, there are cases where a write(2) call from a child thread
to notify the main thread of the completion of name resolution fails.
If this happens while the main thread is waiting in `rb_thread_fd_select`,
rb_thread_fd_select may not notice that the name resolution has completed and end up hanging.

This issue becomes a problem when there are no sockets currently being connected,
no addresses ready for immediate connection attempts,
and name resolution has already completed for one address family
while the main thread is waiting for the name resolution of the other address family.
(If name resolution is not completed for either address family,
the chances of write(2) failing in both child threads are likely low.)

To avoid this issue, a timeout is introduced to rb_thread_fd_select under the above conditions.
This way, even if the issue occurs,
the completion of name resolution should still be detected
in the subsequent `if (!resolution_store.is_all_finished) ...` block.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rarely, there are cases where a write(2) call from a child thread
to notify the main thread of the completion of name resolution fails.
If this happens while the main thread is waiting in `rb_thread_fd_select`,
rb_thread_fd_select may not notice that the name resolution has completed and end up hanging.

This issue becomes a problem when there are no sockets currently being connected,
no addresses ready for immediate connection attempts,
and name resolution has already completed for one address family
while the main thread is waiting for the name resolution of the other address family.
(If name resolution is not completed for either address family,
the chances of write(2) failing in both child threads are likely low.)

To avoid this issue, a timeout is introduced to rb_thread_fd_select under the above conditions.
This way, even if the issue occurs,
the completion of name resolution should still be detected
in the subsequent `if (!resolution_store.is_all_finished) ...` block.</pre>
</div>
</content>
</entry>
<entry>
<title>Improve doc for `Socket::ResolutionError` (#12434)</title>
<updated>2024-12-23T06:05:00+00:00</updated>
<author>
<name>Misaki Shioi</name>
<email>31817032+shioimm@users.noreply.github.com</email>
</author>
<published>2024-12-23T06:05:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=34e6bb48af2814eefd91968c58c1dede3b56f30e'/>
<id>34e6bb48af2814eefd91968c58c1dede3b56f30e</id>
<content type='text'>
Also, a topic about Socket::ResolutionError is added to NEWS</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, a topic about Socket::ResolutionError is added to NEWS</pre>
</div>
</content>
</entry>
</feed>
