Skip to content
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

Fix process stack in crashdump #5462

Merged

Conversation

garazdawi
Copy link
Contributor

The optimization in #2351 inadvertently changed the way that the first stackframe in crash dumps is displayed. This PR fixes that problem in crash dumps and updates crash dump viewer to be able to read the stackframe of the broken processes.

Problem was also reported in #5459

In OTP-23 the format of the stackdump was inadvertenly changed
so that all variables in the first frame are prefixed with an
address instead of y register. This commit makes cdv handle the
new and old format.
In OTP-23 the placement of the top frame was changed and that
caused the stackdump printing algorithm to not prefix variables
in the first frame with y. i.e.

    0x00007f72440b76f0:N
    0x00007f72440b76f8:SReturn addr 0x44381898 (proc_lib:init_p_do_apply/3 + 72)
    y0:P<0.9.0>
    y1:P<0.10.0>
    0x00007f72440b7718:SReturn addr 0x66325748 (<terminate process normally>)

was written instead of

    y0:N
    0x00007f72440b76f8:SReturn addr 0x44381898 (proc_lib:init_p_do_apply/3 + 72)
    y0:P<0.9.0>
    y1:P<0.10.0>
    0x00007f72440b7718:SReturn addr 0x66325748 (<terminate process normally>)

The same issue was also fixed for erlang:process_display,
erlang:process_info(backtrace) and the ctrl-c proc dump.
@garazdawi garazdawi added team:VM Assigned to OTP team VM bug Issue is reported as a bug labels Nov 30, 2021
@garazdawi garazdawi self-assigned this Nov 30, 2021
@garazdawi garazdawi added the testing currently being tested, tag is used by OTP internal CI label Nov 30, 2021
@garazdawi garazdawi merged commit af8f852 into erlang:maint Dec 6, 2021
@garazdawi garazdawi deleted the lukas/erts/fix-crashdump-stack/OTP-17814 branch December 6, 2021 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants