mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #18] worker process exited on signal 11 #145
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SionInory on GitHub (Jan 15, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/18
I use a docker web tools called
Portainer,when I try to access it,the nginx occured error.I also find that when
waf_mode STD;,the error occurred,whenwaf_mode CC;,the nginx runs well.@ADD-SP commented on GitHub (Jan 15, 2021):
先说个题外话,从您的 Github 活动记录来看猜测是中国人,如果是的话以后用中文交流吧。
Looking at your activity record in Github, I think you are Chinese, if so, let's communicate in Chinese, if not, let's continue in English.
Hi, Could you please tell me the version of
ngx_waf, the version ofNGINXand the output ofnginx -V.@SionInory commented on GitHub (Jan 15, 2021):
ngx_waf的版本是最新master分支的版本使用的是动态模块加载
@ADD-SP commented on GitHub (Jan 15, 2021):
我是用
nginx-1.19.6、Docker 镜像portainer/portainer和 master 分支的ngx_waf,并未复现此问题。nginx 配置
可不可以用
gdb调试一下core文件,看看代码挂在哪一行?记得修改编译参数关掉优化。我同时测试了
nginx-1.18.0,也没有问题。鉴于您的 nginx 版本属于开发版,可能不稳定,是否可以使用nginx-1.18.0重新测试一下呢?@SionInory commented on GitHub (Jan 15, 2021):
抱歉,对于
nginx模块的编写不大熟悉,可能无法为你提供有效的帮助。但经过我的测试,只有当服务配置了
ssl访问的时候,才会出现此问题,并且当waf_mode STD;,waf_rule_path被注释时,不会出现该问题。附上我的
nginx配置。@ADD-SP commented on GitHub (Jan 15, 2021):
复制了配置还是无法复现。您的 nginx 是安装宿主机上还是 docker 里呢?如果在 docker 里是哪个 docker 镜像呢?
调试
core文件并不需要您了解nginx模块开发,您可以抽空按照下列步骤操作。configure脚本的参数--with-cc-opt='xxxx -g -O3 xxx'修改为--with-cc-opt='xxxx -g -O0 xxx'。nginx,重新编译nginx及模块,并进行替换。nginx.conf顶部添加一行worker_rlimit_core 10000m;。ulimit -c unlimited。nginx,并记住当前 shell 的目录。Portainer页面,触发错误。nginx的日志目录下生成core文件,或者在启动nginx时 shell 所在的目录。gdb nginx /path/to/core。@ADD-SP commented on GitHub (Jan 15, 2021):
另一个问题,访问
Portainer页面会出错,访问其它页面呢?比如一个本地的静态网页文件。规则文件是否为默认的规则文件?如果不是那么做了哪些改动?@SionInory commented on GitHub (Jan 15, 2021):
我的
nginx是装在Docker中的,使用的是latest镜像,规则文件为默认规则文件,访问其他页面的日志如下,待我调试过
core文件后,将内容发给您。@SionInory commented on GitHub (Jan 15, 2021):
我得到了三个
core文件,分别为core.9373core.9554core.9555core.9373其余两个
core出错位置均与第一个相同@ADD-SP commented on GitHub (Jan 15, 2021):
我大概猜了一下出错的地方,不知道有没有用。您可以按照下面的步骤重新测试。
ngx_waf的目录,执行git pull --force && git checkout -b bugfix-SIGSEGV origin/bugfix-SIGSEGV。configure脚本的参数不变,但是要重新执行一遍configure脚本。nginx。nginx及其模块,编译完毕后进行替换。nginx。Portainer页面,检查是否出现worker process exited on signal 11错误。Portainer页面可能出现错误,这是由默认规则导致的,可以用过查看error.log并删除指定规则来解决。core文件时的输出。如果没有出错请告知并关闭本 issue。注意,本次修复是在
ngx_waf的测试版上进行的修复,测试版的其它改动见 v3.0.3-beta-3。@SionInory commented on GitHub (Jan 16, 2021):
十分感谢,问题已经解决。