[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81262] [Ruby trunk Bug#13429] Net::SMTP has no read timeout when connexion over TLS
From:
shugo@...
Date:
2017-05-19 07:42:12 UTC
List:
ruby-core #81262
Issue #13429 has been updated by shugo (Shugo Maeda).
Assignee set to usa (Usaku NAKAMURA)
keysen (J辿r辿my Carlier) wrote:
> When connecting using TLS to an unresponsive SMTP server, Net::SMTP can hang until 10 minutes.
In Ruby 2.4, open_timeout affects TLS handshake.
I'm not sure whether it should be backported to 2.3.
What do you think, usa-san?
----------------------------------------
Bug #13429: Net::SMTP has no read timeout when connexion over TLS
https://bugs.ruby-lang.org/issues/13429#change-64929
* Author: keysen (J辿r辿my Carlier)
* Status: Open
* Priority: Normal
* Assignee: usa (Usaku NAKAMURA)
* Target version:
* ruby -v: 2.3.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Hello,
When connecting using TLS to an unresponsive SMTP server, Net::SMTP can hang until 10 minutes.
The issue is here, we should have a read timeout:
``` ruby
def tlsconnect(s)
verified = false
s = ssl_socket(s, @ssl_context)
logging "TLS connection started"
s.sync_close = true
s.connect
if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
s.post_connection_check(@address)
end
verified = true
s
ensure
s.close unless verified
end
```
To workaround the issue for the moment I used:
``` ruby
module Net
class SMTP
alias :original_tlsconnect :tlsconnect
def tlsconnect(s)
Timeout.timeout(@read_timeout, Net::ReadTimeout) { original_tlsconnect(s) }
end
end
end
```
Here the steps to reproduce the bug:
``` ruby
smtp = Net::SMTP.new('mail.example.com', 465)
smtp.read_timeout = 3
smtp.enable_tls
smtp.start('localhost.localdomain', 'medecins@example.com', '********') {}
```
Sorry for the credentials I can't provide this publicly, after testing with one failing server you will be able to see that the read timeout is ignored.
By failing server I mean an SMTPS server where you are able to open a connection but you can't read on the socket.
Working case:
``` ruby
smtp = Net::SMTP.new('mail.example.com', 465)
smtp.read_timeout = 3
smtp.start('localhost.localdomain', 'medecins@example.com', '********') {}
```
Without TLS it's ok!
If you have any questions, suggestions just ask, if I can help.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>