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.5 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: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Truncated request bodies Date: Fri, 23 Oct 2009 09:15:58 -0700 Message-ID: <20091023161558.GA21242@dcvr.yhbt.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256315159 5170 80.91.229.12 (23 Oct 2009 16:25:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2009 16:25:59 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Oct 23 18:25:52 2009 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) 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:101 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1N1Mxa-0005F6-53 for gclrug-mongrel-unicorn@m.gmane.org; Fri, 23 Oct 2009 18:25:50 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 35B8718582AC; Fri, 23 Oct 2009 12:25:41 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id E2DB018582AC for ; Fri, 23 Oct 2009 12:15:59 -0400 (EDT) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id 137D81F78E; Fri, 23 Oct 2009 16:15:59 +0000 (UTC) Vadim Spivak wrote: > There seems to be a ruby bug in 1.8.7 on OS X that's causing request > bodies to be truncated in unicorn when they're bigger than the > MAX_BODY (backed by a temp file instead of stringio). > > Example of truncation: http://gist.github.com/211431 > > Smaller ruby bug example: http://gist.github.com/216703 Hi Vadim, What's the output of that standalone ruby example for you? Is there a bug filed with ruby-core I could look at? Also, does using f << or f.syswrite change things? f.sync = true should really make it unnecessary... f = File.open("bar", File::RDWR|File::CREAT, 0600) f.sync=true f.read # why is this here? f << "Hello" # or f.syswrite # would an explicit f.flush here work? shouldn't be needed # with f.sync = true puts "Should be 5: #{f.pos}" f.close > I couldn't reproduce this on 1.9.1 on OS X or 1.8.7 on Linux. I'll definitely need help with testing this then since I only have Linux. Which 1.8.7 patchlevel is your OS X Ruby at? Do you know if the OS X packagers apply any vendor patches on top of the stock Ruby distro that could be causing it? Are those patches downloadable anywhere? Thanks! -- Eric Wong