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

Forced termination of aiotools.fork is not working on macOS #3033

Open
jopemachine opened this issue Nov 6, 2024 · 0 comments
Open

Forced termination of aiotools.fork is not working on macOS #3033

jopemachine opened this issue Nov 6, 2024 · 0 comments
Labels
type:bug Reports about that are not working

Comments

@jopemachine
Copy link
Member

jopemachine commented Nov 6, 2024

What Operating System(s) are you seeing this problem on?

macOS 15.0.1

Backend.AI version

main

Describe the bug

After sending a SIGINT signal, if the process does not terminate within a specified period, aiotool.afork() sends a SIGKILL signal to forcibly terminate the process.

This mechanism works without issues on Linux, where it operates via PidfdChildProcess, but it is not functioning on macOS.

Debugging results suggest that the issue may be related to the timing of setting self._terminated to True.

This may be an upstream issue with aiotools, but as it is also affecting the behavior of Backend.AI, I am creating an issue for it.

To Reproduce

  1. Start the Backend.AI manager server.
  2. Shut down the Redis container.
  3. Press Ctrl + C to send the SIGINT signal.
  4. Although below log appear, the SIGKILL signal is not actually sent. So, the manager process also does not terminate.
2024-11-06 14:26:38.036 WARNING aiotools.server [10753] Timeout during waiting for child processes; killing all

Note

This example uses the manager component, but the issue can be reproduced with other components as well.

Expected Behavior

The SIGKILL signal is sent successfully, and the manager process terminates.
(Behavior on Linux.)

Anything else?

None

@jopemachine jopemachine added the type:bug Reports about that are not working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Reports about that are not working
Projects
None yet
Development

No branches or pull requests

1 participant