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

Terminate is freezing #3946

Closed
aviz opened this issue May 31, 2020 · 1 comment
Closed

Terminate is freezing #3946

aviz opened this issue May 31, 2020 · 1 comment

Comments

@aviz
Copy link

aviz commented May 31, 2020

Please use this template for reporting suspected bugs or requests for help.

Issue description

With the following stack
Apache / PHP / ZeroMQ.

When apache decides to close a worker and fork a new one, ZeroMQ Lib is freezing the termination process and causing the worker not to die.
Following is the stack trace.
apache calling php terminate which calls zmq terminate.
zmq::ctx_t::terminate passes -1 as the timeout to zmq::mailbox_t::recv which means endless timeout, thus the process freezing.

#0  0x00007fe9a8db2bed in poll () from /lib64/libc.so.6
#1  0x00007fe9970eaaca in zmq::signaler_t::wait(int) () from /lib64/libzmq.so.5
#2  0x00007fe9970cf870 in zmq::mailbox_t::recv(zmq::command_t*, int) () from /lib64/libzmq.so.5
#3  0x00007fe9970bdddc in zmq::ctx_t::terminate() () from /lib64/libzmq.so.5
#4  0x00007fe9971025b8 in zmq_ctx_term () from /lib64/libzmq.so.5
#5  0x00007fe997325238 in php_zmq_context_destroy (context=0x560cc9e21660) at /var/tmp/zmq/zmq.c:145
#6  0x00007fe997325252 in php_zmq_context_dtor (res=0x560cc9ccb780) at /var/tmp/zmq/zmq.c:2752
#7  0x00007fe9a563e58e in plist_entry_destructor () from /usr/lib64/httpd/modules/libphp7.so
#8  0x00007fe9a563b378 in zend_hash_graceful_reverse_destroy () from /usr/lib64/httpd/modules/libphp7.so
#9  0x00007fe9a5628e08 in zend_shutdown () from /usr/lib64/httpd/modules/libphp7.so
#10 0x00007fe9a55c669b in php_module_shutdown () from /usr/lib64/httpd/modules/libphp7.so
#11 0x00007fe9a55c6759 in php_module_shutdown_wrapper () from /usr/lib64/httpd/modules/libphp7.so
#12 0x00007fe9a56c5a11 in php_apache_child_shutdown () from /usr/lib64/httpd/modules/libphp7.so
#13 0x00007fe9a94c61ae in apr_pool_destroy () from /lib64/libapr-1.so.0
#14 0x00007fe9a86b21dc in clean_child_exit () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#15 0x00007fe9a86b2687 in child_main () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#16 0x00007fe9a86b29f5 in make_child () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#17 0x00007fe9a86b368e in prefork_run () from /usr/lib64/httpd/modules/mod_mpm_prefork.so
#18 0x0000560cc7e7dffe in ap_run_mpm ()
#19 0x0000560cc7e76d76 in main ()

Environment

centos 7, php 7, zmqlib 4.1.4

  • libzmq version (commit hash if unreleased): zmqlib 4.1.4 (installed from centos)
  • OS: Linux Centos 7

Minimal test code / Steps to reproduce the issue

What's the actual result? (include assertion message & call stack if applicable)

after a while, apache processes stating to hang.

What's the expected result?

apache to be able to close a worker..

@aviz
Copy link
Author

aviz commented Jun 2, 2020

I am closing this issue due to patch that i've created in our local code.

@aviz aviz closed this as completed Jun 2, 2020
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

No branches or pull requests

1 participant