php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81391 Segfault in a forked process
Submitted: 2021-08-27 07:52 UTC Modified: 2021-08-27 12:47 UTC
From: mrskman at gmail dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 8.0.10 OS: Ubuntu 18.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mrskman at gmail dot com
New email:
PHP Version: OS:

 

 [2021-08-27 07:52 UTC] mrskman at gmail dot com
Description:
------------
I run pcntl_fork() to process large arrays in background. One of arrays is causing segfaults on 2 of 4 servers. I tried to increase memory limit to a 10x higher value just to be sure this is not a memory issue but it still segfaults on 2 servers.

I was not able to create a test script. The only thing I have is a backtrace from attached gdb.

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x0000564372710a35 in execute_ex ()
(gdb) bt
#0  0x0000564372710a35 in execute_ex ()
#1  0x00005643725ac1cd in zend_call_function ()
#2  0x000056437238beb9 in zif_array_map ()
#3  0x00005643727133c4 in execute_ex ()
#4  0x00005643725ac1cd in zend_call_function ()
#5  0x000056437238beb9 in zif_array_map ()
#6  0x00005643727133c4 in execute_ex ()
#7  0x00005643725ac1cd in zend_call_function ()
#8  0x000056437238beb9 in zif_array_map ()
#9  0x00005643727133c4 in execute_ex ()
#10 0x00005643725ac1cd in zend_call_function ()
#11 0x000056437238beb9 in zif_array_map ()
#12 0x00005643727133c4 in execute_ex ()
#13 0x00005643725ac1cd in zend_call_function ()
#14 0x000056437238beb9 in zif_array_map ()
#15 0x00005643727133c4 in execute_ex ()
...
#1593 0x00005643727133c4 in execute_ex ()
#1594 0x00005643725ac1cd in zend_call_function ()
#1595 0x000056437238beb9 in zif_array_map ()
#1596 0x00005643727133c4 in execute_ex ()
#1597 0x00005643725ac1cd in zend_call_function ()
#1598 0x000056437238beb9 in zif_array_map ()
#1599 0x00005643727133c4 in execute_ex ()
#1600 0x00005643725ac1cd in zend_call_function ()
#1601 0x000056437238beb9 in zif_array_map ()
#1602 0x00005643727133c4 in execute_ex ()
#1603 0x00005643725ac1cd in zend_call_function ()
#1604 0x000056437238beb9 in zif_array_map ()
#1605 0x00005643727133c4 in execute_ex ()
#1606 0x00005643725ac1cd in zend_call_function ()
#1607 0x000056437238beb9 in zif_array_map ()
#1608 0x00005643727133c4 in execute_ex ()
#1609 0x00005643725ac1cd in zend_call_function ()
#1610 0x000056437238beb9 in zif_array_map ()
#1611 0x00005643727133c4 in execute_ex ()
#1612 0x00005643725ac1cd in zend_call_function ()
#1613 0x000056437238beb9 in zif_array_map ()
#1614 0x00005643727133c4 in execute_ex ()
#1615 0x00005643725ac1cd in zend_call_function ()
#1616 0x000056437238beb9 in zif_array_map ()
#1617 0x00005643727133c4 in execute_ex ()
#1618 0x00005643725ac1cd in zend_call_function ()
#1619 0x000056437238beb9 in zif_array_map ()
#1620 0x00005643727133c4 in execute_ex ()
#1621 0x00005643725ac1cd in zend_call_function ()
#1622 0x000056437238beb9 in zif_array_map ()
#1623 0x00005643727133c4 in execute_ex ()
#1624 0x00005643725ac1cd in zend_call_function ()
#1625 0x000056437238beb9 in zif_array_map ()
#1626 0x00005643727133c4 in execute_ex ()
#1627 0x00005643725ac1cd in zend_call_function ()
#1628 0x000056437238beb9 in zif_array_map ()
#1629 0x00005643727133c4 in execute_ex ()
#1630 0x00005643725ac1cd in zend_call_function ()
#1631 0x000056437239fce8 in zif_call_user_func_array ()
#1632 0x00005643727133c4 in execute_ex ()
#1633 0x00005643725ac1cd in zend_call_function ()
#1634 0x000056437239fce8 in zif_call_user_func_array ()
#1635 0x00005643727133c4 in execute_ex ()
#1636 0x000056437272b53d in zend_execute ()
#1637 0x00005643725cf6d9 in zend_execute_scripts ()
#1638 0x000056437250a213 in php_execute_script ()
#1639 0x000056437278ee1f in do_cli ()
#1640 0x00005643727901e6 in main ()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-27 08:08 UTC] nikic@php.net
This looks like a stack overflow (due to infinite recursion or too deep recursion) to me. Does that sound plausible?
 [2021-08-27 08:41 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2021-08-27 08:44 UTC] mrskman at gmail dot com
I wouldn't say that this is an infinite recursion problem. In that case it wouldn't finish successfuly on 2 other servers. On the other hand deep recursion seems plausible.
 [2021-08-27 09:14 UTC] cmb@php.net
-Status: Feedback +Status: Open
 [2021-08-27 09:14 UTC] cmb@php.net
> On the other hand deep recursion seems plausible.

In which case this likely is a WONTFIX.
 [2021-08-27 10:06 UTC] mrskman at gmail dot com
Is there any way how to find out on which line is it causing the segfault? From my point of view the recursion isn't that deep. But there are thousands lines of code and I want to be sure.
 [2021-08-27 12:47 UTC] cmb@php.net
You can try with Xdebug, which has a setting[1] that is supposed
to catch deep/infinite recursion, and throws an Error exception in
that case.

[1] <https://xdebug.org/docs/all_settings#max_nesting_level>
 [2021-10-13 07:20 UTC] mrskman at gmail dot com
Using Xdebug I can confirm that to cause of this issue was deep recursion (nesting level 769).

I'm still uncertain if segfault in this case is expected.
 [2023-05-02 18:32 UTC] kevinhawks13 at aol dot com
(https://collegegrazing.com/)github.com
(https://collegegrazing.com/blog/)github.com
(https://collegegrazing.com/affiliate-disclosure/)github.com
(https://collegegrazing.com/terms-of-use/)github.com
(https://collegegrazing.com/fake-id/best-fake-id-websites/)github.com
(https://collegegrazing.com/about/)github.com
(https://collegegrazing.com/contact/)github.com
(https://collegegrazing.com/fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-fake-ids/)github.com
(https://collegegrazing.com/how-to-get-a-fake-id/)github.com
(https://collegegrazing.com/top-fake-id-review/)github.com
(https://collegegrazing.com/fake-id/buy-virginia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-mexico-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-kentucky-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-iowa-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-maine-fake-id/)github.com
(https://collegegrazing.com/all-state-fakes-review/)github.com
(https://collegegrazing.com/fake-id/buy-colorado-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-missouri-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-hampshire-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-vermont-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-georgia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-arizona-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-alabama-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-florida-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-maryland-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-wyoming-fake-id/)github.com
(https://collegegrazing.com/fake-id/what-happens-if-i-get-caught/)github.com
(https://collegegrazing.com/fake-id/buy-california-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-york-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-alaska-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-rhode-island-fake-id/)github.com
(https://collegegrazing.com/magic-fake-id-review/)github.com
(https://collegegrazing.com/fake-id/buy-utah-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-hawaii-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-minnesota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-oklahoma-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-illinois-fake-id/)github.com
(https://collegegrazing.com/evolved-ids-review/)github.com
(https://collegegrazing.com/fake-id/buy-indiana-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-montana-fake-id/)github.com
(https://collegegrazing.com/how-do-bouncers-spot-fake-ids/)github.com
(https://collegegrazing.com/fake-id/common-uses/)github.com
(https://collegegrazing.com/fake-id/buy-arkansas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-pennsylvania-fake-id/)github.com
(https://collegegrazing.com/blog/page/2/)github.com
(https://collegegrazing.com/fake-id/buy-new-jersey-fake-id/)github.com
(https://collegegrazing.com/how-to-spot-a-georgia-fake-id/)github.com
(https://collegegrazing.com/scannable-fake-ids/)github.com
(https://collegegrazing.com/fake-id/buy-south-dakota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-massachusetts-fake-id/)github.com)github.com
(https://collegegrazing.com/fake-id/how-to-spot/)github.com
(https://collegegrazing.com/fake-id/buy-west-virginia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-connecticut-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-wisconsin-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-idaho-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-columbia-fake-id/)github.com
(https://collegegrazing.com/fake-id/how-to-make/)github.com
(https://collegegrazing.com/fake-id/buy-mississippi-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-nevada-fake-id/)github.com
(https://collegegrazing.com/how-to-pay-for-fake-id/)github.com
(https://collegegrazing.com/how-to-take-a-fake-id-photo-at-home/)github.com
(https://collegegrazing.com/fake-id/buy-oregon-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-texas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-north-dakota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-louisiana-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-south-carolina-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-kansas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-tennessee-fake-id/)github.com
(https://collegegrazing.com/fake-id/types-of-fake-ids/)github.com
(https://collegegrazing.com/fake-id/buy-delaware-fake-id/)github.com
(https://collegegrazing.com/lost-identification-review/)github.com
(https://collegegrazing.com/fake-id/buy-washington-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-nebraska-fake-id/)github.com
(https://collegegrazing.com/dingo-fakes-review/)github.com
(https://collegegrazing.com/fake-id/buy-north-carolina-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-michigan-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-ohio-fake-id/)github.com
(https://collegegrazing.com/fake-id/best-states/)github.com
(https://collegegrazing.com/idviking-review/)github.com
(https://collegegrazing.com/super-printer-bros-review/)github.com
(https://collegegrazing.com/idgod-review/)github.com
(https://collegegrazing.com/bogus-braxtor-review/)github.com
(https://collegegrazing.com/newids-review/)github.com
(https://collegegrazing.com/litfakes-review/)github.com
(https://collegegrazing.com/old-ironside-fakes-review/)github.com
(https://collegegrazing.com/idhurry-review/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC