-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Deadlock in jemalloc when a signal occurs in malloc and hhvm bt_handler() tries to malloc again #4533
Labels
Comments
Looks like it's hanging while trying to generate the stacktrace, I'm pretty sure |
wjywbs
added a commit
to wjywbs/hhvm
that referenced
this issue
Jan 26, 2015
…oid deadlock. jemalloc is most likely crashed and acquired its lock if it's found in the stacktrace. Be conservative and avoid malloc again and deadlock. Part of facebook#4533 and facebook#2408.
wjywbs
added a commit
to wjywbs/hhvm
that referenced
this issue
Feb 12, 2015
…andler. This specifies the maximum number of seconds spent for generating a stack trace when hhvm is crashed. The default is 0 which means no timeout. This can be set to prevent from deadlocks in the backtrace handler. Part of facebook#4533 and facebook#2408.
hhvm-bot
pushed a commit
that referenced
this issue
Feb 14, 2015
…andler. Summary: This specifies the maximum number of seconds spent for generating a stack trace when hhvm is crashed. The default is 0 which means no timeout. This can be set to prevent from deadlocks in the backtrace handler. Part of #4533 and #2408. Closes #4828 Reviewed By: @markw65 Differential Revision: D1844818 Pulled By: @fredemmott
Fixed by d43f26b. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added a fopen() in Logger::log() if the output file is closed. (I'm not sure if this is related to this issue.) This doesn't happen very often, but all threads deadlock in jemalloc.
So a signal occurred in malloc() with its lock locked, and hhvm tried to print the stack trace. fill_bfd_cache() called bfd_openr(), which tried to fopen() again and malloc tried to acquire lock again.
I have several questions:
VMRegAnchor _;
in HHVM_FUNCTION(error_log)? I see that it does not use an anchor when writing to a destination file.ini_set('log_errors', 0)
in php, orini_set('error_log', 'file')
(handled by hphp/runtime/base/request-injection-data.cpp). Should this only affect the current script, instead of closing/replacing the main log file?Thanks.
The text was updated successfully, but these errors were encountered: