Bug #81316 [Asn->Fbk]: Segmentation fault
| From: | cmb@php.net | Date: | Tue, 03 Aug 2021 21:18:00 +0000 |
| Subject: | Bug #81316 [Asn->Fbk]: Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235580@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81316&edit=1
ID: 81316
Updated by: cmb@php.net
Reported by: kontakt at xlu dot pl
Summary: Segmentation fault
-Status: Assigned
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: FreeBSD 12.2-RELEASE-p5
PHP Version: 7.3.29
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks! The loaded extensions are unlikely to be an issue per se,
but PHP 7.3.29 is no longer actively supported. Please check with
PHP 7.4.22 or 8.0.9.
Previous Comments:
------------------------------------------------------------------------
[2021-08-03 21:01:56] kontakt at xlu dot pl
PHP v 7.3.29
php -m
[PHP Modules]
Core
date
imap
json
libxml
mbstring
mysqlnd
pcre
PDO
Reflection
session
SPL
standard
[Zend Modules]
------------------------------------------------------------------------
[2021-08-03 10:18:31] cmb@php.net
Okay, thanks for clarification. So the connection error is
unrelated to the segfault which happens during shutdown.
Can you reproduce this with any of the actively supported PHP
versions[1]? If so, please list all enabled extensions (php -m).
[1] <https://www.php.net/supported-versions.php>
------------------------------------------------------------------------
[2021-08-02 19:01:31] kontakt at xlu dot pl
I did it again with the correct SMTP address:
$ php artisan handesk:parseNewEmails
Done
Segmentation fault (core dumped)
Check composer package:
./vendor/php-imap/php-imap/src/PhpImap/Mailbox.php
Line:
protected function initImapStream() {
$imapStream = @imap_open($this->imapPath, $this->imapLogin,
$this->imapPassword, $this->imapOptions, $this->imapRetriesNum, $this->imapParams);
if(!$imapStream) {
throw new Exception('Connection error: ' . imap_last_error());
}
return $imapStream;
}
------------------------------------------------------------------------
[2021-07-30 21:10:04] hanskrentel at yahoo dot de
Please re-validate your report, At least the reference to the test-script looks disconnected to the
test-tree given as
https://github.com/BadChoice/handesk/blob/1.4.2/app/Services/Pop3/Mailbox.php
has no line number 67.
------------------------------------------------------------------------
[2021-07-30 20:07:28] kontakt at xlu dot pl
Description:
------------
After installation as per the guide:
https://github.com/BadChoice/handesk/tree/1.4.2
I am getting the problem:
$ php artisan handesk:parseNewEmails
In Mailbox.php line 67:
Connection error: No such host as smtp.yourmail.com
Segmentation fault (core dumped)
TB:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000800b499e0 in strncmp () from /lib/libc.so.7
#0 0x0000000800b499e0 in strncmp () from /lib/libc.so.7
#1 0x0000000800b450e8 in getenv () from /lib/libc.so.7
#2 0x00000000004e0ae9 in module_destructor ()
#3 0x00000000004d7c11 in module_destructor_zval ()
#4 0x00000000004eac38 in zend_hash_graceful_reverse_destroy ()
#5 0x00000000004d7d14 in zend_shutdown ()
#6 0x0000000000473beb in php_module_shutdown ()
#7 0x0000000000591346 in main ()
The problem already without full configuration. Just crete database in .env and install on the
official readme.
The code tested causes a segmentation fault for php versions: 7.2.x, 7.3.x, 7.4.x.
Test script:
---------------
https://github.com/BadChoice/handesk/tree/1.4.2
Actual result:
--------------
Segmentation Fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81316&edit=1