From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: John-Paul Bader Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: "upstream timed out" after upgrades Date: Thu, 4 Feb 2010 16:11:19 +0100 Message-ID: <40336AA2-17B7-433B-BCFA-30B172365781@h3q.com> References: <5D2B92C5-8D0A-4810-B86B-06F670C6EFDB@h3q.com> <9D7E3DD2-4CE3-45FA-8383-34E33BCDA5C4@h3q.com> <20100204101149.GA14864@dcvr.yhbt.net> <9170C06E-85E6-428A-A5E5-56AF9379AD41@h3q.com> <2F0B8521-F568-4C68-B59C-1173203CE4E3@berlin.ccc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1265296537 6923 80.91.229.12 (4 Feb 2010 15:15:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2010 15:15:37 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Thu Feb 04 16:15:34 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org In-Reply-To: <2F0B8521-F568-4C68-B59C-1173203CE4E3@berlin.ccc.de> X-Mailer: Apple Mail (2.1077) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:389 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nd3Qc-0007RL-5O for gclrug-mongrel-unicorn@m.gmane.org; Thu, 04 Feb 2010 16:15:34 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5B2EA18582F4; Thu, 4 Feb 2010 10:15:33 -0500 (EST) Received: from mail.h3q.com (mail.h3q.com [213.73.89.199]) by rubyforge.org (Postfix) with ESMTP id EAB6118582E1 for ; Thu, 4 Feb 2010 10:11:21 -0500 (EST) Received: (qmail 90085 invoked from network); 4 Feb 2010 15:11:21 -0000 Received: from mail.h3q.com (HELO mail.h3q.com) (hukl) by mail.h3q.com with AES128-SHA encrypted SMTP; 4 Feb 2010 15:11:21 -0000 To counter check I just built the latest ruby from source as well and the i= ssue 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 differe= nce in configure / build options and I checked out the revision which inclu= ded the change you suspect for causing the issue so I'm not sure if thats r= eally helping us. Curling directly unicorn works without truncation and iss= ues 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 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=E1 - 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 >>> 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 =3D errno; stmts; errno =3D saved_errno;} while (= 0) >>> + >>> VALUE rb_cIO; >>> VALUE rb_eEOFError; >>> VALUE rb_eIOError; >>> @@ -490,7 +493,7 @@ io_fwrite(str, fptr) >>> r =3D 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 =3D=3D n) return len; >>> if (0 <=3D 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