processone / fast_xml

Fast Expat based Erlang XML parsing library
Apache License 2.0
134 stars 46 forks source link

invalid_chunk when running test suite #21

Open bowlofeggs opened 7 years ago

bowlofeggs commented 7 years ago

I've been attempting to run the test suite on Fedora Rawhide and it seems to fail to cover compile:

$ export VSN=1.1.19
$ export REBAR_VSN_CACHE_FILE=/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/vsn.cache
$ export REBAR_DEPS_PREFER_LIBS=TRUE
$ /usr/bin/rebar eunit skip_deps=true -vv
DEBUG: Evaluating config script "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/rebar.config.script"
DEBUG: Consult config file "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/rebar.config"
DEBUG: Rebar location: "/usr/bin/rebar"
DEBUG: Consult config file "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/src/fast_xml.app.src"
DEBUG: is_app_available, looking for App p1_utils with Path "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/deps/p1_utils"
DEBUG: Directory expected to be an app dir, but it doesn't exist (yet?):
/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/deps/p1_utils
DEBUG: is_app_available, looking for App p1_utils with Path "/usr/lib64/erlang/lib/p1_utils-1.0.6"
INFO:  Looking for p1_utils-.* ; found p1_utils-1.0.6 at /usr/lib64/erlang/lib/p1_utils-1.0.6
DEBUG: Available deps: [{dep,"/usr/lib64/erlang/lib/p1_utils-1.0.6",p1_utils,
                             ".*",
                             {git,"https://github.com/processone/p1_utils",
                                  {tag,"1.0.6"}},
                             false}]
DEBUG: Missing deps  : []
DEBUG: is_app_available, looking for App p1_utils with Path "/usr/lib64/erlang/lib/p1_utils-1.0.6"
INFO:  Looking for p1_utils-.* ; found p1_utils-1.0.6 at /usr/lib64/erlang/lib/p1_utils-1.0.6
DEBUG: Adding /usr/lib64/erlang/lib/p1_utils-1.0.6/ebin to code path
DEBUG: Adding skip dir: /usr/lib64/erlang/lib/p1_utils-1.0.6
DEBUG: Associate sub_dir /usr/lib64/erlang/lib/p1_utils-1.0.6 with /home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19
DEBUG: Plugins requested while processing /home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19: []
DEBUG: Predirs: ["/usr/lib64/erlang/lib/p1_utils-1.0.6"]
DEBUG: Consult config file "/usr/lib64/erlang/lib/p1_utils-1.0.6/rebar.config"
DEBUG: Available deps: []
DEBUG: Missing deps  : []
DEBUG: Plugins requested while processing /usr/lib64/erlang/lib/p1_utils-1.0.6: []
DEBUG: Predirs: []
DEBUG: Postdirs: []
==> fast_xml-1.1.19 (eunit)
DEBUG: Matched required ERTS version: 8.2.1 -> .*
DEBUG: Matched required OTP release: 19 -> .*
DEBUG: Min OTP version unconfigured
DEBUG: Triq availability: false
DEBUG: PropEr availability: true
DEBUG: QuickCheck availability: false
INFO:  sh info:
        cwd: "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19"
        cmd: cp -R src/fxmlrpc_codec.erl src/fxmlrpc.erl src/fxml_sup.erl src/fxml_stream.erl src/fxml_gen_pt.erl src/fxml_gen.erl src/fxml.erl src/fast_xml.erl test/fxml_test.erl ".eunit"
DEBUG:  opts: [{use_stdout,false},abort_on_error]
DEBUG: Port Cmd: "cp -R src/fxmlrpc_codec.erl src/fxmlrpc.erl src/fxml_sup.erl src/fxml_stream.erl src/fxml_gen_pt.erlsrc/fxml_gen.erl src/fxml.erl src/fast_xml.erl test/fxml_test.erl \".eunit\""
Port Opts: [exit_status,{line,16384},use_stdio,stderr_to_stdout,hide]
DEBUG: erl_opts [{d,'TEST'},
                 debug_info,debug_info,
                 {src_dirs,["src"]},
                 {d,'PROPER'}]
DEBUG: Files to compile first: []
INFO:  Cover compiling /home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19
ERROR: eunit failed while processing /home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19: {'EXIT',
    {{case_clause,
         {error,beam_lib,
             {invalid_chunk,
                 "/home/rbarlow/rpmbuild/BUILD/fast_xml-1.1.19/.eunit/fxml_gen.beam",
                 "Abst"}}},
     [{cover,do_compile_beam1,3,[{file,"cover.erl"},{line,1539}]},
      {cover,do_compile_beam,3,[{file,"cover.erl"},{line,1478}]},
      {lists,map,2,[{file,"lists.erl"},{line,1239}]},
      {cover,'-pmap_spawn/4-fun-0-',2,[{file,"cover.erl"},{line,2732}]}]}}

I've tried this with fast_xml-1.1.18, 1.1.19 and 1.1.20. Other related deps:

erlang-erts-19.2.2-1.fc26.x86_64
erlang-eunit-19.2.2-1.fc26.x86_64
erlang-p1_utils-1.0.6-1.fc26.x86_64
erlang-rebar-2.6.4-2.fc26.x86_64

Let me know if I can provide more information!

zinid commented 7 years ago

I think this will work if you disable cover. I have absolutely no idea why cover is crashing.

bowlofeggs commented 7 years ago

I determined that this is something local to my machine, as I was able to get the tests to run and pass on another machine. I don't know what the problem is on my machine yet, but I don't believe it is a problem with fast_xml. Sorry for the noise!

mathiasertl commented 7 years ago

@bowlofeggs did you ever find out what the problem for this is?

I have that problem under Ubuntu Zesty, but no other currently supported Ubuntu or Debian version (including unstable). :-/

bowlofeggs commented 7 years ago

@mathiasertl Unfortunately I did not ever find the cause of this issue.

mathiasertl commented 7 years ago

One thing that might help: I see the exact same behavior with p1_xmpp.