with Erlang R21 rebar3 build fails

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

with Erlang R21 rebar3 build fails

Mark Geib-2
Strange problem developed after upgrading to erlang R21 on macOS. When I do a rebar3 build now I get:

geibs-MacBook-Pro:json2splunk geib$ rebar3 release
...
===> Compiling amqp_client
===> Compiling json2splunk
===> Running cuttlefish schema generator
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
          /Users/geib/git/cse.dbsa.download.json2splunk/json2splunk/_build/default/lib
          /Users/geib/git/cse.dbsa.download.json2splunk/json2splunk/apps
          /usr/local/Cellar/erlang/21.0/lib/erlang/lib
===> Resolved json2splunk-1.1.2-1
===> Dev mode enabled, release will be symlinked
===> release successfully created!
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command”`

and rebar3.crashdump is:

geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
Error: {badmatch,{error,eperm}}
[{rlx_prv_overlay,write_template,3,
                  [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_overlay.erl"},
                   {line,498}]},
 {lists,map,2,[{file,"lists.erl"},{line,1239}]},
 {lists,map,2,[{file,"lists.erl"},{line,1239}]},
 {rlx_prv_overlay,do_overlay,3,
                  [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_overlay.erl"},
                   {line,292}]},
 {relx,run_provider,2,
       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
        {line,308}]},
 {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
 {relx,run_providers_for_actions,2,
       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
        {line,291}]},
 {relx,main,2,
       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
        {line,65}]}]

Now switching back to erlang R20 I get a successful build

geibs-MacBook-Pro:json2splunk geib$ rebar3 release
...
===> Compiling recon
===> Compiling ranch
===> Compiling ranch_proxy_protocol
===> Compiling goldrush
===> Compiling lager
===> Compiling jsx
===> Compiling rabbit_common
===> Compiling amqp_client
===> Compiling json2splunk
===> Running cuttlefish schema generator
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
          /Users/geib/git/cse.dbsa.download.json2splunk/json2splunk/_build/default/lib
          /Users/geib/git/cse.dbsa.download.json2splunk/json2splunk/apps
          /usr/local/Cellar/erlang@20/20.3.8/lib/erlang/lib
===> Resolved json2splunk-1.1.2-1
===> Dev mode enabled, release will be symlinked
===> release successfully created!

I assume since rebar3 is the same exec, that this is a potential issue with R21.
Any ideas.???

Thanks,
Mark.

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

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: with Erlang R21 rebar3 build fails

Fred Hebert-2
On 06/20, Mark Geib wrote:

>and rebar3.crashdump is:
>
>geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
>Error: {badmatch,{error,eperm}}
>[{rlx_prv_overlay,write_template,3,
>                  [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/rlx_prv_overlay.erl"},
>                   {line,498}]},
> ...
>
>Now switching back to erlang R20 I get a successful build
>
>
>I assume since rebar3 is the same exec, that this is a potential issue with R21.
>Any ideas.???
>

See http://erlang.org/pipermail/erlang-questions/2018-June/095614.html

OTP-21.0 sees the entire file drivers rewritten. The bug you have seems
to have been reported to the OTP team during OTP-21-rc2.

I don't know exactly what happened between OTP-21-rc2 and OTP-21.0, and
if you'd need to run with a rebar3 built specifically on OTP-21.0 for
things to work fine.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: with Erlang R21 rebar3 build fails

John Högberg
Hi,

This is caused by fixing a bug in OTP 21; file:write_file_info and
friends used to report success on owner/group changes regardless of
whether it worked or not.

We marked this as an incompatibility in the release notes under OTP-
15118.

Regards,
John Högberg

On ons, 2018-06-20 at 19:21 -0400, Fred Hebert wrote:

> On 06/20, Mark Geib wrote:
> >
> > and rebar3.crashdump is:
> >
> > geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
> > Error: {badmatch,{error,eperm}}
> > [{rlx_prv_overlay,write_template,3,
> >                  [{file,"/home/tristan/Devel/rebar3/_build/default/
> > lib/relx/src/rlx_prv_overlay.erl"},
> >                   {line,498}]},
> > ...
> >
> > Now switching back to erlang R20 I get a successful build
> >
> >
> > I assume since rebar3 is the same exec, that this is a potential
> > issue with R21.
> > Any ideas.???
> >
> See http://erlang.org/pipermail/erlang-questions/2018-June/095614.htm
> l
>
> OTP-21.0 sees the entire file drivers rewritten. The bug you have
> seems 
> to have been reported to the OTP team during OTP-21-rc2.
>
> I don't know exactly what happened between OTP-21-rc2 and OTP-21.0,
> and 
> if you'd need to run with a rebar3 built specifically on OTP-21.0
> for 
> things to work fine.
> _______________________________________________
> 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: with Erlang R21 rebar3 build fails

Tristan Sloughter-4
And this allowed it to then set the mode which would actually succeed even though setting the owner did not.

relx relied on simply copying the file_info from the original file to the copy it makes when including erts in a release. Without this files like `bin/erl` that need to be executable wouldn't be.

My guess is that before 21 it would work for setting the mode and timestamp but not the owner but continue along like everything worked. While today since the owner is set first in `prim_file:write_file_info` and fails it never sets the mode, meaning we also can't simply ignore this failure like was happening before 21.

We will patch rebar3/relx to catch this and attempt to update only the mode for a quick fix, or simply modify `ec_file:copy` in erlware_commons to support an options list of what file info to copy instead of attempting to copy it all requiring rebar3/relx to handle the failure.

Tristan

On Thu, Jun 21, 2018, at 1:41 AM, John Högberg wrote:

> Hi,
>
> This is caused by fixing a bug in OTP 21; file:write_file_info and
> friends used to report success on owner/group changes regardless of
> whether it worked or not.
>
> We marked this as an incompatibility in the release notes under OTP-
> 15118.
>
> Regards,
> John Högberg
>
> On ons, 2018-06-20 at 19:21 -0400, Fred Hebert wrote:
> > On 06/20, Mark Geib wrote:
> > >
> > > and rebar3.crashdump is:
> > >
> > > geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
> > > Error: {badmatch,{error,eperm}}
> > > [{rlx_prv_overlay,write_template,3,
> > >                  [{file,"/home/tristan/Devel/rebar3/_build/default/
> > > lib/relx/src/rlx_prv_overlay.erl"},
> > >                   {line,498}]},
> > > ...
> > >
> > > Now switching back to erlang R20 I get a successful build
> > >
> > >
> > > I assume since rebar3 is the same exec, that this is a potential
> > > issue with R21.
> > > Any ideas.???
> > >
> > See http://erlang.org/pipermail/erlang-questions/2018-June/095614.htm
> > l
> >
> > OTP-21.0 sees the entire file drivers rewritten. The bug you have
> > seems 
> > to have been reported to the OTP team during OTP-21-rc2.
> >
> > I don't know exactly what happened between OTP-21-rc2 and OTP-21.0,
> > and 
> > if you'd need to run with a rebar3 built specifically on OTP-21.0
> > for 
> > things to work fine.
> > _______________________________________________
> > 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
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: with Erlang R21 rebar3 build fails

Tristan Sloughter-4
See https://github.com/erlang/rebar3/pull/1825 for a branch that may work and I'd like to get verification from those who are seeing this issue that it fixes the issue for them.

Please check not just that you can build the release but that it runs successfully and can be tarred.

--
  Tristan Sloughter
  "I am not a crackpot" - Abe Simpson
  [hidden email]

On Fri, Jun 22, 2018, at 2:48 PM, Tristan Sloughter wrote:

> And this allowed it to then set the mode which would actually succeed
> even though setting the owner did not.
>
> relx relied on simply copying the file_info from the original file to
> the copy it makes when including erts in a release. Without this files
> like `bin/erl` that need to be executable wouldn't be.
>
> My guess is that before 21 it would work for setting the mode and
> timestamp but not the owner but continue along like everything worked.
> While today since the owner is set first in `prim_file:write_file_info`
> and fails it never sets the mode, meaning we also can't simply ignore
> this failure like was happening before 21.
>
> We will patch rebar3/relx to catch this and attempt to update only the
> mode for a quick fix, or simply modify `ec_file:copy` in erlware_commons
> to support an options list of what file info to copy instead of
> attempting to copy it all requiring rebar3/relx to handle the failure.
>
> Tristan
>
> On Thu, Jun 21, 2018, at 1:41 AM, John Högberg wrote:
> > Hi,
> >
> > This is caused by fixing a bug in OTP 21; file:write_file_info and
> > friends used to report success on owner/group changes regardless of
> > whether it worked or not.
> >
> > We marked this as an incompatibility in the release notes under OTP-
> > 15118.
> >
> > Regards,
> > John Högberg
> >
> > On ons, 2018-06-20 at 19:21 -0400, Fred Hebert wrote:
> > > On 06/20, Mark Geib wrote:
> > > >
> > > > and rebar3.crashdump is:
> > > >
> > > > geibs-MacBook-Pro:json2splunk geib$ cat rebar3.crashdump
> > > > Error: {badmatch,{error,eperm}}
> > > > [{rlx_prv_overlay,write_template,3,
> > > >                  [{file,"/home/tristan/Devel/rebar3/_build/default/
> > > > lib/relx/src/rlx_prv_overlay.erl"},
> > > >                   {line,498}]},
> > > > ...
> > > >
> > > > Now switching back to erlang R20 I get a successful build
> > > >
> > > >
> > > > I assume since rebar3 is the same exec, that this is a potential
> > > > issue with R21.
> > > > Any ideas.???
> > > >
> > > See http://erlang.org/pipermail/erlang-questions/2018-June/095614.htm
> > > l
> > >
> > > OTP-21.0 sees the entire file drivers rewritten. The bug you have
> > > seems 
> > > to have been reported to the OTP team during OTP-21-rc2.
> > >
> > > I don't know exactly what happened between OTP-21-rc2 and OTP-21.0,
> > > and 
> > > if you'd need to run with a rebar3 built specifically on OTP-21.0
> > > for 
> > > things to work fine.
> > > _______________________________________________
> > > 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
> _______________________________________________
> 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