-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pear install: error in malloc_consolidate #8185
Comments
Hello I was not able to reproduce with php 8.1.4 zts on ubuntu 20 with the following command:
Do you have any extensions installed ? What is the output of |
pear command is:
so no comfig is used.
gcc version 12.0.1
|
I tried reproducing with the same configure command, with no luck. Here is the docker file I used:
(I've just removed some shared extensions from the configure command.) |
this is strange - it even happens with my latest backport of php 8.1.5: Do you have a negative return code of pear-install? What version of glibc are you using? I've just checked glibc, but I don't see when fastbins are used and when normal bin used during malloc. And this test is only active on "fastbins". |
Here is a Dockerfile based on mageia 8 and your backport packages:
Here is the output of
Unfortunately, the pear command returns successfully. Could you try to adapt this dockerfile to match your environment ? |
I can confirm this one working. But
raises an exception (core dump). |
Thank you, I can reproduce the issue now :) Running the command with
The extension in
The crash does not happen with GC disabled, or if |
I will try to dig into this near Friday (unless someones does it first). Updated Dockerfile with debuginfo and tools:
|
I'm glad it is now reproduceable. I'm wondering why this only happens, if the file is given via command line and not, if it is downloaded by php itself. Strange - but some bugs are ;) |
I dug into this bug again today: The problem happens because pear is loading the A workaround for this problem is to load the zlib extension earlier by using the extension directive. Currently the manual for |
@arnaud-lb I believe Line 2973 in 733023b
|
This removes entries from So that would be the actual issue. A possible fix would be that temporary modules unregister from |
I've added the zlib extension to the list of modules at startup for pear. It works. But I leave this one open, in case you found sth. to worry about. Since this can happen in any other case, it might be worth try to omit this error. |
Thank you for confirming this. A fix is ongoing at #8435 |
Fixed in #8435 Thank you @mokraemer |
@nikic @arnaud-lb , is this fix available in php 7.4 ? |
@HeenaBansal2009 this has been fixed in 8.1, but not in 7.4 because this version is not supported anymore (see https://www.php.net/supported-versions.php). |
Thanks @arnaud-lb for quick response. Is this fix not available in 8.0 as well.? I updated my image to latest version 8..0.30 but still being this issue.Please confirm. |
8.0 is not supported anymore either (except for security issues) |
Description
pear install raises error on shutdown in conjunction with ZTS:
pear -c pearrc install --nodeps --packagingroot /root/php-pear-Calendar/BUILDROOT/php-pear-Calendar-0.5.5-10.mga9.x86_64 /root/php-pear-Calendar/SOURCES/Calendar-0.5.5.tgz
shows the followin error in strace:
malloc_consolidate(): unaligned fastbin chunk detected
#0 0x00007f6d9bac5bec in __pthread_kill_implementation () from /lib64/libc.so.6
#1 0x00007f6d9ba792f2 in raise () from /lib64/libc.so.6
#2 0x00007f6d9ba65457 in abort () from /lib64/libc.so.6
#3 0x00007f6d9baba788 in __libc_message () from /lib64/libc.so.6
#4 0x00007f6d9bace98a in malloc_printerr () from /lib64/libc.so.6
#5 0x00007f6d9bacf41c in malloc_consolidate () from /lib64/libc.so.6
#6 0x00007f6d9bad0800 in _int_free () from /lib64/libc.so.6
#7 0x00007f6d9bad2a4b in free () from /lib64/libc.so.6
#8 0x00000000008856e5 in root_buffer_dtor (gc_globals=0x27244f0) at /usr/src/debug/php-8.1.3-2.mga9.x86_64/Zend/zend_gc.c:425
#9 0x0000000000784154 in tsrm_shutdown () at /usr/src/debug/php-8.1.3-2.mga9.x86_64/TSRM/TSRM.c:194
#10 0x00000000006402b7 in main (argc=31, argv=0x2722da0) at /usr/src/debug/php-8.1.3-2.mga9.x86_64/sapi/cli/php_cli.c:1388
This is a new issue in PHP 8.1 with 8.0.x no error is raised.
PHP Version
php 8.1.3
Operating System
Mageia 8
The text was updated successfully, but these errors were encountered: