-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application hot upgrade failed #2558
Comments
We're gonna need a bit more information:
Right now it just looks like But with neither the code or any extra information there's no good way to reproduce this and narrow down the possible issue. |
OS: macOS 10.15.7 |
@atimid is this fixed if you add {debug_info, keep} to your prod profile relx options? |
This is caused by beam_file:strip_release being called, which strips out (among others) the "Attr" chunk from beam files for a release, used to get the vsn for a beam during release_handler installation. https://github.com/erlware/relx/blob/master/src/rlx_assemble.erl#L24-L54 This happens with {mode, prod} and {debug_info, strip} set (prod sets it by default). This isn't what you want. Note that this ignores the I think the fix for this in rebar3/relx is better documentation of these options, and perhaps taking erl_opts into account. Breaking relup releases in {mode, prod} is probably not a great default. Stripping debug_info should perhaps not also strip the attr/vsn from beams as well. That seems to be longstanding behaviour of beam_lib:strip_release, but perhaps there's a more suitable call to use for just debug info stripping. |
Argh, definitely need better docs, yes. Are you saying the longstanding behaviour of strip_release was to not strip the attr/vsn from the beam files as well? |
Ah sorry, I was saying that from what I can tell of the beam_lib commit history, the long standing behaviour of strip_release is that it DOES strip attributes. |
I added this option in both version 1.1.0 and 1.1.1, but the problem still exists, the vsn is still missing in the compiled beam file, and the process of repeating the hot update still fails. |
@atimid sorry, haven't had the time to try your example project. Can you try with |
@tsloughter thanks, using {mode, dev} can solve this problem. |
The fix for this is in 3.19.0. |
I used
reber3 as prod tar
to package my program, I thought it was a command./bin/relup_test install 1.1.1
to upgrade my program, but it failed.Environment
rebar 3.15.1+build.4997.ref12d77966 on Erlang/OTP 22 Erts 10.7.2.8
Current behaviour
rebar.config
I have added
-vsn("1.1.1")
to the module that needs to be updated, but the file in the package that rebar3 as prod tar is still missing vsn information.Expected behaviour
I expect the upgrade to succeed.
The text was updated successfully, but these errors were encountered: