pdlib icon indicating copy to clipboard operation
pdlib copied to clipboard

segmentation fault in php-fpm

Open stavrak opened this issue 5 years ago • 14 comments

Issue: When i add the extension into the php.ini, php-fpm is not starting anymore returning segmentation fault.

Background: After seting the env variable for the pkg config (necessary for me to compile dlib, see https://discuss.getsol.us/d/5423-compiled-library-not-found/2) and installing lang/gcc before running ./configure (otherwise i got a library lstdc++ not found during make) i finally got it compiled. But if i add it to the php.ini the php-fpm service fails with segmentation fault.

System: Nextcloud plugin (12.1-RELEASE-p10) running on trueNas (TrueNAS-12.0-RELEASE) as jail (container). php version: 7.4.12

stavrak avatar Dec 01 '20 14:12 stavrak

I have the same issue on TrueNAS-12.0-U1 and PHP 7.4.13, ie. seg fault when starting php. Tried as well in a separate jail without php-fpm - same result. Frustratingly even with all logging enabled in php.ini there isn't a trace of a log anywhere.

edit: Does it choke on reading a locale file?

gbd: Program received signal SIGSEGV, Segmentation fault. 0x00000008017f66d8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1 (gdb) bt full #0 0x00000008017f66d8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1 No symbol table info available. #1 0x0000000802ae1476 in __dynamic_cast () from /usr/local/lib/gcc9/libstdc++.so.6 No symbol table info available. #2 0x0000000802b63fae in bool std::has_facet<std::ctype >(std::locale const&) () from /usr/local/lib/gcc9/libstdc++.so.6 No symbol table info available. #3 0x0000000802b55cf4 in std::basic_ios<char, std::char_traits >::_M_cache_locale(std::locale const&) () from /usr/local/lib/gcc9/libstdc++.so.6 No symbol table info available. #4 0x0000000802b56190 in std::basic_ios<char, std::char_traits >::init(std::basic_streambuf<char, std::char_traits >*) () from /usr/local/lib/gcc9/libstdc++.so.6 No symbol table info available. #5 0x0000000802af5583 in std::ios_base::Init::Init() () from /usr/local/lib/gcc9/libstdc++.so.6 No symbol table info available. #6 0x000000080220f07e in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /usr/local/lib/gcc9/include/c++/iostream:74 No locals. #7 0x000000080220f0e5 in _GLOBAL__sub_I_pdlib.cc(void) () at /root/pdlib-1.0.2/pdlib.cc:308 No locals. #8 0x00000008006902fd in ?? () from /libexec/ld-elf.so.1 No symbol table info available. #9 0x00007fff00000000 in ?? () No symbol table info available. #10 0x0000000000000000 in ?? () No symbol table info available.

truss: .... open("/usr/share/locale/en_US.UTF-8/LC_CTYPE",O_RDONLY,013720646057) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=5668,size=49880,blksize=50176 }) = 0 (0x0) mmap(0x0,49880,PROT_READ,MAP_PRIVATE,3,0x0) = 34409959424 (0x802fe5000) close(3) = 0 (0x0) munmap(0x802fe5000,49880) = 0 (0x0) SIGNAL 11 (SIGSEGV) code=SEGV_ACCERR trapno=12 addr=0x8017f66d8 process killed, signal = 11

OliverPA77 avatar Jan 12 '21 21:01 OliverPA77

hm, I'm stuck at the same point. I will try on a vanilla freebsd system to see if this is related to FreeNAS

rezeptpflichtig avatar Feb 26 '21 09:02 rezeptpflichtig

freebsd-12.2-p6 truss: .... munmap(0x801800000,2097152) = 0 (0x0) SIGNAL 11 (SIGSEGV) code=SEGV_MAPERR trapno=12 addr=0x804d255f0 process killed, signal = 11 (core dumped)

And gdb: (gdb) bt full #0 0x0000000804d255f0 in ?? () No symbol table info available. #1 0x0000000800e65491 in __cxa_finalize () from /lib/libc.so.7 No symbol table info available. #2 0x0000000800df7ed1 in exit () from /lib/libc.so.7 No symbol table info available. #3 0x000000000099c189 in main (argc=1, argv=0x7fffffffebe0) at sapi/cli/php_cli.c:1397 c = -1 exit_status = 0 module_started = 1 sapi_started = 1 php_optarg = 0x0 php_optind = 1 use_extended_info = 0 ini_path_override = 0x0 ini_entries = 0x80117e000 "html_errors=0\nregister_argc_argv=1\nimplicit_flush=1\noutput_buffering=0\nmax_execution_time=0\nmax_input_time=-1\n" ini_entries_len = 110 ini_ignore = 0 sapi_module = 0xa2c240 <cli_sapi_module>

adeepn avatar May 24 '21 10:05 adeepn

Hi, Is there any update on this? I encountered the same problem..

Thanks Jail version: 12.2-RELEASE-p6 image

b10102016 avatar Oct 11 '21 17:10 b10102016

Hello, I am having the same issue on a vanilla FreeBSD system ( FreeBSD 13.0-RELEASE-p4 ) Are there any fixes?

SeqBra avatar Jan 14 '22 04:01 SeqBra

Performing sanity check on php-fpm configuration: Segmentation fault

no way of getting pdlib running on freebsd with php8

qudiqudi avatar Jan 27 '22 23:01 qudiqudi

Clean build on freebsd 13.1 with php8.0.19, dlib install from ports or from okg still showing segmentation fault for php-fpm.

jasonhensler avatar May 27 '22 14:05 jasonhensler

Still seg faults when building on freebsd. It's building fine but starting php-fpm with the extension seg faults. Using pkg dlib-cpp-19.22, php80

make test results in *** Error code 139

qudiqudi avatar Sep 21 '22 18:09 qudiqudi

Still seg faults when building on freebsd. It's building fine but starting php-fpm with the extension seg faults. Using pkg dlib-cpp-19.22, php80

make test results in *** Error code 139

I just ran into this issue today as well on TrueNAS-13.0-U2. Hoping there might be a fix sometime so I can get FaceRecognition installed.

Lexden12 avatar Sep 29 '22 06:09 Lexden12

Could reproduce this error in freebsd with php 7.4 too

brennoflavio avatar Dec 06 '22 05:12 brennoflavio

dito on php 8.2.17

christianguenter1 avatar Apr 02 '24 23:04 christianguenter1