From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: "upstream timed out" after upgrades
Date: Thu, 4 Feb 2010 02:11:49 -0800 [thread overview]
Message-ID: <20100204101149.GA14864@dcvr.yhbt.net> (raw)
In-Reply-To: <9D7E3DD2-4CE3-45FA-8383-34E33BCDA5C4@h3q.com>
John-Paul Bader <hukl@h3q.com> wrote:
> One more,
Hi,
About the exceptions, looks like you had '-d' (debug) instead of '-D'
(daemonize) so it spewed every exception (even if trapped) to stderr.
EAGAIN is common when dealing with non-blocking sockets. Most of that
is noise...
However the EINVAL in unicorn/http_response.rb is suspect.
> I reproduced the upgrading on my staging server which was still at the
> old state in terms of software. I started by upgrading ruby from
>
> ruby+nopthreads-1.8.7.160_5,1 -> ruby+nopthreads-1.8.7.248,1
> ruby18-iconv-1.8.7.160,1 -> ruby18-iconv-1.8.7.248,1
>
> And voilá - the very same problems. So now I'm like what?
>
> Is this rather a ruby than a unicorn issue ? Couldn't find any clues
> in the changelog so far:
> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/tags/v1_8_7_248/ChangeLog
That should narrow it down, so I start reading diffs from
v1_8_7_160..v1_8_7_248 ...
Does backporting the following change in ruby_1_8
(but not yet in the ruby_1_8_7 branch) fix things for you?
commit 841a57341ed43f5fa86489c12aceb25a232be820
Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri Jan 8 09:51:23 2010 +0000
* io.c (io_fwrite): preserve errno. [ruby-core:27425]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@26253
(snipped)
diff --git a/io.c b/io.c
index 375cbc8..d4d28e5 100644
--- a/io.c
+++ b/io.c
@@ -122,6 +122,9 @@ extern void Init_File _((void));
# endif
#endif
+#define preserving_errno(stmts) \
+ do {int saved_errno = errno; stmts; errno = saved_errno;} while (0)
+
VALUE rb_cIO;
VALUE rb_eEOFError;
VALUE rb_eIOError;
@@ -490,7 +493,7 @@ io_fwrite(str, fptr)
r = write(fileno(f), RSTRING(str)->ptr+offset, l);
TRAP_END;
#if BSD_STDIO
- fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET);
+ preserving_errno(fseeko(f, lseek(fileno(f), (off_t)0, SEEK_CUR), SEEK_SET));
#endif
if (r == n) return len;
if (0 <= r) {
---
Of course, the original reason for this fseeko() was to fix another
problem Unicorn exposed when mixing stdio + unistd calls...
http://redmine.ruby-lang.org/issues/show/2267
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2010-02-04 10:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 8:16 "upstream timed out" after upgrades John-Paul Bader
2010-02-04 8:48 ` John-Paul Bader
2010-02-04 9:28 ` John-Paul Bader
2010-02-04 10:11 ` Eric Wong [this message]
2010-02-04 12:26 ` John-Paul Bader
2010-02-04 14:22 ` John-Paul Bader
2010-02-04 15:11 ` John-Paul Bader
2010-02-04 19:42 ` Eric Wong
2010-02-04 20:01 ` John-Paul Bader
2010-02-04 20:14 ` Eric Wong
2010-02-04 20:23 ` John-Paul Bader
2010-02-04 20:48 ` John-Paul Bader
2010-02-04 21:05 ` John-Paul Bader
2010-02-04 21:25 ` Eric Wong
2010-02-04 21:56 ` John-Paul Bader
2010-02-04 21:27 ` Eric Wong
2010-02-04 20:27 ` John-Paul Bader
2010-02-04 21:52 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100204101149.GA14864@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).