erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

Failing tests in deflate_SUITE #315

Closed avtobiff closed 6 years ago

avtobiff commented 6 years ago

On Debian sid with

three tests are failing on master in the deflate_SUITE:

avtobiff@hermes:~/src/github/avtobiff/yaws$ testsuite/run_common_test deflate_SUITE

  deflate_SUITE...
        deflate_disabled...                               [ OK ]
        deflate_enabled...                                [ OK ]
        empty_response...                                 [ OK ]
        chunked_response...                               [ OK ]
        deflate_options_mime_types...                     [ OK ]
        deflate_options_compress_size...                  [ KO ]
        deflate_options_gzip_static...                    [ KO ]
        deflate_options_otheroptions...                   [ KO ]
    ------------------------------------------
    Failed: 3    Skipped: 0    Passed: 5    
Error details: /home/avtobiff/src/github/avtobiff/yaws/testsuite/logs/ct_run.ct@hermes.2017-11-10_23.00.56/yaws.testsuite.deflate_SUITE.logs/run.2017-11-10_23.00.56/suite.log

RESULT: FAILED  [ Failed: 3    Skipped: 0    Passed: 5 ]
============================================================================
 see /home/avtobiff/src/github/avtobiff/yaws/testsuite/logs/yaws.log for details

 common_test result: /home/avtobiff/src/github/avtobiff/yaws/testsuite/logs/ct_run.ct@hermes.2017-11-10_23.00.56/index.html
============================================================================

testsuite/logs/yaws.log contains the following crashes


avtobiff@hermes:~/src/github/avtobiff/yaws$ grep -B 2 -A 20 inflateEnd_nif testsuite/logs/yaws.log 
(ct@hermes)1> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zlib:inflateEnd_nif failed
Reason: data_error
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(ct@hermes)1> 
=INFO REPORT==== 10-Nov-2017::23:00:58 ===
yaws debug: DEBUG <ct@hermes> yaws_server.erl:3055, pid <0.176.0>: 
send 10240 bytes to #Port<0.4350> 

(ct@hermes)1> 
=INFO REPORT==== 10-Nov-2017::23:00:58 ===
yaws debug: DEBUG <ct@hermes> yaws_server.erl:4028, pid <0.176.0>: 
send_file(#Port<0.4350>,{file_descriptor,prim_file,{#Port<0.4352>,51}}, ...)

(ct@hermes)1> 
----------------------------------------------------
2017-11-10 23:00:58.765

Error: {data_error,[{zlib,inflateEnd_nif,
                          [#Ref<0.1717154460.3555065857.70448>],
                          []},
                    {zlib,gunzip,1,[]},
                    {deflate_SUITE,'-deflate_options_compress_size/1-fun-4-',
                                   1,
                                   [{file,"deflate_SUITE.erl"},{line,246}]},
                    {deflate_SUITE,deflate_options_compress_size,1,
                                   [{file,"deflate_SUITE.erl"},{line,246}]},
                    {test_server,ts_tc,3,
                                 [{file,"test_server.erl"},{line,1539}]},
                    {test_server,run_test_case_eval1,6,
                                 [{file,"test_server.erl"},{line,1055}]},
                    {test_server,run_test_case_eval,9,
                                 [{file,"test_server.erl"},{line,987}]}]}

            RESULT: Failed
    ==========================================================================

--
(ct@hermes)1> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zlib:inflateEnd_nif failed
Reason: data_error
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(ct@hermes)1> 
----------------------------------------------------
2017-11-10 23:01:00.343

Error: {data_error,[{zlib,inflateEnd_nif,
                          [#Ref<0.1717154460.3555065858.84263>],
                          []},
                    {zlib,gunzip,1,[]},
                    {deflate_SUITE,'-deflate_options_gzip_static/1-fun-3-',1,
                                   [{file,"deflate_SUITE.erl"},{line,273}]},
                    {deflate_SUITE,deflate_options_gzip_static,1,
                                   [{file,"deflate_SUITE.erl"},{line,273}]},
                    {test_server,ts_tc,3,
                                 [{file,"test_server.erl"},{line,1539}]},
                    {test_server,run_test_case_eval1,6,
                                 [{file,"test_server.erl"},{line,1055}]},
                    {test_server,run_test_case_eval,9,
                                 [{file,"test_server.erl"},{line,987}]}]}

            RESULT: Failed
    ==========================================================================

(ct@hermes)1> Testing yaws.testsuite.deflate_SUITE: *** FAILED test case 7 of 8 ***
--
(ct@hermes)1> 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zlib:inflateEnd_nif failed
Reason: data_error
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

(ct@hermes)1> 
----------------------------------------------------
2017-11-10 23:01:01.908

Error: {data_error,[{zlib,inflateEnd_nif,
                          [#Ref<0.1717154460.3555065858.90209>],
                          []},
                    {zlib,gunzip,1,[]},
                    {deflate_SUITE,'-deflate_options_otheroptions/1-fun-5-',1,
                                   [{file,"deflate_SUITE.erl"},{line,309}]},
                    {deflate_SUITE,deflate_options_otheroptions,1,
                                   [{file,"deflate_SUITE.erl"},{line,309}]},
                    {test_server,ts_tc,3,
                                 [{file,"test_server.erl"},{line,1539}]},
                    {test_server,run_test_case_eval1,6,
                                 [{file,"test_server.erl"},{line,1055}]},
                    {test_server,run_test_case_eval,9,
                                 [{file,"test_server.erl"},{line,987}]}]}

            RESULT: Failed
    ==========================================================================

(ct@hermes)1> Testing yaws.testsuite.deflate_SUITE: *** FAILED test case 8 of 8 ***
capflam commented 6 years ago

Hi, Sorry for the delay. I will take a look. Thanks.

avtobiff commented 6 years ago

I'm happy to help debug the issue!

capflam commented 6 years ago

Hi,

Sorry for the delay. I'm unable to reproduce the bug. I checked on my fedora and on a freshly installed debian sid. And everything works as expected. On my debian, the Erlang version I used is 1:20.1.7+dfsg-1. So it could be an Erlang problem. There is a bug on zlib:gunzip/1 in 20.1.4. It is fixed in 20.1.5. Could you upgrade your Erlang package and check again ?

avtobiff commented 6 years ago

Yeah, it works fine with Erlang 1:20.1.7+dfsg-1.