openresty版本 openresty-1.19.3.2
平台:国产化平台龙芯3B4000 MIPS架构
通过 gdb ,调试 nginx的worker进程
报错信息如下:
Program received signal SIGSEGV, Segmentation fault.
ngx_http_lua_pcre_malloc_done (old_pool=0x0) at ../ngx_lua-0.10.15/src/ngx_http_lua_pcrefix.c:94
看源码ngx_http_lua_util.c:
ngx_int_t
ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
ngx_http_lua_ctx_t *ctx, volatile int nrets)
{
....
....
#if (NGX_PCRE)
/* XXX: work-around to nginx regex subsystem */
//ngx_http_lua_pcre_malloc_done(old_pool);
#endif
.....
}
然后调用
ngx_http_lua_pcrefix.c
void
ngx_http_lua_pcre_malloc_done(ngx_pool_t *old_pool)
{
dd("lua pcre pool was %p", ngx_http_lua_pcre_pool);
ngx_http_lua_pcre_pool = old_pool; //应该是因为 old_pool等于0x0导致的异常 。
dd("lua pcre pool is %p", ngx_http_lua_pcre_pool);
if (old_pool == NULL) {
pcre_malloc = old_pcre_malloc;
pcre_free = old_pcre_free;
}
}
请专家帮忙看看