Bug 240408 - lang/php7x core dumped. Reason: php7x-imap module (new issue)
Summary: lang/php7x core dumped. Reason: php7x-imap module (new issue)
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-08 07:43 UTC by A Sharp
Modified: 2019-09-10 23:54 UTC (History)
2 users (show)

See Also:
w.schwarzenfeld: maintainer-feedback? (tz)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A Sharp 2019-09-08 07:43:14 UTC
All,

Was updating an instance and ran into a bug that's also related to imap module.

Release 12.0-p10 with latest version of port for php72 as well as php73.  

If imap is disabled, PHP (with/without ZTS) works fine:

PHP 7.3.9 (cli) (built: Sep  8 2019 02:59:59) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.9, Copyright (c) 1999-2018, by Zend Technologies


If imap is enabled for either version (with/without ZTS), "php -v" results in a core dump.

Debugging:

GNU gdb (GDB) 8.3 [GDB v8.3 for FreeBSD]
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd12.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...
(gdb) run php -v
Starting program: /usr/local/bin/php php -v

Program received signal SIGSEGV, Segmentation fault.
0x0000000800af090c in strcmp () from /lib/libc.so.7
(gdb)
Comment 1 Torsten Zuehlsdorff freebsd_committer 2019-09-10 22:21:31 UTC
I am afraid, I can't reproduce this bug. I tested it on 11.2 and 12.0 (both amd). I started a new jail in poudriere, compiled the extension and than called "php -v" - everything fine.

Maybe its due to an combination of modules, which has happened before. Can you show an "php -m" or "pkg info | grep php" please?

Greetings,
Torsten
Comment 2 A Sharp 2019-09-10 23:54:32 UTC
Absolutely!

[PHP Modules]
bcmath
calendar
Core
ctype
date
dom
exif
fileinfo
filter
gd
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

FYI - had not considered that it may be a combination of modules.  Simply went through the process of elimination.  eg: remove all (by commenting line item in files located in /usr/local/etc/php) and then add one at a time back into the mix (running php -v to verify) and the first failure was when imap was placed back into the mix.

Other details that may be pertinent (or not):
- /etc/make.conf includes WITH_MPM=event
- Also using mod-php
- All components are built from /usr/ports and not installed via "pkg install"

Thanks!