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

application_controller don't stop starting application correctly in terminate #8485

Open
zzydxm opened this issue May 15, 2024 · 0 comments
Open
Assignees
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:VM Assigned to OTP team VM

Comments

@zzydxm
Copy link
Contributor

zzydxm commented May 15, 2024

Describe the bug
When a node is booting and some application is in starting state. If the node got an shutdown signal, the application_controller will do the terminate step.

However, this step only tries to stop applications that are in running state, but ignore all the starting applications
https://github.com/erlang/otp/blob/master/lib/kernel/src/application_controller.erl#L1266

This will cause an unexpected shutdown sequence.

To Reproduce
start two applications which sleeps on boot
shutdown the node before second application started
we will see first application shutdown before the second one

Expected behavior
Later starting application should be shutdown earlier than previously started ones.

Affected versions
OTP 26
This issue must exist for a really long time since very early version, surprised if it has not been reported

Additional context
I'm thinking that an option can be added to kernel that waits the starting application to finish boot (by repeatedly reading ac_tab or waiting a finish message) before shutting down the node, so that everything can happen gracefully.

@zzydxm zzydxm added the bug Issue is reported as a bug label May 15, 2024
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label May 20, 2024
@sverker sverker added the help wanted Issue not worked on by OTP; help wanted from the community label May 28, 2024
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 help wanted Issue not worked on by OTP; help wanted from the community team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

3 participants