|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58418 Segmentation fault during shutdown
Submitted: 2008-11-18 18:19 UTC Modified: 2017-11-05 04:22 UTC
From: asbjorn at lila dot io Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.2.6 OS: Debian GNU/Linux lenny
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-11-18 18:19 UTC] asbjorn at lila dot io
I ran the script with:
php5 -n -e test.php

I ran it in a loop like this:
for i in `seq 1 100`; do php5 -n -e test.php; if [ $? != 0 ]; then echo; echo Crashed on run $i; echo ; break; fi; done

We don't use MySQL for anything else than pastebin on that machine so we have just moved MySQL off that machine for now, since we primarily uses PgSQL.

The PECL bug reporter doesn't support PHP 5.2.6, so I set it to 5.2.5.

`php5 -n -v` output:
PHP 5.2.6-5 with Suhosin-Patch (cli) (built: Oct  5 2008 12:28:28) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

`php -n -i` output, test script, etc.:

I haven't had time to test it on PHP5.3 yet.

Reproduce code:
// This script has a seg faults in at
// *least* 1 out of 50 runs. I have a script that
// consistenly fails. But I haven't been able to
// replicate it in a small script.

dl(''); // or, but not
dl(''); // the order doesn't mather

echo "Initializing Fileinfo\n";
$finfo = new FInfo(FILEINFO_MIME);

// If you don't access undefined variables
// it doesn't seg faults.
echo 'foo is'.(isset($foo)?'':' NOT')." set\n";

echo "The script continues...\n"
// High risk of seg fault during shutdown

Expected result:
Initializing Fileinfo
foo is NOT set
The script continues...

Actual result:
Initializing Fileinfo
foo is NOT set
The script continues...
Segmentation fault (core dumped)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-18 18:23 UTC] asbjorn at lila dot io
I just forgot to add that there is a bunch of traces available at
 [2017-10-11 17:32 UTC]
-Status: Open +Status: Feedback -Package: Fileinfo +Package: *General Issues
 [2017-10-11 17:32 UTC]
Thanks for the report. Please check with some recent PHP version.

 [2017-11-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 12 22:01:30 2024 UTC