You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Timo Derstappen <te...@gmail.com> on 2010/09/02 16:27:20 UTC

Attachment compression test fails

Hello,

I need some help to find an issue. make check works perfectly on my
Ubuntu laptop (lucid). But not on an ec2 machine with karmic.

/opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
test 78

./140-attachment-comp.t
ok 77  - Couldn't create an already compressed attachment using the
unsupported encoding 'deflate'
# Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
                               [{erl_eval,expr,3}]}}
[error] [<0.32.0>] {error_report,<0.24.0>,
 {<0.32.0>,crash_report,
  [[{initial_call,{etap,start_etap_server,[]}},
    {pid,<0.32.0>},
    {registered_name,etap_server},
    {error_info,
     {exit,
      {badarg,
       [{io,format,
         [<0.24.0>,"~s~n",
          [[66,97,105,108,32,111,117,116,33,32|
            {'EXIT',
             {{badmatch,{error,socket_closed_remotely}},
              [{erl_eval,expr,3}]}}]]]},
        {etap,test_server,1},
        {proc_lib,init_p_do_apply,3}]},
      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
    {ancestors,[<0.1.0>]},
    {messages,[done]},
    {links,[]},
    {dictionary,[]},
    {trap_exit,false},
    {status,running},
    {heap_size,987},
    {stack_size,24},
    {reductions,2110}],
   []]}}

Does anybody know which dependency is missing or what may be causing
this? Couchdb runs fine and my application tests pass. How can I get
more information about the failure?

Since my deploy script stops bundling a new image if couchs tests fail
it would be nice to have that issue solved. Even if I don't use
compressed attachments.

Cheers,
Timo

Re: Attachment compression test fails

Posted by Timo Derstappen <te...@gmail.com>.
I did some more research. On a third machine the test seems to fail
randomly. I wrote a small node script, that reproduces the problem:
http://gist.github.com/567057

The request seems to be ended if the content-encoding error in the
header is detected. So the node script fails with a ENOTCONN, but only
sometimes. I guess depending on the order in the event loop. If I
uncomment line 16 the error does not appear.

The error message in the couch testsuite seems to have the same problem:
# Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},

Status code and error message are ok – only the client is confused
that it can't finish the request, I guess.

So is there any chance to fix this behavior? I tried to understand
mochiweb_request.erl and couch_httpd_db.erl (the error is thrown in
line 1004), but my erlang knowledge is very limited.

Cheers,
Timo

On Fri, Sep 3, 2010 at 2:44 AM, Jon Brisbin <jo...@jbrisbin.com> wrote:
>
> On Sep 2, 2010, at 5:22 PM, Timo Derstappen wrote:
>
>> That's what I thought too. But I already installed those packages on
>> the server, but the tests still failed. I compared some more zlib, zip
>> libraries I have installed on my laptop, but still no success. Any
>> other ideas?
>
> no, sorry. :/
>
> jb
>
>>
>> On Thu, Sep 2, 2010 at 4:40 PM, Jon Brisbin <jo...@jbrisbin.com> wrote:
>>> I don't think stock Ubuntu has zip/unzip, which would be for "deflate" compression.
>>>
>>> jb
>>>
>>> On Sep 2, 2010, at 9:27 AM, Timo Derstappen wrote:
>>>
>>>> Hello,
>>>>
>>>> I need some help to find an issue. make check works perfectly on my
>>>> Ubuntu laptop (lucid). But not on an ec2 machine with karmic.
>>>>
>>>> /opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
>>>> test 78
>>>>
>>>> ./140-attachment-comp.t
>>>> ok 77  - Couldn't create an already compressed attachment using the
>>>> unsupported encoding 'deflate'
>>>> # Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
>>>>                               [{erl_eval,expr,3}]}}
>>>> [error] [<0.32.0>] {error_report,<0.24.0>,
>>>> {<0.32.0>,crash_report,
>>>>  [[{initial_call,{etap,start_etap_server,[]}},
>>>>    {pid,<0.32.0>},
>>>>    {registered_name,etap_server},
>>>>    {error_info,
>>>>     {exit,
>>>>      {badarg,
>>>>       [{io,format,
>>>>         [<0.24.0>,"~s~n",
>>>>          [[66,97,105,108,32,111,117,116,33,32|
>>>>            {'EXIT',
>>>>             {{badmatch,{error,socket_closed_remotely}},
>>>>              [{erl_eval,expr,3}]}}]]]},
>>>>        {etap,test_server,1},
>>>>        {proc_lib,init_p_do_apply,3}]},
>>>>      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
>>>>    {ancestors,[<0.1.0>]},
>>>>    {messages,[done]},
>>>>    {links,[]},
>>>>    {dictionary,[]},
>>>>    {trap_exit,false},
>>>>    {status,running},
>>>>    {heap_size,987},
>>>>    {stack_size,24},
>>>>    {reductions,2110}],
>>>>   []]}}
>>>>
>>>> Does anybody know which dependency is missing or what may be causing
>>>> this? Couchdb runs fine and my application tests pass. How can I get
>>>> more information about the failure?
>>>>
>>>> Since my deploy script stops bundling a new image if couchs tests fail
>>>> it would be nice to have that issue solved. Even if I don't use
>>>> compressed attachments.
>>>>
>>>> Cheers,
>>>> Timo
>>>
>>>
>>> Thanks!
>>>
>>> J. Brisbin
>>> http://jbrisbin.com/
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Timo Derstappen
>>
>> http://teemow.com
>> mailto:teemow@gmail.com
>
>
> Thanks!
>
> J. Brisbin
> http://jbrisbin.com/
>
>
>
>
>
>
>



-- 
Timo Derstappen

http://teemow.com
mailto:teemow@gmail.com

Re: Attachment compression test fails

Posted by Jon Brisbin <jo...@jbrisbin.com>.
On Sep 2, 2010, at 5:22 PM, Timo Derstappen wrote:

> That's what I thought too. But I already installed those packages on
> the server, but the tests still failed. I compared some more zlib, zip
> libraries I have installed on my laptop, but still no success. Any
> other ideas?

no, sorry. :/

jb

> 
> On Thu, Sep 2, 2010 at 4:40 PM, Jon Brisbin <jo...@jbrisbin.com> wrote:
>> I don't think stock Ubuntu has zip/unzip, which would be for "deflate" compression.
>> 
>> jb
>> 
>> On Sep 2, 2010, at 9:27 AM, Timo Derstappen wrote:
>> 
>>> Hello,
>>> 
>>> I need some help to find an issue. make check works perfectly on my
>>> Ubuntu laptop (lucid). But not on an ec2 machine with karmic.
>>> 
>>> /opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
>>> test 78
>>> 
>>> ./140-attachment-comp.t
>>> ok 77  - Couldn't create an already compressed attachment using the
>>> unsupported encoding 'deflate'
>>> # Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
>>>                               [{erl_eval,expr,3}]}}
>>> [error] [<0.32.0>] {error_report,<0.24.0>,
>>> {<0.32.0>,crash_report,
>>>  [[{initial_call,{etap,start_etap_server,[]}},
>>>    {pid,<0.32.0>},
>>>    {registered_name,etap_server},
>>>    {error_info,
>>>     {exit,
>>>      {badarg,
>>>       [{io,format,
>>>         [<0.24.0>,"~s~n",
>>>          [[66,97,105,108,32,111,117,116,33,32|
>>>            {'EXIT',
>>>             {{badmatch,{error,socket_closed_remotely}},
>>>              [{erl_eval,expr,3}]}}]]]},
>>>        {etap,test_server,1},
>>>        {proc_lib,init_p_do_apply,3}]},
>>>      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
>>>    {ancestors,[<0.1.0>]},
>>>    {messages,[done]},
>>>    {links,[]},
>>>    {dictionary,[]},
>>>    {trap_exit,false},
>>>    {status,running},
>>>    {heap_size,987},
>>>    {stack_size,24},
>>>    {reductions,2110}],
>>>   []]}}
>>> 
>>> Does anybody know which dependency is missing or what may be causing
>>> this? Couchdb runs fine and my application tests pass. How can I get
>>> more information about the failure?
>>> 
>>> Since my deploy script stops bundling a new image if couchs tests fail
>>> it would be nice to have that issue solved. Even if I don't use
>>> compressed attachments.
>>> 
>>> Cheers,
>>> Timo
>> 
>> 
>> Thanks!
>> 
>> J. Brisbin
>> http://jbrisbin.com/
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Timo Derstappen
> 
> http://teemow.com
> mailto:teemow@gmail.com


Thanks!

J. Brisbin
http://jbrisbin.com/







Re: Attachment compression test fails

Posted by Timo Derstappen <te...@gmail.com>.
That's what I thought too. But I already installed those packages on
the server, but the tests still failed. I compared some more zlib, zip
libraries I have installed on my laptop, but still no success. Any
other ideas?

On Thu, Sep 2, 2010 at 4:40 PM, Jon Brisbin <jo...@jbrisbin.com> wrote:
> I don't think stock Ubuntu has zip/unzip, which would be for "deflate" compression.
>
> jb
>
> On Sep 2, 2010, at 9:27 AM, Timo Derstappen wrote:
>
>> Hello,
>>
>> I need some help to find an issue. make check works perfectly on my
>> Ubuntu laptop (lucid). But not on an ec2 machine with karmic.
>>
>> /opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
>> test 78
>>
>> ./140-attachment-comp.t
>> ok 77  - Couldn't create an already compressed attachment using the
>> unsupported encoding 'deflate'
>> # Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
>>                               [{erl_eval,expr,3}]}}
>> [error] [<0.32.0>] {error_report,<0.24.0>,
>> {<0.32.0>,crash_report,
>>  [[{initial_call,{etap,start_etap_server,[]}},
>>    {pid,<0.32.0>},
>>    {registered_name,etap_server},
>>    {error_info,
>>     {exit,
>>      {badarg,
>>       [{io,format,
>>         [<0.24.0>,"~s~n",
>>          [[66,97,105,108,32,111,117,116,33,32|
>>            {'EXIT',
>>             {{badmatch,{error,socket_closed_remotely}},
>>              [{erl_eval,expr,3}]}}]]]},
>>        {etap,test_server,1},
>>        {proc_lib,init_p_do_apply,3}]},
>>      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
>>    {ancestors,[<0.1.0>]},
>>    {messages,[done]},
>>    {links,[]},
>>    {dictionary,[]},
>>    {trap_exit,false},
>>    {status,running},
>>    {heap_size,987},
>>    {stack_size,24},
>>    {reductions,2110}],
>>   []]}}
>>
>> Does anybody know which dependency is missing or what may be causing
>> this? Couchdb runs fine and my application tests pass. How can I get
>> more information about the failure?
>>
>> Since my deploy script stops bundling a new image if couchs tests fail
>> it would be nice to have that issue solved. Even if I don't use
>> compressed attachments.
>>
>> Cheers,
>> Timo
>
>
> Thanks!
>
> J. Brisbin
> http://jbrisbin.com/
>
>
>
>
>
>
>



-- 
Timo Derstappen

http://teemow.com
mailto:teemow@gmail.com

Re: Attachment compression test fails

Posted by Jon Brisbin <jo...@jbrisbin.com>.
I don't think stock Ubuntu has zip/unzip, which would be for "deflate" compression.

jb

On Sep 2, 2010, at 9:27 AM, Timo Derstappen wrote:

> Hello,
> 
> I need some help to find an issue. make check works perfectly on my
> Ubuntu laptop (lucid). But not on an ec2 machine with karmic.
> 
> /opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
> test 78
> 
> ./140-attachment-comp.t
> ok 77  - Couldn't create an already compressed attachment using the
> unsupported encoding 'deflate'
> # Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
>                               [{erl_eval,expr,3}]}}
> [error] [<0.32.0>] {error_report,<0.24.0>,
> {<0.32.0>,crash_report,
>  [[{initial_call,{etap,start_etap_server,[]}},
>    {pid,<0.32.0>},
>    {registered_name,etap_server},
>    {error_info,
>     {exit,
>      {badarg,
>       [{io,format,
>         [<0.24.0>,"~s~n",
>          [[66,97,105,108,32,111,117,116,33,32|
>            {'EXIT',
>             {{badmatch,{error,socket_closed_remotely}},
>              [{erl_eval,expr,3}]}}]]]},
>        {etap,test_server,1},
>        {proc_lib,init_p_do_apply,3}]},
>      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
>    {ancestors,[<0.1.0>]},
>    {messages,[done]},
>    {links,[]},
>    {dictionary,[]},
>    {trap_exit,false},
>    {status,running},
>    {heap_size,987},
>    {stack_size,24},
>    {reductions,2110}],
>   []]}}
> 
> Does anybody know which dependency is missing or what may be causing
> this? Couchdb runs fine and my application tests pass. How can I get
> more information about the failure?
> 
> Since my deploy script stops bundling a new image if couchs tests fail
> it would be nice to have that issue solved. Even if I don't use
> compressed attachments.
> 
> Cheers,
> Timo


Thanks!

J. Brisbin
http://jbrisbin.com/







Re: Attachment compression test fails

Posted by Sebastian Cohnen <se...@googlemail.com>.
Hey Timo,

is this CouchDB 1.0? Not sure if it was 1.0.1 or trunk, but I remember some commits fixing bugs (race conditions) in the etap test suite concerning attachments. If you are on 1.0 you should upgrade and if you are on 1.0.1, could you try to build from tunk?

Best

Sebastian

On 02.09.2010, at 16:27, Timo Derstappen wrote:

> Hello,
> 
> I need some help to find an issue. make check works perfectly on my
> Ubuntu laptop (lucid). But not on an ec2 machine with karmic.
> 
> /opt/apache-couchdb-1.0.1/test/etap/140-attachment-comp................FAILED
> test 78
> 
> ./140-attachment-comp.t
> ok 77  - Couldn't create an already compressed attachment using the
> unsupported encoding 'deflate'
> # Test died abnormally: {'EXIT',{{badmatch,{error,socket_closed_remotely}},
>                               [{erl_eval,expr,3}]}}
> [error] [<0.32.0>] {error_report,<0.24.0>,
> {<0.32.0>,crash_report,
>  [[{initial_call,{etap,start_etap_server,[]}},
>    {pid,<0.32.0>},
>    {registered_name,etap_server},
>    {error_info,
>     {exit,
>      {badarg,
>       [{io,format,
>         [<0.24.0>,"~s~n",
>          [[66,97,105,108,32,111,117,116,33,32|
>            {'EXIT',
>             {{badmatch,{error,socket_closed_remotely}},
>              [{erl_eval,expr,3}]}}]]]},
>        {etap,test_server,1},
>        {proc_lib,init_p_do_apply,3}]},
>      [{io,o_request,3},{etap,test_server,1},{proc_lib,init_p_do_apply,3}]}},
>    {ancestors,[<0.1.0>]},
>    {messages,[done]},
>    {links,[]},
>    {dictionary,[]},
>    {trap_exit,false},
>    {status,running},
>    {heap_size,987},
>    {stack_size,24},
>    {reductions,2110}],
>   []]}}
> 
> Does anybody know which dependency is missing or what may be causing
> this? Couchdb runs fine and my application tests pass. How can I get
> more information about the failure?
> 
> Since my deploy script stops bundling a new image if couchs tests fail
> it would be nice to have that issue solved. Even if I don't use
> compressed attachments.
> 
> Cheers,
> Timo