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

stop using pthread_cancel() #2619

Closed
wants to merge 5 commits into from
Closed

Conversation

methane
Copy link
Contributor

@methane methane commented Mar 19, 2024

I used much time to reproducer for #2615.

I saw many strange "defunct" (zombie) workers. The master called waitpid(-1, ...) but it return 0 even there are some zombies. Finally, master sends KILL signal (MERCY) and worker is restarted.

I believe this strange zombie was born from pthread_cancel. Subthreads calls pthread_cancel() for main thread and it cause strange process.

pthread_cancel() is very hard to use and debug. I can not even attach the strange zombie with gdb --pid. I think it is not maintainable.

core/uwsgi.c Show resolved Hide resolved
core/uwsgi.c Show resolved Hide resolved
@xrmx
Copy link
Collaborator

xrmx commented Apr 7, 2024

Squashed and merged in #2627. Thanks!

@xrmx xrmx closed this Apr 7, 2024
@methane methane deleted the dont-thread-cancel branch July 8, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants