Still having problems with SMTP send - help!

I’m periodically getting these [BUG] errors (not catchable) and I never
received a reply to my last post.
Is this a known problem, and is there a fix available?
This is with 1.7.2 on W2k (WindowsInstaller build)

Failed: Bad file descriptor
ERROR P4NotifyD: Caught Errno::EBADF: Bad file descriptor
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:in sysread' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:inrbuf_fill’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:477:in readuntil' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:488:inreadline’
D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:425:in read_reply' D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:403:inget_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:320:in `check_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:576: [BUG] rb_sys_fail() -
errno == 0 ruby 1.7.2 (2002-07-02) [i386-mswin32]

Patrick Bennett wrote:

I’m periodically getting these [BUG] errors (not catchable) and I never
received a reply to my last post.
Is this a known problem, and is there a fix available?
This is with 1.7.2 on W2k (WindowsInstaller build)

Failed: Bad file descriptor
ERROR P4NotifyD: Caught Errno::EBADF: Bad file descriptor
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:in sysread' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:in rbuf_fill’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:477:in readuntil' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:488:in readline’
D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:425:in read_reply' D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:403:in get_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:320:in `check_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:576: [BUG] rb_sys_fail() -
errno == 0 ruby 1.7.2 (2002-07-02) [i386-mswin32]

You are getting a the same error I was getting (checkout the thread:
don’t understand cause of `sysread’: Bad file descriptor (Errno::EBADF)).

Can you try your program out under cygwin and see if it gives out the
same error?

Rob

The Windows socket code in 1.7 aborts with [BUG] everytime winsock
sets an error or warning message. This used to raise an exception. The
problem is known, some discussion was started, but in the end I didn’t
see anybody fixing it :frowning:

It’s been a while since I posted a message via NNTP, so please tell me
if I’m doing something wrong :slight_smile:

Danny
http://froukepc.dhs.org/rudl/On Fri, 27 Sep 2002 17:08:42 GMT, Patrick

···

Bennett patrick@thebennetts.com wrote:

I’m periodically getting these [BUG] errors (not catchable) and I never
received a reply to my last post.
Is this a known problem, and is there a fix available?
This is with 1.7.2 on W2k (WindowsInstaller build)

Failed: Bad file descriptor
ERROR P4NotifyD: Caught Errno::EBADF: Bad file descriptor
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:in sysread' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:501:in rbuf_fill’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:477:in readuntil' D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:488:in readline’
D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:425:in read_reply' D:/P4Scripts/lib/ruby/1.7/net/smtp.rb:403:in get_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:320:in `check_reply’
D:/P4Scripts/lib/ruby/1.7/net/protocol.rb:576: [BUG] rb_sys_fail() -
errno == 0 ruby 1.7.2 (2002-07-02) [i386-mswin32]

Robert McGovern wrote:

You are getting a the same error I was getting (checkout the thread:
don’t understand cause of `sysread’: Bad file descriptor (Errno::EBADF)).

Can you try your program out under cygwin and see if it gives out the
same error?

Perhaps this is a stupid question, but how do I go about doing that?
Do you mean a cygwin-compiled version of Ruby (for windows) ? Where do
I get it?

Danny van Bruggen wrote:

The Windows socket code in 1.7 aborts with [BUG] everytime winsock
sets an error or warning message. This used to raise an exception. The
problem is known, some discussion was started, but in the end I didn’t
see anybody fixing it :frowning:

Man, that needs changed quickly! It needs to raise an exception, not an
uncatchable ‘BUG’ abort.
I’ve got a script that’s supposed to be 24x7 that’s randomly dying
because of this. :<

It’s been a while since I posted a message via NNTP, so please tell me
if I’m doing something wrong :slight_smile:

Nope - all is well. :>

Perhaps this is a stupid question, but how do I go about doing that?
Do you mean a cygwin-compiled version of Ruby (for windows) ? Where do
I get it?

You have to roll your own I believe.

If you haven’t installed Cygwin, goto www.cygwin.com and download the
setup program.

Once you’ve downloaded that, run the setup program (telling your
firewall to allow it to connect to the internet if need be)

Select Next.

Select Install from the internet if you have a fast connection, or
select download from the net. (I shall carry on assuming you have chosen
install from the net).

Select Next.

Enter the location of where you wish to install Cygwin.
Select install for Just me.
Select Default Text style type Unix.

Select Next.

Enter a directory the download files & information will be saved to.

Select Next

Enter the details needed for allowing the program to connect to the net
(I only need Direct Connection)

Select Next.

It then downloads a list of mirror sites, where the packages can be
downloaded from. Choose one that is “closest” to you.

Select Next.

It then downloads a list of available packages and displays an overview
page of the packages currently installed.

Select View to change from Category to Full.

I believe at this point it will have selected a minimum amount of
packages that you need. Make sure that gcc is among them.

Select Install.

Wait for a while, have a cup of tea or something :slight_smile:

When its finished a dialog will appear asking if you want to put a
shortcut on the desktop and an entry in the start menu.

Select Finish.

It then performs some post install stuff, at the end of which a dialog
appears saying “Installation Complete”.

Congratulate yourself :slight_smile:

Right now, download the stable snapshot of Ruby from

ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz

Save it to :<location of cygwin>\home<username>

Double click on the Cygwin shortcut on your desktop. A terminal window
now opens.

Type “ls” and press return to get a directory listing. Check the ruby
snapshot is there.

Type “tar zxf stable-snapshot.tar.gz” and press return to unpack the
stable snapshot. This unpacks into the directory ruby

Type “cd ruby” and return to go into the directory just created.

Type “./configure” and return, it will now autoconfigure the Makefile
and what not for the build process. It will take a few minutes depending
on the speed of your machine.

At the end of that simple type “make” and press return. This will now
build ruby and will take a while. Go take a break, feed the cat, play a
game, kiss the wife, something.

When that is complete type “make test” and press return. If everything
went okat you should see a message saying OK

Next type “make install” and press return. This simply installs the
program into “/usr/local/bin/” & “/usr/local/lib”

Type “cd …” and press return to leave the build directory.

Type “ruby -v” and press return,check that the version number is 1.6.7 &
the date is something like 2002-09-25.

You now need to install any packages you are using. I can’t really help
you with that, other than unpack the pacakges to you /home/
directory and anything that uses the ruby installer should install as
normal.

If you aren’t using any custom packages or anything. I think the easiest
thing you could do would be to copy your scripts into your
/home/ area and run it from there.

I hope that helps, if anyone has any corrections please do correct it!

rob