Closed Neko-Chang-Taiwan closed 3 years ago
Hi @Neko-Chang-Taiwan,
We going to understand the crash a little bit further. For that, a backtrace of the crash will be very useful. Do you think you can grab such information?
Hi @zimmerle and @victorhora
Thanks your replied. Of course.
I reported at thread of https://forums.freebsd.org/threads/modsecurity-v3-for-freebsd-doesnt-want-to-compile-build.65230/ in FreeBSD forum also because modsecurity-apache connector into FreeBSD ports collection. And I tried to debug by gdb, and got result from forum's thread as below . (I tried to place these information into block 'Insert code', but line break work improperly)
(gdb) core httpd.core [New LWP 101164] bCore was generated by "/usr/local/sbin/httpd". Program terminated with signal SIGSEGV, Segmentation fault.
(gdb) where
from /usr/local/lib/gcc8/libstdc++.so.6
mode=258, lockstate=0x800000002) at /usr/src/libexec/rtld-elf/rtld.c:3389
at /usr/src/libexec/rtld-elf/rtld.c:3264
(gdb)
Note: Assign gcc8 to build it in ports collection. Beside a little question: Both ModSecurity-apache and libmodsecurity work fine by Clang/LLVM make?
I hope it can be help you. Please tell me next debug method/information.
Hi @Neko-Chang-Taiwan,
Thank you for the details.
ModSecurity can be compiled with clang as well. As a matter of fact, we also use clang in our buildbots, as you can check here - https://travis-ci.org/SpiderLabs/ModSecurity
Hi @zimmerle and @victorhora
Because modsecurity 3 upgrade to 3.0.4, so tried again. Got same issue, GDB result as below (gdb) core httpd.core [New LWP 101190] Core was generated by `/usr/local/sbin/httpd'. Program terminated with signal SIGSEGV, Segmentation fault.
(gdb) where
All of debug symbol disappeared I have not idea to next step, can help me?
Thanks a lot.
Today, I think about this issue and gdb output. I found a keyword 'GCC'
So I tried to remove knob of "USE_GCC= yes" @ security/modsecurity3/Makefile and rebuild LLVM/clang 10 @ FreeBSD 12. Apache24 start successful and worked as below message [Wed Feb 10 19:36:53.893064 2021] [:notice] [pid 15168:tid 34370637824] ModSecurity: ModSecurity-Apache v0.1.1-beta configured. [Wed Feb 10 19:36:53.992024 2021] [mpm_event:notice] [pid 65772:tid 34370637824] AH00489: Apache/2.4.46 (FreeBSD) OpenSSL/1.1.1i configured -- resuming normal operations [Wed Feb 10 19:36:53.996304 2021] [core:notice] [pid 65772:tid 34370637824] AH00094: Command line: '/usr/local/sbin/httpd'
In the time, minimize configuration.
Thanks a lot.
Hi All:
I trying use modsecurity3 with Apache 2.4 on FreeBSD 12.0 amd64. I pulled latest commit for modsecurity-apache connector and build successful. (Output: /usr/local/libexec/apache24/mod_security3.so) And add below line into httpd.conf (Exist modsecurity2 removed). LoadModule security3_module libexec/apache24/mod_security3.so
Start Apache but got error as below. .# service apache24 restart Performing sanity check on apache24 configuration: Segmentation fault (core dumped)
FreeBSD default compiler: Clang/LLVM 6.0.1. Build by "gcc8" got same issue.
Please let me know what is going wrong/debug hint. Thanks a lot.