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
FastCGI / Crash with Jemalloc: Failed assertion: "pageind >= map_bias" #221
Comments
thanks for reporting the problem:
|
For (1), I follow instruction in monkey website http://monkey-project.com/documentation/1.6/getting_started/debian_ubuntu.html to install 1.6.6. |
I was unable to reproduce the segfault problem on v1.6.6. Would you please share the PHP script content ? |
I will try again later today and get back on (1). I uninstalled it last night to make sure it won't conflict with the compile version. The test php is very simple: <?php
echo 'Hello!'
?> |
Hmm, actually if I use instruction from that link and do apt-get, I get 1.6.5 as below. So the monkey-project.com repo hasn't update yet.
Run from command line
uname info:
Installed package info:
|
Compiled 1.6.6 and test, it crashed also:
|
For 1.6.6, if I do "./configure --malloc-libc --local", then it won't crash when I load php page with fastcgi. |
Thanks for catching that. I was able to reproduce the problem, it only happens when using the Jemalloc memory allocator. I will try to find the root cause... |
researchwith jemalloc enabled and debug symbols, valgrind reports the following:
|
I tested jemalloc 3.x and the latest 4.0.4, same issue, I've requested assistance from the Jemalloc dev team: http://www.canonware.com/pipermail/jemalloc-discuss/2015-December/001219.html |
Should we split the two issues ... hmm ... into two issues? LOL |
Not required, master branch (development) have been updated with the right API usage: 4c43976: Plugins: fastcgi: fix usage of config API - Eduardo Silva |
When Monkey is built with Jemalloc, when the plugin release the resources associated to a FastCGI request, it crash. Jemalloc reports the following error: Failed assertion: "pageind >= map_bias" This problem happens because when the plugin compose the FastCGI request internally, it needs to duplicate some string buffers and it was using a direct strdup(3) call, which is wrong as Monkey provides wrappers for memory and string manipulation which use the system allocator (malloc) or the jemalloc functions. The problem was: - Duplicate string buffer with strdup(3) - Release buffer with Jemalloc This patch fix the single line that generated the problem. Signed-off-by: Eduardo Silva <eduardo@monkey.io>
I have ran into fast-cgi core dump issue with monkey 1.6.6. After research I notice there is a fix for it already, so I cloned the master branch and compiled it, but I ran into another issue:
But I do have the fastcgi.conf. Following are related conf files:
plugins.load
fastcgi.conf
The text was updated successfully, but these errors were encountered: