[#78633] ruby/spec needs help from CRuby committers — Benoit Daloze <eregontp@...>
Currently, ruby/spec is maintained mostly by individuals and enjoys the
13 messages
2016/12/13
[#78963] Re: ruby/spec needs help from CRuby committers
— Urabe Shyouhei <shyouhei@...>
2017/01/04
I did ask attendees of last developer meeting to join this
[#78642] Re: ruby/spec needs help from CRuby committers
— Eric Wong <normalperson@...>
2016/12/14
Benoit Daloze <eregontp@gmail.com> wrote:
[ruby-core:78764] [Ruby trunk Bug#13018] end of file reached (EOFError) from SMTP
From:
shugo@...
Date:
2016-12-21 07:16:54 UTC
List:
ruby-core #78764
Issue #13018 has been updated by Shugo Maeda.
Assignee changed from Shugo Maeda to Eric Wong
Toby Murray wrote:
> Yields `end of file reached (EOFError)`. From the discussion there, it seems like the SMTP relay is inappropriately killing the session, but I believe it should be wrapped in a different error - e.g. Net:SMTPError. As it stands, there's no stack trace available or this error, so it just appears and is difficult to find.
The reason why no stack trace is available is the following code introduced by r50219:
# callers do not care about backtrace, so avoid allocating for it
raise EOFError, 'end of file reached', []
Eric, is it intentional that stack trace is lost in this case?
Speaking of Net::SMTP, EOFError is raised in do_finish, so it may be better to ignore.
However, it's too late to change the behavior in Ruby 2.4.0, I think.
----------------------------------------
Bug #13018: end of file reached (EOFError) from SMTP
https://bugs.ruby-lang.org/issues/13018#change-62165
* Author: Toby Murray
* Status: Assigned
* Priority: Normal
* Assignee: Eric Wong
* Target version:
* ruby -v: ruby 2.4.0preview3 (2016-11-07 trunk 56661) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Originally filed against Rails: https://github.com/rails/rails/issues/27298
```
require 'net/smtp'
real_email_address = '' # This needs to actually be a real account
real_email_password = '' # This needs to actually be the corresponding password
#line 96 of mail-2.2.7/lib/mail/network/delivery_methods/smtp.rb
smtp = Net::SMTP.new('smtp-relay.gmail.com', 587)
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
# smtp.set_debug_output $stderr # Uncomment this line to see SMTP session details
smtp.start('does-not-matter', real_email_address, real_email_password, 'Login') do |smtp|
smtp.sendmail('Message does not matter', 'inconsistent from address', 'does not matter')
end
```
Yields `end of file reached (EOFError)`. From the discussion there, it seems like the SMTP relay is inappropriately killing the session, but I believe it should be wrapped in a different error - e.g. Net:SMTPError. As it stands, there's no stack trace available or this error, so it just appears and is difficult to find.
Tried with 2.4.0-preview3, 2.3.3, and 2.3.1 (as well as jruby-9.1.6.0) and all had the same behavior
--
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>