ct:pal crashing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ct:pal crashing

Attila Rajmund Nohl
Recently our common_test suites started to fail in our (gitlab-runner)
CI environment with errors like this:

        {dir_SUITE,init_per_testcase,
            {{noproc,
                 {gen_event,call,
                     [cth_readable_logger,cth_readable_failonly,
                      {ct_pal,
                          [10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
                           45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
                           45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
                           45,45,10,"2018-06-06 19:41:49.002",10,116,101,115,
                           116,32,105,110,105,116,32,39,"bic",39,58,32,68,101,
                           108,101,116,101,100,32,107,101,121,115,32,"[]",10,
                           10]}]}},
             [{gen_event,call1,3,[{file,"gen_event.erl"},{line,207}]},
              {cthr,pal,4,
                  [{file,

"/usr/src/rebar3-src/_build/default/lib/cth_readable/src/cthr.erl"},
                   {line,74}]},

As far as I understand the gitlab CI environment and our setup, the CI
job fetches the erlang:19 Docker image:

Using docker image
sha256:2ea95f0c3147e50b79b4fcd28c955c80c2e57eb20fb8ff61bb8ed1873d0b6957
for erlang:19

and executes our test suite in that image. Our code did not change,
but it looks like the image did change, at least at the latest
successful test I see this in the logs:

Using docker image
sha256:e36b5300c4cf2f504f0222ea66bbf81fb2e514ad88cb93f111b5e85e7893b99a
for erlang:19

Do you know what could cause this problem?
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: ct:pal crashing

Fred Hebert-2
That error is due to https://github.com/ferd/cth_readable/, a CT hook that rebar3 bundles to make CT output look nicer.

Usually this is stable stuff that worked well for multiple versions, and the only broken one I'm aware of is OTP-21-rc2 (the fix is in master, but hasn't been put in an official release yet). The error makes it look like the following code is being called:


This is dynamic detection of the logger module in OTP-21, which requires output to be redirected in another place than the default error logger. If your own project happens to also include a module named 'logger', then you're getting into a clash with code that attempts to support a newer version of Erlang.

If that is what happens, I can only advise to:
  • possibly disable the pretty output by adding --readable=false to your command, or {ct_readable, false} to your rebar.config file
  • switch to an older rebar3 version that will support only the older logging interface
  • explicitly disable ct_readable, manually include an older version of cth_readable and use that one instead by specifying CT hooks in {ct_opts, [{hooks, [...]}]}
If you do not have a logger module in your OTP-19 version, then I'm going to need more details to figure that one out.


On Fri, Jun 8, 2018 at 9:56 AM, Attila Rajmund Nohl <[hidden email]> wrote:
Recently our common_test suites started to fail in our (gitlab-runner)
CI environment with errors like this:

{dir_SUITE,init_per_testcase,
{{noproc,
 {gen_event,call,
 [cth_readable_logger,cth_readable_failonly,
{ct_pal,
[10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,10,"2018-06-06 19:41:49.002",10,116,101,115,
 116,32,105,110,105,116,32,39,"bic",39,58,32,68,101,
 108,101,116,101,100,32,107,101,121,115,32,"[]",10,
 10]}]}},
 [{gen_event,call1,3,[{file,"gen_event.erl"},{line,207}]},
{cthr,pal,4,
[{file,

"/usr/src/rebar3-src/_build/default/lib/cth_readable/src/cthr.erl"},
 {line,74}]},

As far as I understand the gitlab CI environment and our setup, the CI
job fetches the erlang:19 Docker image:

Using docker image
sha256:2ea95f0c3147e50b79b4fcd28c955c80c2e57eb20fb8ff61bb8ed1873d0b6957
for erlang:19

and executes our test suite in that image. Our code did not change,
but it looks like the image did change, at least at the latest
successful test I see this in the logs:

Using docker image
sha256:e36b5300c4cf2f504f0222ea66bbf81fb2e514ad88cb93f111b5e85e7893b99a
for erlang:19

Do you know what could cause this problem?
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: ct:pal crashing

Attila Rajmund Nohl
Thanks. We do have a logger module that's in dire need of renaming.

Fred Hebert <[hidden email]> ezt írta (időpont: 2018. jún. 8., Pén 16:58):
That error is due to https://github.com/ferd/cth_readable/, a CT hook that rebar3 bundles to make CT output look nicer.

Usually this is stable stuff that worked well for multiple versions, and the only broken one I'm aware of is OTP-21-rc2 (the fix is in master, but hasn't been put in an official release yet). The error makes it look like the following code is being called:


This is dynamic detection of the logger module in OTP-21, which requires output to be redirected in another place than the default error logger. If your own project happens to also include a module named 'logger', then you're getting into a clash with code that attempts to support a newer version of Erlang.

If that is what happens, I can only advise to:
  • possibly disable the pretty output by adding --readable=false to your command, or {ct_readable, false} to your rebar.config file
  • switch to an older rebar3 version that will support only the older logging interface
  • explicitly disable ct_readable, manually include an older version of cth_readable and use that one instead by specifying CT hooks in {ct_opts, [{hooks, [...]}]}
If you do not have a logger module in your OTP-19 version, then I'm going to need more details to figure that one out.


On Fri, Jun 8, 2018 at 9:56 AM, Attila Rajmund Nohl <[hidden email]> wrote:
Recently our common_test suites started to fail in our (gitlab-runner)
CI environment with errors like this:

{dir_SUITE,init_per_testcase,
{{noproc,
 {gen_event,call,
 [cth_readable_logger,cth_readable_failonly,
{ct_pal,
[10,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,
 45,45,10,"2018-06-06 19:41:49.002",10,116,101,115,
 116,32,105,110,105,116,32,39,"bic",39,58,32,68,101,
 108,101,116,101,100,32,107,101,121,115,32,"[]",10,
 10]}]}},
 [{gen_event,call1,3,[{file,"gen_event.erl"},{line,207}]},
{cthr,pal,4,
[{file,

"/usr/src/rebar3-src/_build/default/lib/cth_readable/src/cthr.erl"},
 {line,74}]},

As far as I understand the gitlab CI environment and our setup, the CI
job fetches the erlang:19 Docker image:

Using docker image
sha256:2ea95f0c3147e50b79b4fcd28c955c80c2e57eb20fb8ff61bb8ed1873d0b6957
for erlang:19

and executes our test suite in that image. Our code did not change,
but it looks like the image did change, at least at the latest
successful test I see this in the logs:

Using docker image
sha256:e36b5300c4cf2f504f0222ea66bbf81fb2e514ad88cb93f111b5e85e7893b99a
for erlang:19

Do you know what could cause this problem?
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions