From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.141.15 with SMTP id o15cs134843rvd; Mon, 25 Jan 2010 19:53:16 -0800 (PST) Received-SPF: pass (google.com: domain of 3KmdeSwgJCjsqebprkkvdjXfi.ZljoXZh-absbidlldibdolrmp.Zlj@groups.bounces.google.com designates 10.100.238.2 as permitted sender) client-ip=10.100.238.2; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3KmdeSwgJCjsqebprkkvdjXfi.ZljoXZh-absbidlldibdolrmp.Zlj@groups.bounces.google.com designates 10.100.238.2 as permitted sender) smtp.mail=3KmdeSwgJCjsqebprkkvdjXfi.ZljoXZh-absbidlldibdolrmp.Zlj@groups.bounces.google.com; dkim=pass header.i=3KmdeSwgJCjsqebprkkvdjXfi.ZljoXZh-absbidlldibdolrmp.Zlj@groups.bounces.google.com Received: from mr.google.com ([10.100.238.2]) by 10.100.238.2 with SMTP id l2mr10094742anh.1.1264477995605 (num_hops = 1); Mon, 25 Jan 2010 19:53:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:mime-version:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-original-authentication-results:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:x-thread-url:x-message-url:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; bh=6RAKq3PVnbKUApsWWE8c0pGg4t2UOT/H1Jfz7myT5E4=; b=ACZ3jLcN6gyFa54wva+QcwI6v08997xGfoCTb8KzjrS8YXEa21BctY2nlAqKFSJkbR ATCU1agbjGor7pjYyaGf5tvSfdcoxw8xXTfi9Dj8ayK+5VNaulKZ5oL3rQOCZaEmT3fb fcQqTXpiI5g5u2x6qD7SkKzpfairjjsHIDSOE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:in-reply-to:x-ip :references:user-agent:x-http-useragent:message-id:subject:from:to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; b=CSu8XSV3KvF9EZ4zo77ijYqBEW6gYtOL0/APEfRgF3dw4WsGBjAH//ClXNw05QGFm5 UySkQeqgwhehFkcv2xcSwQuK6JiIFlhc51PpvYmyYocfoa5PGDY2zyUT2yW30VGs21It 0x1gwtfkxAqV408kVO+pySXrThDWiHX5Nqyxs= Received: by 10.100.238.2 with SMTP id l2mr532253anh.1.1264477994064; Mon, 25 Jan 2010 19:53:14 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.91.11.6 with SMTP id o6ls1603626agi.3.p; Mon, 25 Jan 2010 19:53:13 -0800 (PST) Received: by 10.90.37.22 with SMTP id k22mr10311042agk.0.1264477991486; Mon, 25 Jan 2010 19:53:11 -0800 (PST) Received: by 10.90.37.22 with SMTP id k22mr10311041agk.0.1264477991444; Mon, 25 Jan 2010 19:53:11 -0800 (PST) Return-Path: Received: from mail-yx0-f156.google.com (mail-yx0-f156.google.com [209.85.210.156]) by gmr-mx.google.com with ESMTP id 18si554814ywh.9.2010.01.25.19.53.11; Mon, 25 Jan 2010 19:53:11 -0800 (PST) Received-SPF: pass (google.com: domain of thesunny@gmail.com designates 209.85.210.156 as permitted sender) client-ip=209.85.210.156; Received: by mail-yx0-f156.google.com with SMTP id 28so7468713yxe.7 for ; Mon, 25 Jan 2010 19:53:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.142.34 with SMTP id u34mr533063ann.9.1264477991396; Mon, 25 Jan 2010 19:53:11 -0800 (PST) Date: Mon, 25 Jan 2010 19:53:11 -0800 (PST) In-Reply-To: <394912b0-5545-4157-8c66-bb9643944fea@l30g2000yqb.googlegroups.com> X-IP: 69.90.45.221 References: <394912b0-5545-4157-8c66-bb9643944fea@l30g2000yqb.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Message-ID: <3156c7cf-f7bd-4384-a419-0db1a2e3f026@b2g2000yqi.googlegroups.com> Subject: Re: Threading Bug Causing Corrupted File Response From: Sunny Hirai To: Rack Development X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of thesunny@gmail.com designates 209.85.210.156 as permitted sender) smtp.mail=thesunny@gmail.com X-Original-Sender: thesunny@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/568f5045d55aa063 X-Message-Url: http://groups.google.com/group/rack-devel/msg/c53e0093c0a59bfb Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, narrowed it down a little. It only happens with Rack::Builder. Actually, the error is hard to reproduce when going directly to the web service because everything happens fast. We put in a proxy to simulate slow connections and that's what is causing the problems to show up more. Sunny On Jan 25, 7:44=A0pm, Sunny Hirai wrote: > There appears to be a threading related bug where if you try and load > the same file twice at the same time, you get an error that flashes in > Firefox before displaying the image that says: > > =A0 The image "path/to/image.png" cannot be displayed, because it > contains errors. > > Since this was working before, I'm guessing the bug was introduced in > 1.1 or at least a recent-ish release (not exactly sure when the bug > crawled in). > > Although I was using a custom file mapper, this bug still happens in > Rack's file mapper. I can replicate by doing: > > app =3D Rack::Builder.new do > =A0 run Rack::File.new( '.' ) > end > > If I hit the file twice quickly, Firefox will flash the error. It will > retry immediately so the image eventually comes up but there are twice > as many requests made. > > The bug can be replicated using both Mongrel and WEBrick. > > Sunny Hirai