Reproduced with different version (from 2.1.23-15.el6_6.2 to 2.1.26-25.2.fc23) In PHP when a module uses sasl, it have to call sasl_done in its module shutdown process. That's OK. But when multiple module use sasl, they all call sasl_done, and this raise a segfault. Ex: #0 0x00007f6487507ad0 in ?? () #1 0x000000303ee08fab in client_done () at client.c:109 #2 0x000000303ee0b329 in sasl_done () at common.c:653 #3 0x00007f648797cc00 in zm_shutdown_mongo (type=<value optimized out>, module_number=<value optimized out>) at /usr/src/debug/php-pecl-mongo-1.6.14/NTS/php_mongo.c:399 #4 0x00000000005eed55 in module_destructor (module=0x1875630) at /usr/src/debug/php-5.6.26/Zend/zend_API.c:2415 #5 0x00000000005f606a in i_zend_hash_bucket_delete (ht=0x9f0020, p=0x18755d0) at /usr/src/debug/php-5.6.26/Zend/zend_hash.c:182 #6 zend_hash_bucket_delete (ht=0x9f0020, p=0x18755d0) at /usr/src/debug/php-5.6.26/Zend/zend_hash.c:192 #7 0x00000000005f6328 in zend_hash_graceful_reverse_destroy (ht=0x9f0020) at /usr/src/debug/php-5.6.26/Zend/zend_hash.c:613 #8 0x00000000005e9282 in zend_shutdown () at /usr/src/debug/php-5.6.26/Zend/zend.c:836 #9 0x0000000000585e4a in php_module_shutdown () at /usr/src/debug/php-5.6.26/main/main.c:2477 #10 0x000000000068ff35 in main (argc=2, argv=0x1788e20) at /usr/src/debug/php-5.6.26/sapi/cli/php_cli.c:1393 Affected modules (identified for now) - php-pecl-mongo - php-pecl-mongodb - php-smbclient (not using directly sasl, but via libsmbclient) Upstream bug reports: - https://jira.mongodb.org/browse/PHPC-658 - https://github.com/eduardok/libsmbclient-php/issues/39 Any help on this issue will be very welcome.
Sorry, in fact I only reproduce with 2.1.23 on RHEL-6
How exactly can we reproduce your segfault in RHEL6? lib/client.c: 109 sasl_MUTEX_FREE(cmechlist->mutex); It looks like double free() or similar stuff. Is possible that the calling library forks/threads and calls sasl_done() in both versions?
For now, there is not enough packages in RHEL + EPEL to reproduce (will search more later), for now I can reproduce with PHP packages from my repository (remi-safe + remi-php56) [1] php php-bcmath php-cli php-common php-gd php-gmp php-horde-horde-lz4 php-imap php-intl php-ldap php-mbstring php-mcrypt php-mysqlnd php-pdo php-pecl-apfd php-pecl-geoip php-pecl-http php-pecl-jsonc php-pecl-json-post php-pecl-lzf php-pecl-memcache php-pecl-mongo php-pecl-mongodb php-pecl-oauth php-pecl-propro php-pecl-raphf php-pecl-ssh2 php-pecl-zip php-process php-smbclient php-tidy php-twig php-xml A simple "php --version" trigger the segfault [1] https://rpms.remirepo.net/
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.