From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.141.15 with SMTP id o15cs134630rvd; Mon, 25 Jan 2010 19:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of 3F2VeSwgJCiYVJGUWPPaIOCKN.EQOTCEM-FGXGNIQQINGITQWRU.EQO@groups.bounces.google.com designates 10.150.171.6 as permitted sender) client-ip=10.150.171.6; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3F2VeSwgJCiYVJGUWPPaIOCKN.EQOTCEM-FGXGNIQQINGITQWRU.EQO@groups.bounces.google.com designates 10.150.171.6 as permitted sender) smtp.mail=3F2VeSwgJCiYVJGUWPPaIOCKN.EQOTCEM-FGXGNIQQINGITQWRU.EQO@groups.bounces.google.com; dkim=pass header.i=3F2VeSwgJCiYVJGUWPPaIOCKN.EQOTCEM-FGXGNIQQINGITQWRU.EQO@groups.bounces.google.com Received: from mr.google.com ([10.150.171.6]) by 10.150.171.6 with SMTP id t6mr3963514ybe.24.1264477464930 (num_hops = 1); Mon, 25 Jan 2010 19:44:24 -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:x-ip :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; bh=W4ZFZuJcwoatmxagSolzrSu0RPMLCi/LB34sVOctQgI=; b=yIPsf65Jh4JYYFHWkeIEKR/AdZV9Siqzk9iAhzmDRQEkyQxngN0X/p1+LTOP21BnXH Cx7GHG0XfSCtSrWUSQ+jRPC/De0Tc2LBBJSRGdXLiP73w5d6eOsqK0KkC6A2vJtXk+e+ 24YjA+8zkGIf7q9z8Eekphq0cyoHETTQrWzHk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:x-ip: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; b=WLDyCRL4dcmaX18bdFE/KyfQa2sjb2rz3YciYdgQDME6iQmSV0cNQ51tcex10U6jl4 Ze7cQ+RkwYO3v6m+bM5UG5ta2Akfy8qJ0iJhn3O3GEqKKd5L7N1g6epvOMruYwY8NcIZ UeITO4gNon1c93/fJsEPPX7J0thBPnSUZJryQ= Received: by 10.150.171.6 with SMTP id t6mr190091ybe.24.1264477463398; Mon, 25 Jan 2010 19:44:23 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.150.112.25 with SMTP id k25ls1996523ybc.3.p; Mon, 25 Jan 2010 19:44:22 -0800 (PST) Received: by 10.150.142.19 with SMTP id p19mr2292999ybd.9.1264477462278; Mon, 25 Jan 2010 19:44:22 -0800 (PST) Received: by 10.150.142.19 with SMTP id p19mr2292998ybd.9.1264477462254; Mon, 25 Jan 2010 19:44:22 -0800 (PST) Return-Path: Received: from mail-yw0-f160.google.com (mail-yw0-f160.google.com [209.85.211.160]) by gmr-mx.google.com with ESMTP id 25si538907ywh.12.2010.01.25.19.44.22; Mon, 25 Jan 2010 19:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of thesunny@gmail.com designates 209.85.211.160 as permitted sender) client-ip=209.85.211.160; Received: by mail-yw0-f160.google.com with SMTP id 32so10482955ywh.10 for ; Mon, 25 Jan 2010 19:44:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.151.94.1 with SMTP id w1mr126313ybl.6.1264477462221; Mon, 25 Jan 2010 19:44:22 -0800 (PST) Date: Mon, 25 Jan 2010 19:44:22 -0800 (PST) X-IP: 69.90.45.221 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: <394912b0-5545-4157-8c66-bb9643944fea@l30g2000yqb.googlegroups.com> Subject: 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.211.160 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/aab7c7ee8d954219 Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 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: 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 = Rack::Builder.new do 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