Summary: | lang/php73: Bus error | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Pascal Christen <pascal.christen> |
Component: | Individual Port(s) | Assignee: | Torsten Zuehlsdorff <tz> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | i.dani, mfburdett, oliver, tz |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(tz) tz: merge-quarterly+ |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Pascal Christen
2018-11-06 12:37:16 UTC
You use the wordpress from the wp site? When you use the wordpress port (www/wordpress), do you get the same error? is this error only with wordpress? Or with other CMS? Typo3 for example. (In reply to Jochen Neumeister from comment #1) Yes I used the latest Wordpress from the https://wordpress.org/download/ site, Let me check other CMS later this week - sorry! (In reply to Jochen Neumeister from comment #1) ok, so: joomla: name="return" value="PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12298126926392233984 bytes) in Unknown on line 0 druapl: segmentation fault This could be related https://bugs.php.net/bug.php?id=76560 (In reply to Pascal Christen from comment #3) Hi Pascal :-) Thanks for the testing. Which version did you test it with? The day before yesterday, I committed version RC5. The bug was still with BETA2. I will also build and test a WM at the weekend. Let's hope the PHP developers fix that soon. (In reply to Jochen Neumeister from comment #4) Hi. Just verified it with the RC5. Same problems... (In reply to Jochen Neumeister from comment #4) Just built PHP with debug option and got a trace for the wokrdpress problem: Program received signal SIGSEGV, Segmentation fault. 0x0000000000599a26 in php_trim_int (str=0x5abb70 <php_addslashes_sse42>, what=0x802a1e658 "/", what_len=1, mode=3) at ext/standard/string.c:811 811 ext/standard/string.c: No such file or directory. (gdb) bt #0 0x0000000000599a26 in php_trim_int (str=0x5abb70 <php_addslashes_sse42>, what=0x802a1e658 "/", what_len=1, mode=3) at ext/standard/string.c:811 #1 0x000000000059a247 in php_do_trim (execute_data=0x802c1f750, return_value=0x802c1e950, mode=3) at ext/standard/string.c:903 #2 0x0000000000599e02 in zif_trim (execute_data=0x802c1f750, return_value=0x802c1e950) at ext/standard/string.c:911 #3 0x00000000007fca2d in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (execute_data=0x802c1e3a0) at Zend/zend_vm_execute.h:690 #4 0x00000000007aeef4 in execute_ex (ex=0x802c1e030) at Zend/zend_vm_execute.h:55287 #5 0x00000000007af0fa in zend_execute (op_array=0x802c7e400, return_value=0x0) at Zend/zend_vm_execute.h:60834 #6 0x0000000000744fc4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at Zend/zend.c:1568 #7 0x000000000069ba9e in php_execute_script (primary_file=0x7fffffffda68) at main/main.c:2630 #8 0x000000000084eda2 in do_cli (argc=4, argv=0x7fffffffe0a0) at sapi/cli/php_cli.c:997 #9 0x000000000084de03 in main (argc=4, argv=0x7fffffffe0a0) at sapi/cli/php_cli.c:1390 Here for the joomla: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted at /wrkdirs/usr/ports/lang/php73/work/php-7.3.0RC5/Zend/zend_smart_str.c:41 (tried to allocate 13849063123295670240 bytes) in Unknown on line 0 PHP Stack trace: PHP 1. {main}() /home/myuser/www/myuser.hoster.ch/joomla3/index.php:0 PHP 2. Joomla\CMS\Application\SiteApplication->execute() /home/myuser/www/myuser.hoster.ch/joomla3/index.php:49 PHP 3. Joomla\CMS\Application\SiteApplication->doExecute() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Application/CMSApplication.php:195 PHP 4. Joomla\CMS\Application\SiteApplication->dispatch() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Application/SiteApplication.php:233 PHP 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Application/SiteApplication.php:194 PHP 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Component/ComponentHelper.php:357 PHP 7. require_once() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Component/ComponentHelper.php:382 PHP 8. ContentController->execute() /home/myuser/www/myuser.hoster.ch/joomla3/components/com_content/content.php:43 PHP 9. ContentController->display() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/MVC/Controller/BaseController.php:710 PHP 10. ContentController->display() /home/myuser/www/myuser.hoster.ch/joomla3/components/com_content/controller.php:113 PHP 11. ContentViewArticle->display() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/MVC/Controller/BaseController.php:672 PHP 12. ContentViewArticle->get() /home/myuser/www/myuser.hoster.ch/joomla3/components/com_content/views/article/view.html.php:42 PHP 13. ContentModelArticle->getItem() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/MVC/View/HtmlView.php:423 PHP 14. JError::raiseError() /home/myuser/www/myuser.hoster.ch/joomla3/components/com_content/models/article.php:152 PHP 15. JError::raise() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/legacy/error/error.php:277 PHP 16. JError::throwError() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/legacy/error/error.php:202 PHP 17. JError::handleCallback() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/legacy/error/error.php:241 PHP 18. JError::customErrorPage() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/legacy/error/error.php:780 PHP 19. Joomla\CMS\Exception\ExceptionHandler::render() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/legacy/error/error.php:797 PHP 20. Joomla\CMS\Application\SiteApplication->close() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/src/Exception/ExceptionHandler.php:128 PHP 21. JSessionHandlerJoomla->save() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/joomla/session/handler/native.php:0 PHP 22. session_write_close() /home/myuser/www/myuser.hoster.ch/joomla3/libraries/joomla/session/handler/native.php:194 [Inferior 1 (process 67650) exited with code 0377] Hope this helps to bring us further :) (In reply to Pascal Christen from comment #5) Hey Pascal. Thanks for the testing and the link. I hope the PHP team finds a patch soon. I will keep that in mind. I take the PR to me, because TZ is very busy at the moment. (In reply to Jochen Neumeister from comment #7) Ok thanks. But personally I'm not sure if we're facing the same issue with the "tried to allocate 12298126926392233984 bytes" and the wordpress error (See gdb output in #6). What do you think? related problems or 2 diffrent? Do we have any updates on this case? Do you need any additional information? Hello Pascal, i'm taking over the PR, but most likely i won't have much time until next year for it. Still lets harvest some important information: - Does this issue persist after the Release of 7.3.0? - Is there any PHP Bug entry? - Can you provide a new debug trace? From the trace you already added it looks like a bug in the trim() code. But before digging into the code, i want to make sure nothing had changed since then. :D Do you know any other user having the same issue? At the moment you are the only one. Greetings, Torsten (In reply to Torsten Zuehlsdorff from comment #10) Thanks for taking on this report. We have also been seeing this issue, so to answer your questions: 1. Yes, this issue is still there on PHP 7.3 release 2. No PHP bug entry that I can see 3. New stack trace (for WordPress 4.9.9) below. Apologies it isn't compiled with debug on, hope it's still useful. It at least shows that zif_trim is still involved. Core was generated by `php index.php'. Program terminated with signal 10, Bus error. (gdb) bt #0 0x00000000004d3260 in zif_trim () #1 0x0000000000622391 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () #2 0x00000000005d37f8 in execute_ex () #3 0x00000000005d39b6 in zend_execute () #4 0x000000000058e605 in zend_execute_scripts () #5 0x0000000000529dd2 in php_execute_script () #6 0x000000000064e889 in do_cli () #7 0x000000000064d822 in main () #8 0x0000000000423a25 in _start () #9 0x00000008009b7000 in ?? () #10 0x0000000000000000 in ?? () This is on FreeBSD 11.2-RELEASE-p6. PHP was compiled from ports today on our standard poudriere server. I didn't try WordPress but I saw similar issues with another PHP app on FreeBSD 11.2 and PHP 7.3.0 After upgrading to FreeBSD 12.0 the issue was resolved. See also https://bugs.php.net/bug.php?id=77284 Still having issues with php7.3 on freebsd 11.2 If you guys also have problem try to push these bugs: https://bugs.php.net/bug.php?id=77284 https://bugs.php.net/bug.php?id=77279 https://bugs.php.net/bug.php?id=77261 Hope we'll find a solution soon! :) https://github.com/php/php-src/commit/291589114aa9be899cf7d5d874c3b5bbdb35f336#diff-67e997bcfdac55191033d57a16d1408a Works for me Hello, from now on i have back a regular time to cope with this issues. The linked PRs look promising. Just to be sure: Pascal, you did apply the linked patch and it works? If so, i will add the patch, so we do not need to wait until the next release. Greetings, Torsten (In reply to Torsten Zuehlsdorff from comment #15) I tried the patch from #14 and can confirm it resolved the problem here. However I don't yet know what (if any) performance impact removing ifunc support has since it's currently a very lightly loaded server. (In reply to Torsten Zuehlsdorff from comment #15) Hi Thorsten Yes it works but don't know about side effects. Greetings Pascal A commit references this bug: Author: tz Date: Tue Jan 8 15:54:24 UTC 2019 New revision: 489721 URL: https://svnweb.freebsd.org/changeset/ports/489721 Log: lang/php73: Fix "Bus error (core dumped)" by disabling ifuncs PHP 7.3 uses ifuncs optimisations which generates a list of problems on FreeBSD: https://bugs.php.net/bug.php?id=77284 https://bugs.php.net/bug.php?id=77279 https://bugs.php.net/bug.php?id=77261 Therefore ifuncs will be disabled in PHP 7.3.1. To make it usable until the release, we import the patch until then: https://github.com/php/php-src/commit/291589114aa9be899cf7d5d874c3b5bbdb35f336 PR: 233024 Submitted by: Pascal Christen <pascal.christen@hostpoint.ch> MFH: 2019Q1 Changes: head/lang/php73/Makefile head/lang/php73/files/patch-acinclude.m4 head/lang/php73/files/patch-configure.ac A commit references this bug: Author: tz Date: Wed Jan 9 07:49:26 UTC 2019 New revision: 489755 URL: https://svnweb.freebsd.org/changeset/ports/489755 Log: MFH: r489721 lang/php73: Fix "Bus error (core dumped)" by disabling ifuncs PHP 7.3 uses ifuncs optimisations which generates a list of problems on FreeBSD: https://bugs.php.net/bug.php?id=77284 https://bugs.php.net/bug.php?id=77279 https://bugs.php.net/bug.php?id=77261 Therefore ifuncs will be disabled in PHP 7.3.1. To make it usable until the release, we import the patch until then: https://github.com/php/php-src/commit/291589114aa9be899cf7d5d874c3b5bbdb35f336 PR: 233024 Submitted by: Pascal Christen <pascal.christen@hostpoint.ch> Approved by: ports-secteam (miwi) Changes: _U branches/2019Q1/ branches/2019Q1/lang/php73/Makefile branches/2019Q1/lang/php73/files/patch-acinclude.m4 branches/2019Q1/lang/php73/files/patch-configure.ac The patch is committed and merged into quarterly :) |