Edit report at http://bugs.php.net/bug.php?id=51467&edit=1

 ID:               51467
 Comment by:       php at group dot apple dot com
 Reported by:      php at group dot apple dot com
 Summary:          Crash in shutdown
 Status:           Feedback
 Type:             Bug
 Package:          Reproducible crash
 Operating System: Mac OS X 10.6
 PHP Version:      5.3.2

 New Comment:

Downloading now. Given the integration time to build in our environment,
I likely 

won't have results until Monday.


Previous Comments:
------------------------------------------------------------------------
[2010-04-03 03:25:02] [email protected]

But you just proved they are unrelated.  Your backtrace showed a gc_
function as 

the crash point, and disabling gc fixed it.  There was no gc code in PHP
5.2.x 

which is the version bug 49209 was reported against, and of course there
are no 

gc functions in the backtrace of that report.



So, please try a current PHP 5.3 snapshot to see if the recent gc fixes
has 

addressed this particular issue.

------------------------------------------------------------------------
[2010-04-03 03:21:42] php at group dot apple dot com

Are you saying the two backtraces in this report don't look the same or
that

#49209's backtrace doesn't look the same? If the former, focus on the
function

name + offsets and you will see they are practically identical. If the
latter,

consider that the other report is a different OS (Linux) running PHP
5.2.10;

given the similarities, this bug appears to have been latent in multiple
releases.



To answer your question, disabling GC prevents the crash.

------------------------------------------------------------------------
[2010-04-03 03:13:59] php at group dot apple dot com

The patch file didn't upload because it wasn't text. I base64'd it and
posted it 

here:

http://pastebin.org/131802

------------------------------------------------------------------------
[2010-04-03 02:43:18] [email protected]

That doesn't look like the same backtrace to me.  Try turning off gc in
your 

php.ini:



zend.enable_gc=Off



And see if it still happens.  There have been some recent fixes to the
gc code.

------------------------------------------------------------------------
[2010-04-03 02:39:45] php at group dot apple dot com

Description:
------------
Executing certain scripts on Mac OS X 10.6 running 5.3.2 (or 5.3.1 or
5.3) 

causes a crash in 

the shutdown routine. The stack trace appears to be the same reported in


http://bugs.php.net/bug.php?id=49209.



See stack trace below.



I uploaded a tarball named "shutdown_crasher.tar.gz" as a smallish
sample 

demonstrating the 

flaw.



"php displayDoc.php" shows the first crash noted below.



Putting the files into an apache doc root and loading the index.html
file shows 

two buttons. 

Clicking on one should cause apache to crash. (Oddly, one deployment
always 

crashed with the 

"synchronous" call while another always crashed with the "async" call.)
This 

crash is the 

second noted below.

Test script:
---------------
See tarball attached as a patch.

Expected result:
----------------
I expected output without a crash.

Actual result:
--------------
Backtrace from php CLI:

--------------------

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x00000001434ed621

Crashed Thread:  0  Dispatch queue: com.apple.main-thread



Thread 0 Crashed:  Dispatch queue: com.apple.main-thread

0   php                             0x000000010032aa3f
gc_zval_possible_root + 

99

1   php                             0x000000010031ad97 zend_hash_destroy
+ 42

2   php                             0x00000001001a2b35
sxe_object_free_storage + 

53

3   php                             0x000000010032f351 

zend_objects_store_free_object_storage + 120

4   php                             0x0000000100304ab1 shutdown_executor
+ 515

5   php                             0x000000010030fce8 zend_deactivate +
111

6   php                             0x00000001002c2fce
php_request_shutdown + 

597

7   php                             0x000000010038c51f main + 5213

8   php                             0x00000001000013b8 start + 52

--------------------



Backtrace from apache:

--------------------

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x00000001d074cc21

Crashed Thread:  0  Dispatch queue: com.apple.main-thread



Thread 0 Crashed:  Dispatch queue: com.apple.main-thread

0   libphp5.so                          0x000000010131c64f
gc_zval_possible_root 

+ 99

1   libphp5.so                          0x000000010130d58b zend_hash_destroy
+ 

42

2   libphp5.so                          0x000000010119e100 

sxe_object_free_storage + 53

3   libphp5.so                          0x0000000101320f05 

zend_objects_store_free_object_storage + 120

4   libphp5.so                          0x00000001012f76f2 shutdown_executor
+ 

515

5   libphp5.so                          0x0000000101302508 zend_deactivate +
111

6   libphp5.so                          0x00000001012b6481
php_request_shutdown 

+ 597

7   libphp5.so                          0x000000010137cff9 php_handler +
1370

[apache stack removed]

--------------------


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51467&edit=1

Reply via email to