rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Sunny Hirai <thesunny@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Re: Threading Bug Causing Corrupted File Response
Date: Mon, 25 Jan 2010 20:10:47 -0800 (PST)	[thread overview]
Message-ID: <6ee512fa-1306-4e1d-85ee-e9e9e8af8e83@a6g2000yqm.googlegroups.com> (raw)
In-Reply-To: <3156c7cf-f7bd-4384-a419-0db1a2e3f026@b2g2000yqi.googlegroups.com>

Oops, sorry. It is not Builder. I can get the errors for it after all.

Sunny

On Jan 25, 7:53 pm, Sunny Hirai <thesu...@gmail.com> wrote:
> 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 pm, Sunny Hirai <thesu...@gmail.com> 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:
>
> >   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
>
>

  reply	other threads:[~2010-01-26  4:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26  3:44 Threading Bug Causing Corrupted File Response Sunny Hirai
2010-01-26  3:53 ` Sunny Hirai
2010-01-26  4:10   ` Sunny Hirai [this message]
2010-01-28  1:22     ` Sunny Hirai
2010-01-28 11:27       ` James Tucker

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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ee512fa-1306-4e1d-85ee-e9e9e8af8e83@a6g2000yqm.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /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.
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).