users@grizzly.java.net

Re: grizzly-sendfile bugs for 1.9.5

From: Igor Minar <iiminar_at_gmail.com>
Date: Thu, 30 Apr 2009 12:23:12 -0700

Hi there,

First of all let me thank you for making it so easy to build
webservers using the grizzly embedded server. It was a breeze for me
to build a standalone grizzly-sendfile server. So thanks! :)

Now back to the business...

I still didn't progress with neither of the bugs bellow. I created
testcases using grizzly-sendfile-server and wget so that you can
easily reproduce the issues. Please let me know if the distros don't
work for you for some reason.

The only files that I changed in these two distros were SendfileFilter
and the main pom (336 builds against 1.9.15-SNAPSHOT).

I'm going to play with the grizzly code to see if I can find a fix for
the issue, but I'd appreciate if you had a look too and/or provided me
with some guidance.


Bug 336
-------

src: http://dl.getdropbox.com/u/838370/grizzly/grizzly-sendfile-bug336-src.tgz
jar: http://dl.getdropbox.com/u/838370/grizzly/grizzly-sendfile-server-0.3-SNAPSHOT-jar-with-dependencies-bug336.jar

run as: java -jar grizzly-sendfile-server-0.3-SNAPSHOT-jar-with-
dependencies-bug336.jar -p 7700 -m servlet /path/to/some/files
test: wget -O - --save-headers http://localhost:7700/some-small-file

Should contain header:
StoragePath: /path/to/some/files/some-small-file

The body should not start with:
Some bogus content to test Response#resetBody()



Bug 548
-------

src: http://dl.getdropbox.com/u/838370/grizzly/grizzly-sendfile-bug548-src.tgz
jar: http://dl.getdropbox.com/u/838370/grizzly/grizzly-sendfile-server-0.3-SNAPSHOT-jar-with-dependencies-bug548.jar

run as: java -jar grizzly-sendfile-server-0.3-SNAPSHOT-jar-with-
dependencies-bug548.jar -p 7700 /path/to/some/files
test: wget --limit-rate 10000 -O /dev/null http://localhost:7700/100m.file

Should not see:
2009-04-30 11:48:34 (9.77 KB/s) - Connection closed at byte 146988.
Retrying.


I also tried calling attach(Long.MAX_VALUE) before calling cancel as:

task.getSelectionKey().attach(Long.MAX_VALUE);
task.getSelectionKey().cancel();

but it had no effect.


cheers,
Igor


On Apr 29, 2009, at 5:30 PM, Jeanfrancois Arcand wrote:

> Salut,
>
> Igor Minar wrote:
>> Hi guys,
>> following http://twitter.com/project_grizzly/statuses/1649157373/
>> here are two bugs that currently complicate my life:
>> https://grizzly.dev.java.net/issues/show_bug.cgi?id=336 - reopened
>> bug with an untested patch provided by me. I'll try to test it
>> today to confirm that it works as expected.
>
> Patch applied. See comments in the issue.
>
>> https://grizzly.dev.java.net/issues/show_bug.cgi?id=548 - I'll
>> create a grizzly-sendfile distro that uses the grizzly web server
>> so that you can easily reproduce the error.
>
> OK thanks. I've added my comments on the issue as well. Clearly the
> connection seems to times out, either because of the
> SelectionKeyHandler doesn't do the right things or the InputReader
> timeout is to small. Just try to do
> SelectionKey.attach(Long.MAX_VALUE) from your code to see if that
> help.
>
> Thanks
>
> -- Jeanfrancois
>
>> cheers,
>> Igor
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>