From: Andy Hauser Date: 2003-07-24T23:33:19+09:00 Subject: Re: [Ann] OpenSSL for Ruby 1.0.0 On Thu, Jul 24, 2003 at 06:41:41PM +0900, Michal Rokos wrote: > Andy Hauser : > > Is it now thread save? > > I'm asking because when i use net/imap with openssl > > it very often starves, doesn't happen without openssl. > > Do you have any code that we can test? > What platform are you using? > > I'd like to debug this. > > It's a pity that you didn't report this earlier... Indeed i just narrowed it down just before i saw the announcement. But i also thought it was a known problem: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&selm=agtvks%246cq%241%40venus.btinternet.com Thanks alot for taking interest. First i tested various combinations of: IMAP Servers: cyrus, courier, dovecot OS: FreeBSD, Linux Therefore i don't expect it to be problems of the respective implementations. Though it seems to always lockup on the same message, so make sure you use a folder with a bunch of messages. If you still can't reproduce it i can happily give you access to one of my servers. There is a chance that the problem is located in net/imap or one of its requires, but after reading the above linked message i thought i had found the source. You can test it with this: ----8<---- #!/usr/bin/env ruby18 require "net/imap" # CHANGE THIS TO YOUR ENVIROMENT password = "PASS" user = "NAME" server = "IMAPSERVER" # CHANGE THIS TO TEST true/false usessl = true certs = nil verify = false if usessl then port = "993" else port = "143" end p @imap = Net::IMAP.new(server, port, usessl, certs, verify) p @imap.authenticate('CRAM-MD5', user, password) p @imap.select("INBOX") p @imap.status("INBOX",["MESSAGES"]) parts = ["RFC822.SIZE", "INTERNALDATE"] p @imap.fetch(1..-1, parts) ---->8----