unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: John-Paul Bader <hukl@h3q.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: "upstream timed out" after upgrades
Date: Thu, 4 Feb 2010 16:11:19 +0100	[thread overview]
Message-ID: <40336AA2-17B7-433B-BCFA-30B172365781@h3q.com> (raw)
In-Reply-To: <2F0B8521-F568-4C68-B59C-1173203CE4E3@berlin.ccc.de>

To counter check I just built the latest ruby from source as well and the issue reappeared - so it happened between 26253 and tag/248

Kind regards, John

On 04.02.2010, at 15:22, John-Paul Bader wrote:

> Hey,
> 
> i checked out the revision 26253 built it and ran it and it seems to work again but: I didn't build it via FreeBSD ports so there might be a difference in configure / build options and I checked out the revision which included the change you suspect for causing the issue so I'm not sure if thats really helping us. Curling directly unicorn works without truncation and issues though.
> 
> Kind regards, John
> 
> On 04.02.2010, at 13:26, John-Paul Bader wrote:
> 
>> Hey again,
>> 
>> I will try to compile build the svn revision and let you know. I have to do some other work before that so I will report back in the evening (CEST / BERLIN) 
>> 
>> Thank you for helping out, kind regards,
>> 
>> John
>> 
>> On 04.02.2010, at 11:11, Eric Wong wrote:
>> 
>>> 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
>>> 
>> 
>> _______________________________________________
>> 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
>> 
> 
> _______________________________________________
> 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
> 

_______________________________________________
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


  reply	other threads:[~2010-02-04 15:15 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
2010-02-04 12:26       ` John-Paul Bader
2010-02-04 14:22         ` John-Paul Bader
2010-02-04 15:11           ` John-Paul Bader [this message]
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=40336AA2-17B7-433B-BCFA-30B172365781@h3q.com \
    --to=hukl@h3q.com \
    --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).